superdesk/superdesk-client-core

View on GitHub
docs/templates/api/module.template.html

Summary

Maintainability
Test Coverage
{% extends "base.template.html" %}

{% block content %}
<h1>
  {% if doc.title %}{$ doc.title | marked $}{% else %}{$ doc.name | code $}{% endif %}
</h1>

<div style="font-size: 15px;">{$ doc.description | marked $}</div>

{% if doc.componentGroups and doc.componentGroups.length > 0 %}
<div class="component-breakdown">
  <h2>Module Components</h2>
  {% for componentGroup in doc.componentGroups %}
  <div>
    <h3 class="component-heading" id="{$ componentGroup.groupType | dashCase $}">{$ componentGroup.groupType | title $}</h3>
    <table class="table definition-table">
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
      {% for component in componentGroup.components %}
      <tr>
        <td>{$ component.id | link(component.name, component) $}</td>
        <td>{$ component.description | firstParagraph | marked $}</td>
      </tr>
      {% endfor %}
    </table>
  </div>
  {% endfor %}
</div>
{% endif %}

{% if doc.usage %}
  <h2>Usage</h2>
  {$ doc.usage | marked $}
{% endif %}

{% endblock %}

{% block installation %}
  <h2>Installation</h2>

  <p>First include {$ doc.packageName| code $} javascript file in your HTML:</p>

  <p>You can download this file from the following places:</p>
  <ul>
    <li>
      <a href="http://bower.io">Bower</a><br>
      e.g. {% code %}bower install angular {$ doc.packageName $}{% endcode %}
    </li>
  </ul>
  <p>Then load the module in your application by adding it as a dependent module:</p>
  {% code %}
    angular.module('app', [{% for require in doc.requires %}'{$ require $}', {% endfor %}'{$ doc.name $}']);
  {% endcode %}

  <p>With that you&apos;re ready to get started!</p>
{% endblock %}