{% macro info_bar(name,meta,base_url,hierarchy) %}
<div class="row">
<div class="col-lg-12">
<div class="well well-sm">
  <ul class="list-inline" style="margin-bottom:0px;display:inline">
     {% if meta['author'] %}
    <li><i class="fa fa-pencil"></i> {{ meta['author'] }}</li>
     {% endif %}
     {% if meta['date'] %}
    <li><i class="fa fa-calendar-o"></i> {{ meta['date'] }}</li>
     {% endif %}
     {% if meta['license'] %}
    <li><i class="fa fa-legal"></i> {{ meta['license'] }}</li>
     {% endif %}
     {% if meta['version'] %}
    <li><i class="fa fa-barcode"></i> {{ meta['version'] }}</li>
    {% endif %}
    {% if meta['category'] %}
    <li><i class="fa fa-folder-open"></i> {{ meta['category'] }}</li>
    {% endif %}
    {% if hierarchy[0] %}
    <li><i class="fa fa-code"></i><a href="{{ base_url }}/src/{{ hierarchy[0].name }}"> Source File</a></li>
     {% else %}
    <li><i class="fa fa-code"></i><a href="{{ base_url }}/src/{{ name }}"> Source File</a></li>
     {% endif %}
  </ul>
  <ol class="breadcrumb in-well text-right">
  {% for item in hierarchy %}
     <li>{{ item }}</li>
  {% endfor %}
     <li class="active">{{ name }}</li>
  </ol>
  </div>
</div>
{% endmacro %}


{% macro sidebar(project,self) %}
  {% set count = 0 %}
  {% if self.variables %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Variables</h3></div>
    <div class="list-group">
      {% for var in self.variables %}
      <a class="list-group-item" href="{{ self.get_url() }}#var-{{ var.name }}">{{ var.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.constructor %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Constructor</h3></div>
    <div class="list-group">
        {% if self.constructor.obj == 'interface' %}{% set prefix = 'intr' %}{% else %}{% set prefix = 'proc' %}{% endif %}
      <a class="list-group-item" href="{{ self.get_url() }}#{{ prefix }}-{{ self.constructor.name }}">{{ self.constructor.name }}</a>
    </div>
  </div>
  {% endif %}
  {% if self.programs %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Programs</h3></div>
    <div class="list-group">
      {% for prog in self.programs %}
      <a class="list-group-item" href="{{ prog.get_url() }}">{{ prog.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.modules %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Modules</h3></div>
    <div class="list-group">
      {% for mod in self.modules %}
      <a class="list-group-item" href="{{ mod.get_url() }}">{{ mod.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.interfaces %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Interfaces</h3></div>
    <div class="list-group">
      {% for intr in self.interfaces %}
      <a class="list-group-item" href="{{ self.get_url() }}#intr-{{ intr.name }}">{{ intr.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.absinterfaces %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Abstract Interfaces</h3></div>
    <div class="list-group">
      {% for intr in self.absinterfaces %}
      <a class="list-group-item" href="{{ self.get_url() }}#intr-{{ intr.name }}">{{ intr.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.types %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Derived Types</h3></div>
    <div class="list-group">
      {% for type in self.types %}
      <a class="list-group-item" href="{{ self.get_url() }}#type-{{ type.name }}">{{ type.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.functions %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Functions</h3></div>
    <div class="list-group">
      {% for proc in self.functions %}
      <a class="list-group-item" href="="{% if self.obj == 'sourcefile' %}{{ proc.get_url() }}{% else %}{{ self.get_url() }}#proc-{{ proc.name }}{% endif %}">{{ proc.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.subroutines %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Subroutines</h3></div>
    <div class="list-group">
      {% for proc in self.subroutines %}
      <a class="list-group-item" href="{% if self.obj == 'sourcefile' %}{{ proc.get_url() }}{% else %}{{ self.get_url() }}#proc-{{ proc.name }}{% endif %}">{{ proc.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.finalprocs %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Finalization Procedures</h3></div>
    <div class="list-group">
      {% for fp in self.finalprocs %}
      <a class="list-group-item" href="{{ self.get_url() }}#fp-{{ fp.name }}">{{ fp.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.boundprocs %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Type-Bound Procedures</h3></div>
    <div class="list-group">
      {% for bp in self.boundprocs %}
      <a class="list-group-item" href="{{ self.get_url() }}#bp-{{ bp.name }}">{{ bp.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.modprocs %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Module Procedures</h3></div>
    <div class="list-group">
      {% for mod in self.modprocs %}
      <a class="list-group-item" href="{{ self.get_url() }}#proc-{{ mod.name }}">{{ mod.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% if self.src %}
  {% set count = count + 1 %}
  <div class="panel panel-primary">
    <div class="panel-heading text-left"><h3 class="panel-title">Source Code</h3></div>
    <div class="list-group">
      <a class="list-group-item" href="{{ self.get_url() }}#src">{{ self.name }}</a>
    </div>
  </div>
  {% endif %}
  {% if count > 0 %}<hr>{% endif %}
  {% if self.obj == 'program' %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Programs</h3></div>
    <div class="list-group">
      {% for prog in project.programs|sort(attribute='name') %}
      <a class="list-group-item" href="{{ prog.get_url() }}">{{ prog.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% elif self.obj == 'module' %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Modules</h3></div>
    <div class="list-group">
      {% for mod in project.modules|sort(attribute='name') %}
      <a class="list-group-item" href="{{ mod.get_url() }}">{{ mod.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% elif self.obj == 'proc' or (self.obj == 'interface' and (not self.abstract)) %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Procedures</h3></div>
    <div class="list-group">
      {% for proc in project.procedures|sort(attribute='name') %}
      <a class="list-group-item" href="{{ proc.get_url() }}">{{ proc.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% elif self.obj == 'interface' %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Abstract Interfaces</h3></div>
    <div class="list-group">
      {% for absint in project.absinterfaces|sort(attribute='name') %}
      <a class="list-group-item" href="{{ absint.get_url() }}">{{ absint.name }}</a>
      {% endfor %}
    </div>
  </div> 
  {% elif self.obj == 'type' %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Derived Types</h3></div>
    <div class="list-group">
      {% for dtype in project.types|sort(attribute='name') %}
      <a class="list-group-item" href="{{ dtype.get_url() }}">{{ dtype.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% elif self.obj == 'sourcefile' %}
  <div class="panel panel-default">
    <div class="panel-heading text-left"><h3 class="panel-title">All Source Files</h3></div>
    <div class="list-group">
      {% for src in project.files|sort(attribute='name') %}
      <a class="list-group-item" href="{{ src.get_url() }}">{{ src.name }}</a>
      {% endfor %}
    </div>
  </div>
  {% endif %}
  {% endmacro %}


{% macro var_list(variables,intent=False,permission=False,summary=False) %}
<table class="table table-striped varlist">
<thead><tr><th>Type</th>{% if permission %}<th>Visibility</th>{% endif %}
{% if intent %}<th>Intent</th><th>Optional</th>{% endif %}
<th>Attributes</th><th></th><th>Name</th>{% if not intent %}<th></th><th>Initial</th>{% endif %}<th></th></thead>
{% set colnum = 5 %}
{% if permission %}{% set colnum = colnum + 1%}{% endif %}
{% if intent %}{% set colnum = colnum + 2%}{% else %}{% set colnum = colnum + 1 %}{% endif %}
<tbody>
{% for var in variables %}
  {% set args = 0 %}
  {% if var.kind %}{% set args = args + 1 %}{% endif %}
  {% if var.strlen %}{% set args = args + 1 %}{% endif %}
  {% if var.proto %}{% set args = args + 1 %}{% endif %}
<tr>
  {% if var.obj == 'variable' %}
  <td><a class="anchor" name="var-{{ var.name }}"></a>{{ var.vartype }}{% if args > 0 -%}({% if var.kind -%}kind={{ var.kind }}{%- endif %}{% if args > 1 -%},{%- endif %}{% if var.strlen -%}len={{ var.strlen }}{%- endif %}{% if var.proto -%}{% if not var.proto[0].permission or var.proto[0].permission in var.proto[0].parent.display -%}{{ var.proto[0] }}{% else %}{{ var.proto[0].name }}{%- endif %}{{ var.proto[1] }}{%- endif %}){%- endif %}{% if intent or permission or var.parameter or var.attribs|length > 0 -%},{%- endif %}</td>
  {% if intent -%}<td>intent({{ var.intent }}){% if var.optional or permission or var.parameter or var.attribs|length > 0 -%},{% endif %}</td>
  <td>{% if var.optional -%}optional{% if permission or var.parameter or var.attributes|length > 0 -%},{%- endif %}{%- endif %}</td>{%- endif %}
  {% if permission %}<td>{{ var.permission }}{% if var.parameter or var.attribs|length > 0 -%},{%- endif %}</td>{% endif %}
  <td>{% if var.parameter %}parameter{% if var.attribs|length > 0 %}, {% endif %}{% endif %}{% for attrib in var.attribs -%}{{ attrib }}{% if not loop.last -%}, {% endif %}{%- endfor %}</td><td>::</td>
  <td><strong>{{ var.name }}</strong>{{ var.dimension }}</td>{% if not intent %}<td>{% if var.initial -%}{% if var.points -%} => {% else %} = {%- endif %}{% endif %}</td><td>{% if var.initial %}{{ var.initial }}{%- endif %}</td>{% endif %}<td>{% if summary -%}{{ var.meta['summary'] }}{% else %}{{ var.doc }}{% endif %}</td>
  {% elif var.obj == 'proc' %}
  <td colspan="{{ colnum }}">
      <small>{{ proc_summary(var,title=True,small=True) }}</small>
  </td> 
  {% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endmacro %}


{% macro proc_summary(proc,title=True,small=False) %}
    {% if title %}
    {% if small %}<h5>{% else %}<h3>{% endif %}{{ proc_line(proc) }}{% if small %}</h5>{% else %}</h3>{% endif %}
    {% endif %}
    {% if small %}<h6>{% else %}<h4>{% endif %}Arguments{% if small %}</h6>{% else %}</h4>{% endif %}
    {% if proc.args|length > 0 %}
      {% if proc.permission in proc.parent.display %}
      {{ var_list(proc.args,intent=True,summary=True) }}
      {% else %}
      {{ var_list(proc.args,intent=True) }}
      {% endif %}
    {% else %}
      <em>None</em>
    {% endif %}
    {% if proc.retvar %}
{% set var = proc.retvar %}
  {% set args = 0 %}
  {% if var.kind %}{% set args = args + 1 %}{% endif %}
  {% if var.strlen %}{% set args = args + 1 %}{% endif %}
  {% if var.proto %}{% set args = args + 1 %}{% endif %}
     {% if small %}<h6>{% else %}<h4>{% endif %}Return Value <small><a class="anchor" name="var-{{ var.name }}"></a>{{ var.vartype }}{% if args > 0 -%}({% if var.kind -%}kind={{ var.kind }}{%- endif %}{% if args > 1 -%},{%- endif %}{% if var.strlen -%}len={{ var.strlen }}{%- endif %}{% if var.proto -%}{% if not var.proto[0].permission or var.proto[0].permission in var.proto[0].parent.display -%}{{ var.proto[0] }}{% else %}{{ var.proto[0].name }}{%- endif %}{{ var.proto[1] }}{%- endif %}){%- endif %}{% if var.attribs|length > 0 -%},{%- endif %}
  {% for attrib in var.attribs -%}{{ attrib }}{% if not loop.last or var.dimension -%}, {%- endif %}{%- endfor %}{{ var.dimension }}</small>{% if small %}</h6>{% else %}</h4>{% endif %}
  {{ var.meta['summary'] }}
    {% endif %}
    {% if proc.doc or proc.meta %}
    {% if small %}<h6>{% else %}<h4>{% endif %}Description{% if small %}</h6>{% else %}</h4>{% endif %}
       {{ meta_list(proc.meta) }}
       {{ proc.meta['summary'] }}
    {% endif %}    
{% endmacro %}


{% macro bound_info(tb) %}
<div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="bp-{{ tb.name }}"></a><h3>{% if tb.generic -%}generic,{% else %}procedure,{%- endif %} {{ tb.permission }}{% if tb.attribs -%}, {% for attrib in tb.attribs -%}{{ attrib }}{% if not loop.last -%}, {% endif %}{%- endfor %}{%- endif %} :: <strong>{{ tb.name }}</strong> {% if tb.generic or tb.name != tb.bindings[0].name %} => {% for bind in tb.bindings -%}{% if not bind.parent or bind.permission in bind.parent.display %}{{ bind }}{% else %}{{ bind.name }}{% endif %}{% if not loop.last -%}, {% endif %}{%- endfor %}{% endif %} {% if tb.binding|length == 1 %}<small>{{ tb.bindings[0].proctype }}</small>{% endif %}
    {% if tb.meta['deprecated'] and tb.meta['deprecated'].lower() == 'true' %}
	 <span class="label label-danger depwarn">Deprecated</span>
    {% endif %}
  <h3></div>
  {% if tb.doc or tb.meta %}
  <div class="panel-body">
    {{ meta_list(tb.meta) }}
    {{ tb.meta['summary'] }}
  </div>
  {% endif %}
  <ul class="list-group">
    {% for bind in tb.bindings %}
      <li class="list-group-item">
      {{ proc_summary(bind) }}
      </li>
    {% endfor %}
  </ul>
</div>
{% endmacro %}


{% macro interface(intr) %}
<div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="intr-{{ intr.name }}"></a><h3>{% if intr.parobj == 'module' and intr.generic %}{{ intr.permission }} {% endif %}interface {% if intr.generic %}{% if intr.permission in intr.parent.display %}{{ intr }}{% else %}{{ intr.name }}{% endif %}{% endif %}
    {% if intr.meta['deprecated'] and intr.meta['deprecated'].lower() == 'true' %}
	 <span class="label label-danger depwarn">Deprecated</span>
    {% endif %}
  </h3></div>
  {% if intr.doc or intr.meta %}
  <div class="panel-body">
    {{ meta_list(intr.meta) }}
    {{ intr.meta['summary'] }}
  </div>
  {% endif %}
  <ul class="list-group">
  {% if intr.generic %}
  {% for proc in intr.functions + intr.subroutines %}
    <li class="list-group-item">
    {{ proc_summary(proc) }}
    </li>
  {% endfor %}
  {% for proc in intr.modprocs %}
    <li class="list-group-item">
    {{ proc_summary(proc.procedure) }}
    </li>
  {% endfor %}
  {% else %}
    <li class="list-group-item">
    {{ proc_summary(intr.procedure) }}
    </li>
  {% endif %}
  </ul>
</div>
{% endmacro %}

{% macro absinterface(intr) %}
<div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="intr-{{ intr.name }}"></a><h3>abstract interface
    {% if intr.meta['deprecated'] and intr.meta['deprecated'].lower() == 'true' %}
	 <span class="label label-danger depwarn">Deprecated</span>
    {% endif %}
  </h3></div>
  {% if intr.doc or intr.meta %}
  <div class="panel-body">
    {{ meta_list(intr.meta) }}
    {{ intr.meta['summary'] }}
  </div>
  {% endif %}
  <ul class="list-group">
    <li class="list-group-item">
    {{ proc_summary(intr.procedure) }}
    </li>
  </ul>
</div>
{% endmacro %}

{% macro proc_line(proc,link=True) %}
{% if proc.parobj == 'module' or (proc.parobj == 'interface' and proc.parent.parobj == 'module') %}{{ proc.permission }} {% endif %}{% for attrib in proc.attribs -%}{{ attrib }}{% if not loop.last -%}, {%- endif %}{%- endfor %} {{ proc.proctype|lower }} {% if not proc.parent or (proc.permission in proc.parent.display and link) %}{{ proc }}{% else %}{{ proc.name }}{% endif %}({% for arg in proc.args -%}{{ arg.name }}{% if not loop.last -%}, {% endif %}{%- endfor %}){% if proc.bindC -%}, bind(c)
    {% if proc.meta['deprecated'] and proc.meta['deprecated'].lower() == 'true' %}
	 <span class="label label-danger depwarn">Deprecated</span>
    {% endif %}
{% endif %}
{% endmacro %}


{% macro final(finals) %}
    {% for proc in finals %}
<div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="fp-{{ proc.name }}"></a><h3>final :: <strong>{{ proc.name }}</strong></h3></div>
  <div class="panel-body">
     {{ proc_summary(proc,title=True) }}
  </div>
</div>
    {% endfor %}
{% endmacro %}


{% macro type_summary(dtype) %}
<div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="type-{{ dtype.name }}"></a><h3>type{% if dtype.parobj == 'module' %}, {{ dtype.permission }}{% endif %}{% if dtype.sequence%}, sequence {% endif %}{% for attrib in dtype.attribs -%}, {{ attrib }}{%- endfor %}{% if dtype.extends %}, extends({{ dtype.extends }}){% endif %} :: {% if dtype.permission in dtype.parent.display %}{{ dtype }}{% else %}{{ dtype.name }}{% endif %}
    {% if dtype.meta['deprecated'] and dtype.meta['deprecated'].lower() == 'true' %}
	 <span class="label label-danger depwarn">Deprecated</span>
    {% endif %}
  </h3></div>
  <div class="panel-body">
     {% if dtype.variables|length > 0 %}
     <h4>Components</h4>
    {{ var_list(dtype.variables,permission=True,summary=True) }}
     {% endif %}
     {% if dtype.constructor %}
     <h4>Constructor</h4>
       {% if dtype.constructor.obj == 'interface' %}
         {{ dtype.constructor.meta['summary'] }}
       {% endif %}
       <table class="table table-striped varlist">
      <tbody>
        {% if dtype.constructor.obj == 'proc' %}
        <tr><td>{{ proc_line(dtype.constructor) }}</td><td>{{ dtype.constructor.meta['summary'] }}</td></tr>
        {% elif dtype.constructor.obj == 'interface' %}
             {% for proc in dtype.constructor.functions + dtype.constructor.subroutines %}
             <tr><td>{% if proc.parobj == 'module' or (proc.parobj == 'interface' and proc.parent.parobj == 'module') %}{{ proc.permission }} {% endif %}{% for attrib in proc.attribs -%}{{ attrib }}{% if not loop.last -%}, {%- endif %}{%- endfor %} {{ proc.proctype|lower }} <strong>{% if proc.permission in proc.parent.display %}{{ proc }}{% else %}{{ proc.name }}{% endif %}</strong>({% for arg in proc.args -%}{{ arg }}{% if not loop.last -%}, {% endif %}{%- endfor %}){% if proc.bindC -%}, bind(c){% endif %}</td><td>{{ proc.meta['summary'] }}</td></tr>
             {% endfor %}
             {% for mproc in dtype.constructor.modprocs %}
             {% set proc = mproc.procedure %}
             <tr><td>{% if proc.parobj == 'module' or (proc.parobj == 'interface' and proc.parent.parobj == 'module') %}{{ proc.permission }} {% endif %}{% for attrib in proc.attribs -%}{{ attrib }}{% if not loop.last -%}, {%- endif %}{%- endfor %} {{ proc.proctype|lower }} <strong>{% if proc.permission in proc.parent.display %}{{ proc }}{% else %}{{ proc.name }}{% endif %}</strong>({% for arg in proc.args -%}{{ arg }}{% if not loop.last -%}, {% endif %}{%- endfor %}){% if proc.bindC -%}, bind(c){% endif %}</td><td>{{ proc.meta['summary'] }}</td></tr>
             {% endfor %}
        {% endif %}
       </tbody>
       </table>
     {% endif %}
     {% if dtype.finalprocs|length > 0 %}
     <h4>Finalizations Procedures</h4>
      <table class="table table-striped varlist">
      <tbody>
      {% for fin in dtype.finalprocs %}
       <tr><td>final :: <strong>{{ fin.name }}</strong></h3></td><td>{{ fin.meta['summary'] }}</td></tr>
      {% endfor %}
       </tbody>
       </table>  
     {% endif %}     
     {% if dtype.boundprocs|length > 0 %}
     <h4>Type-Bound Procedures</h4>
      <table class="table table-striped varlist">
      <tbody>
      {% for tb in dtype.boundprocs %}
       <tr><td>{% if tb.generic -%}generic,{% else %}procedure,{%- endif %} {{ tb.permission }}{% if tb.attribs -%}, {% for attrib in tb.attribs -%}{{ attrib }}{% if not loop.last -%}, {% endif %}{%- endfor %}{%- endif %} :: <strong>{{ tb.name }}</strong> {% if tb.generic or tb.name != tb.bindings[0].name %} => {% for bind in tb.bindings -%}{{ bind.name }}{% if not loop.last -%}, {% endif %}{%- endfor %}{% endif %} {% if tb.binding|length == 1 %}<small>{{ tb.bindings[0].proctype }}</small>{% endif %}</td>
       <td>{{ tb.meta['summary'] }}</td></tr>
      {% endfor %}
       </tbody>
       </table>
     {% endif %}
     {% if dtype.doc or dtype.meta %}
     <h4>Description</h4>
       {{ meta_list(dtype.meta) }}
       {{ dtype.meta['summary'] }}
     {% endif %}
  </div>
</div>
{% endmacro %}


{% macro proc_entry(proc) %}
  <div class="panel panel-default">
  <div class="panel-heading codesum"><a class="anchor" name="proc-{{ proc.name }}"></a><h3>{{ proc_line(proc) }}</h3></div>
  <div class="panel-body">
       {{ proc_summary(proc,False) }}
  </div>
  </div>
{% endmacro %}


{% macro use_list(obj) %}
  {% if obj.uses|length > 0 %}
    <ul class="list-inline">
      <li><h4>Uses:</h4></li>
      {% for use in obj.uses %}
      <li>{{ use }}</li>
      {% endfor %}
    </ul>
  {% endif %}
{% endmacro %}


{% macro meta_list(meta) %}
{% if meta['author'] or meta['date'] or meta['license'] or meta['version'] or meta['category'] %}
<dl class="dl-horizontal">
    {% if meta['author'] %}
    <dt>Author</dt><dd>{{ meta['author'] }}</dd>
    {% endif %}
    {% if meta['date'] %}
    <dt>Date</dt><dd>{{ meta['date'] }}</dd>
    {% endif %}
    {% if meta['license'] %}
    <dt>License</dt><dd>{{ meta['license'] }}</dd>
    {% endif %}
    {% if meta['version'] %}
    <dt>Version</dt><dd>{{ meta['version'] }}</dd>
    {% endif %}
    {% if meta['category'] %}
    <dt>Category</dt><dd>{{ meta['category'] }}</dd>
    {% endif %}
  </dl>
{% endif %}
{% endmacro %}
