summaryrefslogtreecommitdiff
path: root/templates/devel
diff options
context:
space:
mode:
Diffstat (limited to 'templates/devel')
-rw-r--r--templates/devel/admin_log.html62
-rw-r--r--templates/devel/clock.html75
-rw-r--r--templates/devel/index.html249
-rw-r--r--templates/devel/new_account.txt5
-rw-r--r--templates/devel/packages.html98
-rw-r--r--templates/devel/profile.html29
-rw-r--r--templates/devel/stats.html121
7 files changed, 504 insertions, 135 deletions
diff --git a/templates/devel/admin_log.html b/templates/devel/admin_log.html
new file mode 100644
index 00000000..05130491
--- /dev/null
+++ b/templates/devel/admin_log.html
@@ -0,0 +1,62 @@
+{% extends "admin/base_site.html" %}
+{% load i18n admin_static %}
+
+{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}" />{% endblock %}
+
+{% block breadcrumbs %}<div class="breadcrumbs"><a href="/admin/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}
+
+{% block content %}
+<div id="content-main">
+ <div class="module">
+{% load log %}
+{% if log_user %}
+{% get_admin_log 100 as admin_log for_user log_user %}
+{% else %}
+{% get_admin_log 100 as admin_log %}
+{% endif %}
+{% if not admin_log %}
+<p>{% trans 'None available' %}</p>
+{% else %}
+<table id="change-history">
+ <thead>
+ <tr>
+ <th scope="col">{% trans 'Date/time' %}</th>
+ <th scope="col">{% trans 'User' %}</th>
+ <th>Type</th>
+ <th>Object</th>
+ <th scope="col">{% trans 'Action' %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for entry in admin_log %}
+ <tr>
+ <th scope="row">{{ entry.action_time|date:"DATETIME_FORMAT" }}</th>
+ {% if log_user %}
+ <td>{{ entry.user.username }}{% if entry.user.get_full_name %} ({{ entry.user.get_full_name }}){% endif %}</td>
+ {% else %}
+ <td><a href="{{ entry.user.username }}/">{{ entry.user.username }}</a>{% if entry.user.get_full_name %} ({{ entry.user.get_full_name }}){% endif %}</td>
+ {% endif %}
+ <td>
+ {% if entry.content_type %}
+ <span>{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
+ {% else %}
+ <span>{% trans 'Unknown content' %}</span>
+ {% endif %}
+ </td>
+ <td>
+ <span class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}"></span>
+ {% if entry.is_deletion %}
+ {{ entry.object_repr }}
+ {% else %}
+ <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
+ {% endif %}
+ </td>
+ <td>{{ entry.change_message }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+{% endif %}
+ </div>
+</div>
+{% endblock %}
diff --git a/templates/devel/clock.html b/templates/devel/clock.html
new file mode 100644
index 00000000..6ed890c1
--- /dev/null
+++ b/templates/devel/clock.html
@@ -0,0 +1,75 @@
+{% extends "base.html" %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load flags %}
+{% load tz %}
+
+{% block title %}{{ BRANDING_DISTRONAME }} - Hacker World Clocks{% endblock %}
+
+{% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %}
+
+{% block content %}
+<div id="dev-clocks-box" class="box">
+ <h2>Hacker World Clocks</h2>
+
+ <p>This page helps prevent you from waking a sleeping hacker. It also
+ depends on hackers keeping the time zone information up to date, so if
+ you see 'UTC' listed, pester them to update their settings.</p>
+ <p>The "Last Action" column shows the last time this developer has done
+ something we know about. Considered dates for each developer include:</p>
+ <ul>
+ <li>Build date of a package in the repositories</li>
+ <li>Last login to the developer side of this site</li>
+ <li>Admin log entry on this site (e.g., adding a donor, modifying a
+ mirror)</li>
+ <li>Post date of a news item</li>
+ <li>Signing off on a package</li>
+ <li>Flagging a package out-of-date</li>
+ </ul>
+ <p>
+ Current UTC Time: {{ utc_now|date:"Y-m-d H:i T" }}
+ </p>
+
+ <table id="clocks-table" class="results">
+ <thead>
+ <tr>
+ <th>Hacker</th>
+ <th>Username</th>
+ <th>Alias</th>
+ <th>Last Action</th>
+ <th>Location</th>
+ <th>Time Zone</th>
+ <th>Current Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for dev in developers %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><a href="mailto:{{ dev.email }}">{{ dev.get_full_name }}</a></td>
+ <td>{{ dev.username }}</td>
+ <td>{{ dev.userprofile.alias }}</td>
+ <td>{{ dev.last_action }}</td>
+ <td>{% country_flag dev.userprofile.country %}{{ dev.userprofile.location }}</td>
+ <td>{{ dev.userprofile.time_zone }}</td>
+ <td>{{ utc_now|timezone:dev.userprofile.time_zone|date:"Y-m-d H:i T" }}<span class="hide"> {{ dev.userprofile.time_zone }}</span></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $("#clocks-table:has(tbody tr)").tablesorter({
+ widgets: ['zebra'],
+ sortLocaleCompare: true,
+ sortList: [[0,0]],
+ headers: { 4: { sorter: false } }
+ });
+});
+</script>
+{% endblock %}
diff --git a/templates/devel/index.html b/templates/devel/index.html
index f285f7f6..3a0fb9a9 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -1,5 +1,11 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - Developer Dashboard{% endblock %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load cache %}
+{% load package_extras %}
+{% load todolists %}
+
+{% block title %}{{ BRANDING_DISTRONAME }} - Hacker Dashboard{% endblock %}
{% block content %}
<div id="dev-dashboard" class="box">
@@ -8,37 +14,45 @@
<h3>My Flagged Packages</h3>
- <table id="dash-myflagged" class="results dash-stats">
+ <table id="dash-myflagged" class="results">
<thead>
<tr>
- <th class="key">Name</th>
- <th>Repo</th>
+ <th>Name</th>
<th>Version</th>
+ <th>Testing Version</th>
+ <th>Repo</th>
<th>Arch</th>
+ <th>Flagged</th>
+ <th>Last Updated</th>
</tr>
</thead>
<tbody>
{% for pkg in flagged %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ pkg.get_absolute_url }}"
- title="View package details for {{ pkg.pkgname }}">{{ pkg.pkgname }}</a></td>
+ <td>{% pkg_details_link pkg %}</td>
+ <td>{{ pkg.full_version }}</td>
+ <td>{% with pkg.in_testing as tp %}{% if tp %}
+ <a href="{{ tp.get_absolute_url }}"
+ title="Testing package details for {{ tp.pkgname }}">{{ tp.full_version }}</a>
+ {% endif %}{% endwith %}</td>
<td>{{ pkg.repo.name }}</td>
- <td>{{ pkg.pkgver }}</td>
<td>{{ pkg.arch.name }}</td>
+ <td>{{ pkg.flag_date|date }}</td>
+ <td>{{ pkg.last_update|date }}</td>
</tr>
{% empty %}
- <tr class="empty"><td colspan="4"><em>No flagged packages to display</em></td></tr>
+ <tr class="empty"><td colspan="7"><em>No flagged packages to display</em></td></tr>
{% endfor %}
</tbody>
</table>
<h3>My Incomplete Todo List Packages</h3>
- <table id="dash-mytodolist" class="results dash-stats">
+ <table id="dash-mytodolist" class="results">
<thead>
<tr>
<th>Todo List</th>
- <th class="key">Name</th>
+ <th>Name</th>
<th>Repo</th>
<th>Arch</th>
<th>Maintainer(s)</th>
@@ -47,12 +61,11 @@
<tbody>
{% for todopkg in todopkgs %}
<tr class="{% cycle 'odd' 'even' %}">
- <td><a href="{{ todopkg.list.get_absolute_url }}"
- title="View todo list: {{ todopkg.list.name }}">{{ todopkg.list.name }}</a></td>
- <td><a href="{{ todopkg.pkg.get_absolute_url }}"
- title="View package details for {{ todopkg.pkg.pkgname }}">{{ todopkg.pkg.pkgname }}</a></td>
- <td>{{ todopkg.pkg.repo.name }}</td>
- <td>{{ todopkg.pkg.arch.name }}</td>
+ <td><a href="{{ todopkg.todolist.get_absolute_url }}"
+ title="View todo list: {{ todopkg.todolist.name }}">{{ todopkg.todolist.name }}</a></td>
+ <td>{% todopkg_details_link todopkg %}</td>
+ <td>{{ todopkg.repo.name }}</td>
+ <td>{{ todopkg.arch.name }}</td>
<td>{{ todopkg.pkg.maintainers|join:', ' }}</td>
</tr>
{% empty %}
@@ -63,156 +76,128 @@
<h3>Package Todo Lists</h3>
- <table id="dash-todo" class="results dash-stats">
+ <table id="dash-todo" class="results">
<thead>
<tr>
<th>Name</th>
<th>Creation Date</th>
+ <th>Creator</th>
<th>Description</th>
+ <th>Package Count</th>
+ <th>Incomplete Count</th>
</tr>
</thead>
<tbody>
{% for todo in todos %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td class="key"><a href="{{ todo.get_absolute_url }}"
- title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
- <td>{{ todo.date_added }}</td>
- <td>{{ todo.description|safe }}</td>
- </tr>
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td><a href="{{ todo.get_absolute_url }}"
+ title="View todo list: {{ todo.name }}">{{ todo.name }}</a></td>
+ <td>{{ todo.created|date }}</td>
+ <td>{{ todo.creator.get_full_name }}</td>
+ <td class="wrap">{{ todo.description|urlize }}</td>
+ <td>{{ todo.pkg_count }}</td>
+ <td>{{ todo.incomplete_count }}</td>
+ </tr>
{% empty %}
- <tr class="empty"><td colspan="3"><em>No package todo lists to display</em></td></tr>
+ <tr class="empty"><td colspan="6"><em>No package todo lists to display</em></td></tr>
{% endfor %}
</tbody>
</table>
- <form id="dash-pkg-notify" method="post" action="/devel/notify/">{% csrf_token %}
- <fieldset>
- <p><input id="notify" name="notify" type="checkbox" value="yes"
- {% if user.get_profile.notify %} checked="checked"{% endif %} />
- <label for="notify">Notify me when packages are flagged out-of-date</label>
- <input title="Update notification status" type="submit" value="Update" /></p>
- </fieldset>
- </form>
-
-</div><!-- #dev-dashboard -->
+ <h3>Signoff Status</h3>
-<div id="dash-by-arch" class="dash-stats box">
-
- <h3 class="dash-stats" style="cursor: pointer"
- title="Click to toggle stats by architecture">
- Stats by Architecture <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-arch" class="results dash-stats">
+ <table id="dash-signoffs" class="results">
<thead>
<tr>
- <th class="key">Arch</th>
- <th># Packages</th>
- <th># Flagged</th>
+ <th>Name</th>
+ <th>Version</th>
+ <th>Arch</th>
+ <th>Target Repo</th>
+ <th>Last Updated</th>
+ <th>Approved</th>
+ <th>Signoffs</th>
</tr>
</thead>
<tbody>
- {% for arch in arches %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ arch.name }}</td>
- <td><a href="/packages/?arch={{ arch.name }}"
- title="View all packages for the {{ arch.name }} architecture">
- <strong>{{ arch.packages.count }}</strong> packages</a></td>
- <td><a href="/packages/?arch={{ arch.name }}&amp;flagged=Flagged"
- title="View all flagged packages for the {{ arch.name }} architecture">
- <strong>{{ arch.packages.flagged.count }}</strong> packages</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-
-</div><!-- #dash-by-arch -->
-
-<div id="dash-by-repo" class="dash-stats box">
-
- <h3 class="dashboard dash-stats" style="cursor: pointer"
- title="Click to toggle stats by repository">
- Stats by Repository <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-repo" class="results dash-stats">
- <thead>
- <tr>
- <th class="key">Repository</th>
- <th># Packages</th>
- <th># Flagged</th>
+ {% for group in signoffs %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{% pkg_details_link group.package %}</td>
+ <td>{{ group.version }}</td>
+ <td>{{ group.arch.name }}</td>
+ <td>{{ group.target_repo }}</td>
+ <td>{{ group.last_update|date }}</td>
+ {% if group.specification.known_bad %}
+ <td class="approval signoff-bad">Bad</td>
+ {% else %}
+ {% if not group.specification.enabled %}
+ <td class="approval signoff-disabled">Disabled</td>
+ {% else %}
+ <td class="approval signoff-{{ group.approved|yesno }}">{{ group.approved|yesno|capfirst }}</td>
+ {% endif %}
+ {% endif %}
+ <td><ul class="signoff-list">
+ {% for signoff in group.signoffs %}
+ <li class="signed-username" title="Signed off by {{ signoff.user }}">{{ signoff.user }}{% if signoff.revoked %} (revoked){% endif %}</li>
+ {% endfor %}
+ </ul></td>
</tr>
- </thead>
- <tbody>
- {% for repo in repos %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ repo.name }}</td>
- <td><a href="/packages/?repo={{ repo.name }}"
- title="View all packages in the {{ repo.name }} repository">
- <strong>{{ repo.packages.count }}</strong> packages</a></td>
- <td><a href="/packages/?repo={{ repo.name }}&amp;flagged=Flagged"
- title="View all flagged packages in the {{ repo.name }} repository">
- <strong>{{ repo.packages.flagged.count }}</strong> packages</a></td>
- </tr>
+ {% empty %}
+ <tr class="empty"><td colspan="7"><em>No packages you maintain or have packaged need signoffs</em></td></tr>
{% endfor %}
</tbody>
</table>
-</div><!-- dash-by-arch -->
-
-<div id="dash-by-maintainer" class="dash-stats box">
-
- <h3 class="dashboard dash-stats" style="cursor: pointer"
- title="Click to toggle stats by maintainer">
- Stats by Maintainer <span class="dash-click">(click to toggle)</span></h3>
-
- <table id="stats-by-maintainer" class="results dash-stats">
- <thead>
- <tr>
- <th class="key">Maintainer</th>
- <th># Packages</th>
- <th># Flagged</th>
- </tr>
- </thead>
- <tbody>
- {% for maint in maintainers %}
- <tr class="{% cycle 'odd' 'even' %}">
- <td>{{ maint.get_full_name }}</td>
- <td><a href="/packages/?maintainer={{ maint.username }}"
- title="View all packages maintained by {{ maint.get_full_name }}">
- <strong>{{ maint.package_count }}</strong> packages</a></td>
- <td><a href="/packages/?maintainer={{ maint.username }}&amp;flagged=Flagged"
- title="View all flagged packages maintained by {{ maint.get_full_name }}">
- <strong>{{ maint.flagged_count }}</strong> packages</a></td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
+ <h3>Developer Reports</h3>
+ <ul>
+ {% for report in reports %}
+ <li><a href="reports/{{ report.slug }}/">{{ report.name }}</a>:
+ {{ report.description }}
+ {% if report.personal %}(<a href="reports/{{ report.slug }}/{{ user.username }}/">yours only</a>){% endif %}</li>
+ {% endfor %}
+ </ul>
+</div>{# #dev-dashboard #}
+
+<div id="stats-area">
+ <div class="box">
+ <h2>Developer Stats</h2>
+ <p id="stats-message">Enable JavaScript to get more useful info here.</p>
+ </div>
+</div>
+{% endblock %}
-</div><!-- #dash-by-maintainer -->
-{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
<script type="text/javascript">
-$.tablesorter.addParser({
- id: 'pkgcount',
- is: function(s) { return false; },
- format: function(s) {
- var m = s.match(/\d+/);
- return m ? parseInt(m[0]) : 0;
- },
- type: 'numeric'
-});
$(document).ready(function() {
+ $("#stats-message").html('Loading developer stats…');
+ $("#stats-area").load('stats/', function(response, status, xhr) {
+ if (status === 'error' || status === 'timeout') {
+ $("#stats-message").html('Developer stats loading encountered an error. Sorry.');
+ return;
+ }
+ var settings = {
+ widgets: ['zebra'],
+ sortList: [[0,0]],
+ headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' }, 3: { sorter: 'pkgcount' } }
+ };
+
+ $(".dash-stats").not($("#stats-by-maintainer")).tablesorter(settings);
+ settings['sortLocaleCompare'] = true;
+ $("#stats-by-maintainer").tablesorter(settings);
+ });
+
$("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter(
{widgets: ['zebra'], sortList: [[0,0]]});
$("#dash-mytodolist:not(:has(tbody tr.empty))").tablesorter(
{widgets: ['zebra'], sortList: [[0,0], [1,0]]});
$("#dash-todo:not(:has(tbody tr.empty))").tablesorter(
{widgets: ['zebra'], sortList: [[1,1]]});
- $("#stats-by-arch").add("#stats-by-repo").add("#stats-by-maintainer").tablesorter(
- {widgets: ['zebra'], sortList: [[0,0]],
- headers: { 1: { sorter: 'pkgcount' }, 2: { sorter: 'pkgcount' } } });
- $("h3.dash-stats").click(
- function(e) { $(this).next().toggle(); }
- );
+ $("#dash-signoffs:not(:has(tbody tr.empty))").tablesorter({
+ widgets: ['zebra'],
+ sortList: [[0,0]],
+ headers: { 6: {sorter: false } }
+ });
});
</script>
{% endblock %}
diff --git a/templates/devel/new_account.txt b/templates/devel/new_account.txt
new file mode 100644
index 00000000..1159992a
--- /dev/null
+++ b/templates/devel/new_account.txt
@@ -0,0 +1,5 @@
+You can now log into https://{{ site.domain }}/login/ with these login details:
+Username: {{ user.username }}
+Password: {{ password }}
+
+Please update your profile once logged in and change your password.
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
new file mode 100644
index 00000000..63dd91aa
--- /dev/null
+++ b/templates/devel/packages.html
@@ -0,0 +1,98 @@
+{% extends "base.html" %}
+{% load cycle from future %}
+{% load static from staticfiles %}
+{% load attributes %}
+{% load package_extras %}
+
+{% block title %}{{ BRANDING_DISTRONAME }} - {{ title }}{% endblock %}
+
+{% block content %}
+<div class="box">
+ <h2>{{ title }}{% if maintainer %},
+ maintained by {{ maintainer.get_full_name }}{% endif%}</h2>
+ <p>{{ packages|length }} package{{ packages|pluralize }} found.
+ {% if maintainer %}This report only includes packages maintained by
+ {{ maintainer.get_full_name }} ({{ maintainer.username }}).{% endif %}
+ </p>
+
+ <div class="box filter-criteria">
+ <h3>Filter Packages</h3>
+ <form id="report_filter" method="post" action=".">
+ <fieldset>
+ <legend>Select filter criteria</legend>
+ {% for arch in arches %}
+ <div><label for="id_arch_{{ arch.name }}" title="Architecture {{ arch.name }}">Arch {{ arch.name }}</label>
+ <input type="checkbox" name="arch_{{ arch.name }}" id="id_arch_{{ arch.name }}" class="arch_filter" value="{{ arch.name }}" checked="checked"/></div>
+ {% endfor %}
+ {% for repo in repos %}
+ <div><label for="id_repo_{{ repo.name|lower }}" title="Target Repository {{ repo.name }}">[{{ repo.name|lower }}]</label>
+ <input type="checkbox" name="repo_{{ repo.name|lower }}" id="id_repo_{{ repo.name|lower }}" class="repo_filter" value="{{ repo.name|lower }}" checked="checked"/></div>
+ {% endfor %}
+ <div ><label>&nbsp;</label><input title="Reset search criteria" type="button" id="criteria_reset" value="Reset"/></div>
+ <div class="clear"></div>
+ <div id="filter-info"><span id="filter-count">{{ packages|length }}</span> packages displayed.</div>
+ </fieldset>
+ </form>
+ </div>
+
+ <table id="dev-report-results" class="results">
+ <thead>
+ <tr>
+ <th>Arch</th>
+ <th>Repo</th>
+ <th>Name</th>
+ <th>Version</th>
+ <th>Description</th>
+ <th>Last Updated</th>
+ <th>Build Date</th>
+ <th>Flag Date</th>
+ {% for name in column_names %}
+ <th>{{ name }}</th>
+ {% endfor %}
+ </tr>
+ </thead>
+ <tbody>
+ {% for pkg in packages %}
+ <tr class="{% cycle pkgr2,pkgr1 %} {{ pkg.arch.name }} {{ pkg.repo.name|lower }}">
+ <td>{{ pkg.arch.name }}</td>
+ <td>{{ pkg.repo.name|capfirst }}</td>
+ <td>{% pkg_details_link pkg %}</td>
+ {% if pkg.flag_date %}
+ <td><span class="flagged">{{ pkg.full_version }}</span></td>
+ {% else %}
+ <td>{{ pkg.full_version }}</td>
+ {% endif %}
+ <td class="wrap">{{ pkg.pkgdesc }}</td>
+ <td>{{ pkg.last_update|date }}</td>
+ <td>{{ pkg.build_date|date }}</td>
+ <td>{{ pkg.flag_date|date }}</td>
+ {% for attr in column_attrs %}
+ <td>{{ pkg|attribute:attr }}</td>
+ {% endfor %}
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>
+{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}{% jquery_tablesorter %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript">
+$(document).ready(function() {
+ $(".results").tablesorter({widgets: ['zebra']});
+});
+$(document).ready(function() {
+ var filter_func = function() {
+ filter_pkgs_list('#report_filter', '#dev-report-results tbody');
+ filter_report_save('{{ report.slug }}');
+ };
+ $('#report_filter input').change(filter_func);
+ $('#criteria_reset').click(function() { filter_pkgs_reset(filter_func); });
+ // run on page load to ensure current form selections take effect
+ filter_report_load('{{ report.slug }}');
+ filter_func();
+});
+</script>
+{% endblock %}
diff --git a/templates/devel/profile.html b/templates/devel/profile.html
index 0dde9349..dff5d925 100644
--- a/templates/devel/profile.html
+++ b/templates/devel/profile.html
@@ -1,18 +1,41 @@
{% extends "base.html" %}
-{% block title %}Arch Linux - Edit Profile{% endblock %}
+{% load static from staticfiles %}
+
+{% block title %}{{ BRANDING_DISTRONAME }} - Edit Profile{% endblock %}
{% block content %}
<div id="dev-edit-profile" class="box">
<h2>Developer Profile</h2>
- <form id="edit-profile-form" method="post">{% csrf_token %}
+ <form id="edit-profile-form" enctype="multipart/form-data" method="post" action="">{% csrf_token %}
+ <p><em>Note:</em> This is the public information shown on the developer
+ and/or TU profiles page, so please be appropriate with the information
+ you provide here.</p>
<fieldset>
- <legend>Username: <strong>{{ user.username }}</strong></legend>
+ <p><label>Username:</label>
+ <strong>{{ user.username }}</strong></p>
{{ form.as_p }}
</fieldset>
+ <fieldset>
+ {{ profile_form.as_p }}
+ </fieldset>
<p><label></label> <input title="Save changes" type="submit" value="Save" /></p>
</form>
</div>
{% endblock %}
+
+{% block script_block %}
+{% load cdn %}{% jquery %}
+<script type="text/javascript" src="{% static "archweb.js" %}"></script>
+<script type="text/javascript">
+ modify_attributes({
+ '#id_email': {type: 'email'},
+ '#id_alias': {autocorrect: 'off', autocapitalize: 'off'},
+ '#id_public_email': {autocorrect: 'off', autocapitalize: 'off'},
+ '#id_website': {type: 'url'},
+ '#id_yob': {pattern: '[0-9]*'}
+ });
+</script>
+{% endblock %}
diff --git a/templates/devel/stats.html b/templates/devel/stats.html
new file mode 100644
index 00000000..9b3b1d28
--- /dev/null
+++ b/templates/devel/stats.html
@@ -0,0 +1,121 @@
+{% load cycle from future %}
+{% load cache %}
+
+{% cache 60 dev-dash-by-arch %}
+<div id="dash-by-arch" class="box">
+
+ <h2>Stats by Architecture</h2>
+
+ <table id="stats-by-arch" class="results dash-stats">
+ <thead>
+ <tr>
+ <th class="key">Arch</th>
+ <th># Packages</th>
+ <th># Flagged</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for arch in arches %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ arch.name }}</td>
+ <td><a href="/packages/?arch={{ arch.name }}"
+ title="View all packages for the {{ arch.name }} architecture">
+ <strong>{{ arch.total_ct }}</strong> packages</a></td>
+ <td><a href="/packages/?arch={{ arch.name }}&amp;flagged=Flagged"
+ title="View all flagged packages for the {{ arch.name }} architecture">
+ <strong>{{ arch.flagged_ct }}</strong> packages</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>{# #dash-by-arch #}
+{% endcache %}
+
+{% cache 60 dev-dash-by-repo %}
+<div id="dash-by-repo" class="box">
+
+ <h2>Stats by Repository</h2>
+
+ <table id="stats-by-repo" class="results dash-stats">
+ <thead>
+ <tr>
+ <th class="key">Repository</th>
+ <th># Packages</th>
+ <th># Flagged</th>
+ <th># Maintainers</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for repo in repos %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ repo.name }}</td>
+ <td><a href="/packages/?repo={{ repo.name }}"
+ title="View all packages in the {{ repo.name }} repository">
+ <strong>{{ repo.total_ct }}</strong> packages</a></td>
+ <td><a href="/packages/?repo={{ repo.name }}&amp;flagged=Flagged"
+ title="View all flagged packages in the {{ repo.name }} repository">
+ <strong>{{ repo.flagged_ct }}</strong> packages</a></td>
+ <td><strong>{{ repo.maintainer_ct }}</strong> maintainers</td>
+ </tr>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>{# dash-by-arch #}
+{% endcache %}
+
+{% cache 60 dev-dash-by-developer %}
+<div id="dash-by-developer" class="box">
+
+ <h2>Stats by Developer</h2>
+
+ {% if perms.main.change_package %}
+ <p><a href="/packages/stale_relations/">Look for stale relations</a></p>
+ {% endif %}
+
+ <table id="stats-by-maintainer" class="results dash-stats">
+ <thead>
+ <tr>
+ <th class="key">Maintainer</th>
+ <th># Maintained</th>
+ <th># Flagged</th>
+ <th># Last Packager</th>
+ </tr>
+ <tr class="even">
+ <td><em>Orphan/Unknown</em></td>
+ <td><a href="/packages/?maintainer=orphan"
+ title="View all orphan packages">
+ <strong>{{ orphan.package_count }}</strong> packages</a>
+ </td>
+ <td><a href="/packages/?maintainer=orphan&amp;flagged=Flagged"
+ title="View all flagged orphan packages">
+ <strong>{{ orphan.flagged_count }}</strong> packages</a>
+ </td>
+ <td><a href="/packages/?packager=unknown"
+ title="View all packages last updated by unknown">
+ <strong>{{ orphan.updated_count }}</strong> packages</a>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ {% for maint in maintainers %}
+ <tr class="{% cycle 'odd' 'even' %}">
+ <td>{{ maint.get_full_name }}</td>
+ <td><a href="/packages/?maintainer={{ maint.username }}"
+ title="View all packages maintained by {{ maint.get_full_name }}">
+ <strong>{{ maint.package_count }}</strong> packages</a>
+ </td>
+ <td><a href="/packages/?maintainer={{ maint.username }}&amp;flagged=Flagged"
+ title="View all flagged packages maintained by {{ maint.get_full_name }}">
+ <strong>{{ maint.flagged_count }}</strong> packages</a>
+ </td>
+ <td><a href="/packages/?packager={{ maint.username }}"
+ title="View all packages last updated by {{ maint.get_full_name }}">
+ <strong>{{ maint.updated_count }}</strong> packages</a>
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+</div>{# #dash-by-developer #}
+{% endcache %}