<html lang="en">
<head>
  <title>Addons status page</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-1.3.2.min.js"></script>
  <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.qtip-1.0.0-rc2.min.js"></script>
  <style type="text/css">
  body {
    font-family: sans;
    font-size: 9pt !important;
  }
  table {
	border-style: none;
	border-spacing: 0px;
	border-collapse: collapse;
  }
  table th {
	border: 1px solid black;
	padding: 4px;
        background-color: #eee;
        font-size: 10pt;
  }
  table td {
	border: 1px solid black;
	padding: 4px;
        font-size: 10pt;
  }
  </style>
  <script type="text/javascript">
  function tooltip(node, content) {
    $(node).qtip({
      content : content,
      style: { name: 'cream', tip: true },
      show:'mouseover',
      hide:'mouseout'});
  };
  </script>
</head>

<body>
<h2>Addon status page</h2>
<table>
<tr>
<th>Module</th>
<th>Title</th>
<th>Author</th>
<!-- <th>Description</th>-->
<th>Status</th>
</tr>

{% for name,addon in addons.iteritems %}
<tr>
<td>
{% if addon.enabled and addon.meta.url %}
<a href="{{addon.meta.url}}">{{name}}</a>
{% else %}
{{name}}
{% endif %}
</td>

<td id="title-{{name}}">
{{addon.meta.title}}
</td>

<td>
{{addon.meta.author}}
</td>

<td id="status-{{name}}">
{% if addon.enabled %}
Enabled {% if addon.models_loaded %}(!){% endif %}
{% else %}
Disabled
{% endif %}
</td>

</tr>



<script type="text/javascript">
{% if addon.meta.description %}
tooltip('#title-{{name}}', '{{addon.meta.description}}');
{% endif %}
{% if addon.enabled %}
tooltip('#status-{{name}}', 'Run \'./manage.py&nbsp;addons&nbsp;-d&nbsp;{{name}}\' to disable this addon. \
{% if addon.models_loaded %}<br/><strong>Models are not loaded for this addon. Does the addon have models.py? \
Did you run syncdb? Staticfiles are not served for this addon.</strong{% endif %}');
{% else %}
tooltip('#status-{{name}}', 'Run \'./manage.py&nbsp;addons&nbsp;-e&nbsp;{{name}}\' to enable this addon.');
{% endif %}
</script>
{% endfor %}
</table>

<h2>More debugging information:</h2>
<table>
<tr>
<td>Static root directory:</td>
<td>STATIC_ROOT</td>
<td>{{settings.STATIC_ROOT}}</td>
</tr>

<tr>
<td>Static URL prefix:</td>
<td>STATIC_URL</td>
<td>{{settings.STATIC_URL}}</td>
</tr>

<tr>
<td>Media directory names:</td>
<td>STATICFILES_MEDIA_DIRNAMES</td>
<td>{{settings.STATICFILES_MEDIA_DIRNAMES}}</td>
</tr>

<tr>
<td>Addons root directories:</td>
<td>ADDONS_ROOTS</td>
<td>{{settings.ADDONS_ROOTS}}</td>
</tr>


<tr>
<td>Dependencies provided by core:</td>
<td>ADDONS_PROVIDED</td>
<td>{{settings.ADDONS_PROVIDED}}</td>
</tr>

<tr>
<td>Debugging enabled:</td>
<td>DEBUG</td>
<td>{{settings.DEBUG}}</td>
</tr>

<tr>
<td>Media URL:</td>
<td>MEDIA_URL</td>
<td>{{ MEDIA_URL }}</td>
</tr>


<tr>
<td>Media root in filesystem:</td>
<td>MEDIA_ROOT</td>
<td>{{ settings.MEDIA_ROOT }}</td>
</tr>

</table>


<h2>INSTALLED_APPS</h2>
<table>
<tr>
<th>Name</th>
</tr>

{% for name in settings.INSTALLED_APPS %}
<tr>
<td>{{name}}</td>
</tr>
{% endfor %}

</table>
</body>
</html>
