aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 15:58:01 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 16:55:23 +0000
commit93be8b11720c184092d1b270816ff00e6e698a8c (patch)
treeb2aedaea6faef293214cf010bffdefaf7494f3e5 /templates
parent5308e03c9e090591ca14c66daa0d959dc9993bd8 (diff)
downloadopenembedded-core-contrib-93be8b11720c184092d1b270816ff00e6e698a8c.tar.gz
Move all templates to a templates directory
This should allow the templates to be found and swapped out more easily. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html26
-rw-r--r--templates/500.html11
-rw-r--r--templates/admin/base_site.html5
-rw-r--r--templates/base.html106
-rw-r--r--templates/layerindex/about.html50
-rw-r--r--templates/layerindex/deleteconfirm.html34
-rw-r--r--templates/layerindex/detail.html295
-rw-r--r--templates/layerindex/editlayer.html269
-rw-r--r--templates/layerindex/editlayernote.html42
-rw-r--r--templates/layerindex/index.html148
-rw-r--r--templates/layerindex/machines.html77
-rw-r--r--templates/layerindex/rawrecipes.txt2
-rw-r--r--templates/layerindex/recipedetail.html92
-rw-r--r--templates/layerindex/recipes.html79
-rw-r--r--templates/layerindex/submitemail.txt7
-rw-r--r--templates/layerindex/submitlayer.html36
-rw-r--r--templates/layerindex/submitthanks.html26
-rw-r--r--templates/pagination.html57
-rw-r--r--templates/registration/activate.html18
-rw-r--r--templates/registration/activation_email.txt12
-rw-r--r--templates/registration/activation_email_subject.txt1
-rw-r--r--templates/registration/login.html24
-rw-r--r--templates/registration/logout.html6
-rw-r--r--templates/registration/password_change_done.html6
-rw-r--r--templates/registration/password_change_form.html10
-rw-r--r--templates/registration/password_reset_complete.html10
-rw-r--r--templates/registration/password_reset_confirm.html29
-rw-r--r--templates/registration/password_reset_done.html6
-rw-r--r--templates/registration/password_reset_email.html5
-rw-r--r--templates/registration/password_reset_form.html19
-rw-r--r--templates/registration/registration_complete.html6
-rw-r--r--templates/registration/registration_form.html20
32 files changed, 1534 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
new file mode 100644
index 0000000000..6c1c1ce432
--- /dev/null
+++ b/templates/404.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - 404 page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - page not found{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+<p>The page you requested was not found.</p>
+
+<p><a href="{% url layer_list %}">Return to the index</a></p>
+
+{% endautoescape %}
+{% endblock %} \ No newline at end of file
diff --git a/templates/500.html b/templates/500.html
new file mode 100644
index 0000000000..0f2f44818a
--- /dev/null
+++ b/templates/500.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+<title>Internal server error</title>
+</head>
+
+<body>
+<h1>Internal server error</h1>
+
+<p>Something went wrong. The error has been logged, please check back later.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/templates/admin/base_site.html b/templates/admin/base_site.html
new file mode 100644
index 0000000000..0fcc54e62e
--- /dev/null
+++ b/templates/admin/base_site.html
@@ -0,0 +1,5 @@
+{% extends "admin/base.html" %}
+{% block branding %}
+<h1 id="site-name">OpenEmbedded Metadata Index Admin</h1>
+{% endblock %}
+
diff --git a/templates/base.html b/templates/base.html
new file mode 100644
index 0000000000..1989dd44ef
--- /dev/null
+++ b/templates/base.html
@@ -0,0 +1,106 @@
+{% comment %}
+
+ layerindex-web - base template for output pages
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+{% load i18n %}
+{% load staticfiles %}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <link rel="stylesheet" href="{% static "css/bootstrap.css" %}" />
+ <link rel="stylesheet" href="{% static "css/bootstrap-responsive.css" %}" />
+ <link rel="stylesheet" href="{% static "css/additional.css" %}" />
+ <link rel="icon" type="image/vnd.microsoft.icon" href="{% static "img/favicon.ico" %}" />
+ <title>{% block title %}OpenEmbedded metadata index{% endblock %}</title>
+</head>
+
+<body>
+ {% block header %}
+ {% autoescape on %}
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="brand" href="{% url layer_list %}">OpenEmbedded metadata index</a>
+
+ <ul class="nav">
+ {% block branch_selector %}
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ Branch: <b>{{ current_branch }}</b>
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ {% for branch in all_branches %}
+ {% if branch.name = current_branch %}
+ <li><a href="{% url switch_branch branch.name %}"><b>{{ branch.name }}</b></a></li>
+ {% else %}
+ <li><a href="{% url switch_branch branch.name %}">{{ branch.name }}</a></li>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+ {% endblock %}
+ </ul>
+ <ul class="nav pull-right">
+ {% block submitlink %}<li><a href="{% url submit_layer %}">Submit layer</a></li>{% endblock %}
+ {% if user.is_authenticated %}
+ {% if perms.layeritem.publish_layer %}
+ <li><a href="{% url layer_list_review %}">
+ Review
+ {% if unpublished_count > 0 %}
+ <span class="badge badge-warning">{{ unpublished_count }}</span>
+ {% endif %}
+ </a></li>
+ {% endif %}
+ <li class="divider-vertical"></li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown">
+ {{ user.username }}
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a href="{% url auth_logout %}">{% trans "Log out" %}</a></li>
+ <li><a href="{% url auth_password_change %}">{% trans "Change password" %}</a></li>
+ </ul>
+ </li>
+ {% else %}
+ <li>
+ <a href="{% url auth_login %}">{% trans "log in" %}</a>
+ </li>
+ {% endif %}
+ </ul>
+ </div> <!-- end of "container" -->
+ </div> <!-- "end of "navbar-inner" -->
+ </div> <!-- end of "navbar" -->
+ {% endautoescape %}
+ {% endblock %}
+
+ <div id="content" class="container top-padded">
+ {% block content %}{% endblock %}
+ </div>
+
+ <div id="footer">
+ {% block footer %}
+ <hr />
+ <div class="footer">
+ <a href="{% url about %}">about this site</a>
+ </div>
+
+ {% endblock %}
+ </div>
+
+ <script src="{% static "js/jquery-1.7.2.js" %}"></script>
+ <script src="{% static "js/bootstrap.js" %}"></script>
+{% block scripts %}
+{% endblock %}
+
+</body>
+</html>
diff --git a/templates/layerindex/about.html b/templates/layerindex/about.html
new file mode 100644
index 0000000000..401df745dd
--- /dev/null
+++ b/templates/layerindex/about.html
@@ -0,0 +1,50 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+<!--
+{% block title %}OpenEmbedded metadata index - About{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+<h2>About</h2>
+
+<p>This website indexes layers for the <a href="http://www.openembedded.org">OpenEmbedded</a> build system, suitable for use on top of OpenEmbedded-Core and distributions based upon it, providing additional recipes, machine support and/or distro policy configuration.</p>
+
+<p>If you have a layer for use with OpenEmbedded that you wish to share with others, please <a href="{% url submit_layer %}">submit it</a>!</p>
+
+<h2>Technologies</h2>
+
+<p>This website makes use of the following technologies/components:</p>
+<ul>
+<li><a href="http://www.python.org/">Python</a></li>
+<li><a href="http://www.djangoproject.com/">Django</a> as well as the following Django modules:
+ <ul>
+ <li><a href="http://bitbucket.org/ubernostrum/django-registration/">django-registration</a></li>
+ <li><a href="http://github.com/etianen/django-reversion">django-reversion</a></li>
+ <li><a href="http://pypi.python.org/pypi/django-reversion-compare/">django-reversion-compare</a></li>
+ <li><a href="http://github.com/mbi/django-simple-captcha">django-simple-captcha</a></li>
+ </ul>
+</li>
+<li><a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap</a></li>
+<li><a href="http://glyphicons.com/">Glyphicons</a> (via Bootstrap)</li>
+<li><a href="http://jquery.com/">jQuery</a> (via Bootstrap)</li>
+<li><a href="http://www.openembedded.org/wiki/BitBake_%28user%29">BitBake</a></li>
+</ul>
+
+<h2>Credits</h2>
+
+<p>This application was created for OpenEmbedded by the <a href="http://www.yoctoproject.org">Yocto Project</a>. Individual contributors:</p>
+
+<ul>
+<li>Paul Eggleton</li>
+<li>Belen Barros Pena</li>
+</ul>
+
+<p>The code is Open Source and can be found on <a href="http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/">git.yoctoproject.org</a>. Patches welcome!</p>
+
+{% endautoescape %}
+{% endblock %}
+
+{% block footer %}
+{% endblock %}
diff --git a/templates/layerindex/deleteconfirm.html b/templates/layerindex/deleteconfirm.html
new file mode 100644
index 0000000000..341b91fcd6
--- /dev/null
+++ b/templates/layerindex/deleteconfirm.html
@@ -0,0 +1,34 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - delete confirmation template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+<!--
+{% autoescape on %}
+{% block title %}OpenEmbedded metadata index - delete {{ object_type }}{% endblock %}
+{% endautoescape %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+<h2>Delete {{ object_type }}</h2>
+
+<p>Are you sure you want to delete &quot;{{ object }}&quot;?</p>
+
+<form action="" method="post">
+ {% csrf_token %}
+ <input type="submit" value="Delete" class='btn btn-warning' />
+ <a href="{{ return_url }}" class='btn'>Cancel</a>
+</form>
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html
new file mode 100644
index 0000000000..b779e949d1
--- /dev/null
+++ b/templates/layerindex/detail.html
@@ -0,0 +1,295 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load static %}
+
+{% comment %}
+
+ layerindex-web - layer detail page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% autoescape on %}
+{% block title %}OpenEmbedded metadata index - {{ layeritem.name }}{% endblock %}
+{% endautoescape %}
+-->
+
+{% block content %}
+
+{% autoescape on %}
+
+
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="page-header">
+ <h1>{{ layeritem.name }}
+ {% if layeritem.status = "N" %}
+ <span class="label label-warning">Unpublished</span>
+ {% endif %}
+ {% if user.is_authenticated %}
+ <span class="pull-right">
+ {% if perms.layeritem.publish_layer or useredit %}
+ <a href="{% url edit_layer layeritem.name %}" class="btn">Edit layer</a>
+ {% if layeritem.layernote_set.count = 0 %}
+ <a href="{% url add_layernote layeritem.name %}" class="btn">Add note</a>
+ {% endif %}
+ {% endif %}
+ {% if layeritem.status = "N" and perms.layeritem.publish_layer %}
+ <a href="{% url delete_layer layeritem.name %}" class="btn btn-warning">Delete layer</a>
+ <a href="{% url publish layeritem.name %}" class="btn btn-primary">Publish layer</a>
+ {% endif %}
+ </span>
+ {% endif %}
+ </h1>
+ </div>
+ </div> <!-- end of row-fluid -->
+ </div> <!-- end of container-fluid -->
+
+ <div class="container-fluid">
+ {% if not layerbranch %}
+ <div class="row-fluid">
+ <div class="alert alert-error">
+ This layer does not exist for branch {{ current_branch }}.
+ </div>
+ </div>
+ {% endif %}
+ <div class="row-fluid">
+ {% for note in layeritem.layernote_set.all %}
+ <div class="alert">
+ <p>{{ note.text }}</p>
+ {% if perms.layeritem.publish_layer or useredit %}
+ <p>
+ <a href="{% url edit_layernote layeritem.name note.pk %}" class="btn">Edit note</a>
+ <a href="{% url delete_layernote layeritem.name note.pk %}" class='btn'>Delete note</a>
+ </p>
+ {% endif %}
+ </div>
+ {% endfor %}
+ </div>
+
+ <div class="row-fluid">
+ <div class="description span7">
+ <p>
+ {{ layeritem.description }}
+ </p>
+ <p>
+ {% if layeritem.usage_url %}
+ <span class="label label-info">
+ <a href="{{ layerbranch.get_usage_url }}">Setup information</a>
+ </span>
+ {% endif %}
+ {% if layeritem.mailing_list_url %}
+ <span class="label label-info">
+ <a href="{{ layeritem.mailing_list_url }}">Mailing list</a>
+ </span>
+ {% endif %}
+ </p>
+
+ <h3>Git repository</h3>
+
+ <p><span data-toggle="tooltip" title="Select URL"><i class="icon-circle-arrow-right selectallicon" for="vcs_url" id="vcs_url_select"></i></span><span id="vcs_url" class="copyable">{{ layeritem.vcs_url }}</span>
+ {% if layeritem.vcs_web_url %}
+ <span class="label label-info">
+ <a href="{{ layeritem.vcs_web_url }}">web repo</a>
+ </span>
+ {% endif %}
+ </p>
+
+ {% if layeritem.vcs_subdir %}
+ <h4>Subdirectory</h4>
+ <p><span data-toggle="tooltip" title="Select subdirectory"><i class="icon-circle-arrow-right selectallicon" for="vcs_subdir" id="vcs_subdir_select"></i></span><span id="vcs_subdir" class="copyable">{{ layeritem.vcs_subdir }}</span>
+ {% if layerbranch.tree_url %}
+ <span class="label label-info">
+ <a href="{{ layerbranch.tree_url }}">web subdirectory</a>
+ </span>
+ {% endif %}
+ </p>
+ {% endif %}
+
+ {% if layerbranch.vcs_last_commit %}
+ <p>
+ <span class="muted"><small>Last commit: {{ layerbranch.vcs_last_commit|timesince }} ago</small></span>
+ </p>
+ {% endif %}
+
+ {% if layerbranch.active_maintainers.count > 0 %}
+ <h3>{% if layerbranch.active_maintainers|length = 1 %}Maintainer{% else %}Maintainers{% endif %}</h3>
+
+ <ul>
+ {% for maintainer in layerbranch.active_maintainers %}
+ <li>
+ {{ maintainer.name }}
+ {% if maintainer.responsibility %}
+ <span>({{ maintainer.responsibility }})</span>
+ {% endif %}
+
+ <span class="label label-info">
+ <a href="mailto:{{ maintainer.email }}">email</a>
+ </span>
+ </li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+
+ </div> <!-- end of span7 -->
+
+ <div class="span4 pull-right description">
+ {% if layerbranch.dependencies_set.count > 0 %}
+ <div class="well dependency-well">
+ <h3>Dependencies </h3>
+ <p>The {{ layeritem.name }} layer depends upon:</p>
+ <ul>
+ {% for dep in layerbranch.dependencies_set.all %}
+ <li><a href="{% url layer_item dep.dependency.name %}">{{ dep.dependency.name }}</a></li>
+ {% endfor %}
+ </ul>
+ </div> <!-- end of well -->
+ {% endif %}
+
+ </div> <!-- end of span4 -->
+ </div> <!-- end of row-fluid -->
+ </div> <!-- end of container-fluid -->
+
+ {% if layeritem.status = 'N' and layerbranch %}
+ <div class="container-fluid" style="margin-bottom:1em;">
+ {% if layeritem.vcs_web_file_base_url %}
+ <span class="label label-important">
+ <a href="{{ layerbranch.test_file_url }}">test file link</a>
+ </span>
+ {% else %}
+ <span class="label">
+ No base file URL provided
+ </span>
+ {% endif %}
+ {% if layeritem.vcs_web_tree_base_url %}
+ <span class="label label-important">
+ <a href="{{ layerbranch.test_tree_url }}">test tree link</a>
+ </span>
+ {% else %}
+ <span class="label">
+ No base tree URL provided
+ </span>
+ {% endif %}
+ </div>
+ {% else %}
+ {% if layerbranch.machine_set.count > 0 %}
+ <div class="container-fluid" style="margin-bottom:1em;">
+ <div class="row-fluid">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <a class="brand pull-left">{{ layeritem.name }} machines</a>
+ </div>
+ </div>
+
+ <table class="table table-bordered">
+ <tbody>
+ {% for machine in layerbranch.machine_set.all %}
+ <tr>
+ <td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td>
+ <td>{{ machine.description }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+
+ {% if layerbranch.recipe_set.count > 0 %}
+ <div class="container-fluid" style="margin-bottom:1em;">
+ <div class="row-fluid">
+ <div class="navbar">
+ <div class="navbar-inner">
+ <a class="brand pull-left">{{ layeritem.name }} recipes</a>
+
+ <ul class="nav pull-right">
+ <li>
+ <form action="" class="navbar-search pull-right" id="filter-form">
+ <input type="text" placeholder="Search recipes" class="search-query" id="filter">
+ </form>
+ </li>
+ </ul>
+
+ </div>
+
+ </div>
+
+ <table class="table table-bordered recipestable">
+ <thead>
+ <tr>
+ <th>Recipe name</th>
+ <th>Version</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for recipe in layerbranch.sorted_recipes %}
+ <tr>
+ <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td>
+ <td>{{ recipe.pv }}</td>
+ <td class="span8">{{ recipe.short_desc }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% endif %}
+ {% endif %}
+
+{% endautoescape %}
+
+{% endblock %}
+
+
+
+
+{% block scripts %}
+ <script src="{% static "js/uitablefilter.js" %}"></script>
+
+ <script>
+ // selectText plugin Borrowed from http://jsfiddle.net/edelman/KcX6A/1506/
+ jQuery.fn.selectText = function() {
+ var doc = document
+ , element = this[0]
+ , range, selection
+ ;
+ if (doc.body.createTextRange) {
+ range = document.body.createTextRange();
+ range.moveToElementText(element);
+ range.select();
+ } else if (window.getSelection) {
+ selection = window.getSelection();
+ range = document.createRange();
+ range.selectNodeContents(element);
+ selection.removeAllRanges();
+ selection.addRange(range);
+ }
+ };
+
+ $(document).ready(function() {
+
+ $(function() {
+ var theTable = $('table.recipestable');
+
+ $("#filter").keyup(function() {
+ $.uiTableFilter( theTable, this.value );
+ })
+
+ $('#filter-form').submit(function(){
+ theTable.find("tbody > tr:visible > td:eq(1)").mousedown();
+ return false;
+ }).focus(); //Give focus to input field
+
+ $('.selectallicon').mouseup(function() {
+ $('#' + $(this).attr('for')).selectText();
+ });
+ });
+ });
+ </script>
+{% endblock %}
+
diff --git a/templates/layerindex/editlayer.html b/templates/layerindex/editlayer.html
new file mode 100644
index 0000000000..9c65c84ffc
--- /dev/null
+++ b/templates/layerindex/editlayer.html
@@ -0,0 +1,269 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - layer editing form page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+<!--
+{% block title %}OpenEmbedded metadata index - edit layer{% endblock %}
+-->
+
+{% block submitlink %}
+<!-- Remove submit link added by base.html, otherwise clicking it may lose changes -->
+{% endblock %}
+
+
+{% block content %}
+{% autoescape on %}
+
+<div class="container-fluid">
+ <div class="row-fluid">
+ {% block heading %}
+ <div class="page-header">
+ <h1>Edit layer</h1>
+ </div>
+ {% endblock %}
+
+{% block formtop %}
+{% if form.was_saved %}
+ <div class="alert alert-success">
+ Changes saved successfully.
+ </div>
+{% endif %}
+{% endblock %}
+<form id="edit_layer_form" method="post">
+{% csrf_token %}
+ {% for hidden in form.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+
+ <div class="formfields">
+ {% for field in form.visible_fields %}
+ {% if field.name != 'captcha' %}
+ {% if field.errors %}
+ <div class="control-group alert alert-error">
+ {{ field.errors }}
+ {% else %}
+ <div class="control-group">
+ {% endif %}
+ <div class="control-label">
+ {{ field.label_tag }}
+ </div>
+ <div class="controls">
+ {% if field.name = 'deps' %}
+ <div class="scrolling">
+ <table><tbody>
+ {% for deplayer in deplistlayers %}
+ {% if deplayer.id in form.checked_deps %}
+ <tr>
+ <td><input type="checkbox" name="deps" value="{{ deplayer.id }}" id="id_deps_{{forloop.counter}}" checked="checked" /></td>
+ {% if deplayer.status = 'N' %}
+ <td><label class="muted" for="id_deps_{{forloop.counter}}">{{ deplayer.name }} (unpublished)</label></td>
+ {% else %}
+ <td><label for="id_deps_{{forloop.counter}}">{{ deplayer.name }}</label></td>
+ {% endif %}
+ </tr>
+ {% endif %}
+ {% endfor %}
+ {% for deplayer in deplistlayers %}
+ {% if not deplayer.id in form.checked_deps %}
+ <tr>
+ <td><input type="checkbox" name="deps" value="{{ deplayer.id }}" id="id_deps_{{forloop.counter}}" /></td>
+ {% if deplayer.status = 'N' %}
+ <td><label class="muted" for="id_deps_{{forloop.counter}}">{{ deplayer.name }} (unpublished)</label></td>
+ {% else %}
+ <td><label for="id_deps_{{forloop.counter}}">{{ deplayer.name }}</label></td>
+ {% endif %}
+ </tr>
+ {% endif %}
+ {% endfor %}
+ </tbody></table>
+ </div>
+ {% else %}
+ {{ field }}
+ {% endif %}
+ <span class="help-inline custom-help">
+ {{ field.help_text }}
+ </span>
+ </div>
+ </div>
+ {% endif %}
+ {% endfor %}
+ </div>
+ <h3 id="maintainers">Maintainers</h3>
+ {{ maintainerformset.non_form_errors }}
+ {{ maintainerformset.management_form }}
+ {% for maintainerform in maintainerformset %}
+ <div class="maintainerform" id="maintainerform-{{forloop.counter0}}">
+ <h4>Maintainer {{forloop.counter}}</h4>
+ <div class="maintainerformfields">
+ {% for hidden in maintainerform.hidden_fields %}
+ {{ hidden }}
+ {% endfor %}
+
+ {% for field in maintainerform.visible_fields %}
+ {% if field.errors %}
+ <div class="control-group alert alert-error">
+ {{ field.errors }}
+ {% else %}
+ <div class="control-group">
+ {% endif %}
+ <div class="control-label">
+ {{ field.label_tag }}
+ </div>
+ <div class="controls">
+ {{ field }}
+ <span class="help-inline custom-help">
+ {{ field.help_text }}
+ </span>
+ </div>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ {% endfor %}
+ <p><a href="#" class="btn btn-small" id="addanothermaintainer"><i class="icon-plus"></i>Add maintainer</a><p>
+
+
+ {% if form.captcha %}
+ <div class="captchafield">
+ <h3>Verification</h3>
+ {% if form.captcha.errors %}
+ <div class="control-group alert alert-error">
+ {{ form.captcha.errors }}
+ {% else %}
+ <div class="control-group">
+ {% endif %}
+ <div class="controls">
+ {{ form.captcha }}
+ <span class="help-inline custom-help">
+ {{ form.captcha.help_text }}
+ </span>
+ </div>
+ </div>
+ </div>
+ {% endif %}
+
+<div class="submitbuttons">
+{% block submitbuttons %}
+<input type="submit" value="Save layer" class="btn btn-primary btn-large" />
+{% endblock %}
+</div>
+</form>
+
+ </div>
+</div>
+
+{% endautoescape %}
+
+{% endblock %}
+
+{% block scripts %}
+<script>
+ if (typeof String.prototype.startsWith != 'function') {
+ String.prototype.startsWith = function (str){
+ return this.slice(0, str.length) == str;
+ };
+ }
+
+ auto_web_fields = function (e) {
+ repoval = $('#id_vcs_url').val()
+ if( repoval[repoval.length-1] == '/' )
+ repoval = repoval.slice(0, repoval.length-1)
+
+ if( repoval.startsWith('git://git.openembedded.org/') ) {
+ reponame = repoval.replace(/^.*\//, '')
+ $('#id_vcs_web_url').val('http://cgit.openembedded.org/cgit.cgi/' + reponame)
+ $('#id_vcs_web_tree_base_url').val('http://cgit.openembedded.org/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%')
+ $('#id_vcs_web_file_base_url').val('http://cgit.openembedded.org/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%')
+ }
+ else if( repoval.indexOf('git.yoctoproject.org/') > -1 ) {
+ reponame = repoval.replace(/^.*\//, '')
+ $('#id_vcs_web_url').val('http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame)
+ $('#id_vcs_web_tree_base_url').val('http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%')
+ $('#id_vcs_web_file_base_url').val('http://git.yoctoproject.org/cgit/cgit.cgi/' + reponame + '/tree/%path%?h=%branch%')
+ }
+ else if( repoval.indexOf('github.com/') > -1 ) {
+ reponame = repoval.replace(/^.*github.com\//, '')
+ reponame = reponame.replace(/.git$/, '')
+ $('#id_vcs_web_url').val('http://github.com/' + reponame)
+ $('#id_vcs_web_tree_base_url').val('http://github.com/' + reponame + '/tree/%branch%/')
+ $('#id_vcs_web_file_base_url').val('http://github.com/' + reponame + '/blob/%branch%/')
+ }
+ else if( repoval.indexOf('gitorious.org/') > -1 ) {
+ reponame = repoval.replace(/^.*gitorious.org\//, '')
+ reponame = reponame.replace(/.git$/, '')
+ $('#id_vcs_web_url').val('http://gitorious.org/' + reponame)
+ $('#id_vcs_web_tree_base_url').val('http://gitorious.org/' + reponame + '/trees/%branch%/')
+ $('#id_vcs_web_file_base_url').val('http://gitorious.org/' + reponame + '/blobs/%branch%/')
+ }
+ else if( repoval.indexOf('bitbucket.org/') > -1 ) {
+ reponame = repoval.replace(/^.*bitbucket.org\//, '')
+ reponame = reponame.replace(/.git$/, '')
+ $('#id_vcs_web_url').val('http://bitbucket.org/' + reponame)
+ $('#id_vcs_web_tree_base_url').val('http://bitbucket.org/' + reponame + '/src/%branch%/%path%?at=%branch%')
+ $('#id_vcs_web_file_base_url').val('http://bitbucket.org/' + reponame + '/src/%branch%/%path%?at=%branch%')
+ }
+ };
+
+ split_email = function() {
+ // Split email name/email address pairs
+ name_input = $(this)
+ split_regex = /^"?([^"@$<>]+)"? *<([^<> ]+)>[ -]*(.*)?$/
+ matches = split_regex.exec(name_input.val())
+ if( matches ){
+ name_input.val($.trim(matches[1]))
+ email_id = name_input.attr('id').replace('-name', '-email')
+ $('#' + email_id).val($.trim(matches[2]))
+ resp_id = email_id.replace('-email', '-responsibility')
+ currval = $('#' + resp_id).val()
+ // Set the responsibility with the remainder of the value unless the user has entered a value for
+ // responsibility already
+ if( currval == window['last_' + resp_id] || currval == "" ) {
+ newval = $.trim(matches[3])
+ $('#' + resp_id).val(newval)
+ window['last_' + resp_id] = newval
+ }
+ }
+ }
+
+ expand_maintainer = function() {
+ for(i=0;i<{{ maintainerformset.total_form_count }};i++) {
+ maintbox = $('#maintainerform-' + i)
+ if( maintbox.is(':hidden') ) {
+ maintbox.slideToggle();
+ if( i == {{maintainerformset.total_form_count}} - 1 )
+ $('#addanothermaintainer').hide()
+ break
+ }
+ }
+ return false;
+ }
+
+ $(document).ready(function() {
+ $('.maintainerform').hide()
+
+ for(i=0;i<{{ maintainerformset.total_form_count }};i++) {
+ name_input = $('#id_layermaintainer_set-' + i + '-name')
+ name_input.change(split_email)
+ resp_id = 'id_layermaintainer_set-' + i + '-responsibility'
+ window['last_' + resp_id] = ""
+ if( i==0 || name_input.val() )
+ $('#maintainerform-' + i).show()
+ }
+ $('#addanothermaintainer').click(expand_maintainer)
+
+ $('#id_vcs_url').change(auto_web_fields)
+
+ firstfield = $("#edit_layer_form input:text, #edit_layer_form textarea").first();
+ if( ! firstfield.val() )
+ firstfield.focus()
+ });
+</script>
+{% endblock %}
diff --git a/templates/layerindex/editlayernote.html b/templates/layerindex/editlayernote.html
new file mode 100644
index 0000000000..4c823d9087
--- /dev/null
+++ b/templates/layerindex/editlayernote.html
@@ -0,0 +1,42 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - add/edit layer note form page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+<!--
+{% block title %}OpenEmbedded metadata index - {% if form.instance.pk %}add layer note{% else %}edit layer note{% endif %}{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+<h2>Add layer note to {{ form.instance.layer.name }}</h2>
+
+<p>This note will appear at the very top of the layer detail page. This would typically be used for important notices, e.g. &quot;This layer is obsolete, use layer xyz instead&quot;.</p>
+
+<form id="edit_layernote_form" method="post">
+ {% csrf_token %}
+ {{ form.as_p }}
+<input type="submit" value="Save" class='btn' />
+<a href="{% url layer_item form.instance.layer.name %}" class='btn'>Cancel</a>
+</form>
+
+{% endautoescape %}
+
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ $("#edit_layernote_form input:text, #edit_layernote_form textarea").first().focus();
+ });
+</script>
+{% endblock %}
diff --git a/templates/layerindex/index.html b/templates/layerindex/index.html
new file mode 100644
index 0000000000..08998130be
--- /dev/null
+++ b/templates/layerindex/index.html
@@ -0,0 +1,148 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% load static %}
+
+{% comment %}
+
+ layerindex-web - layer list page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - layers{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+{% if layerbranch_list %}
+ <div class="row-fluid">
+ <div class="span9 offset1">
+
+ <ul class="nav nav-tabs">
+ <li class="active"><a href="{% url layer_list %}">Layer index</a></li>
+ <li><a href="{% url recipe_search %}">Recipe index</a></li>
+ <li><a href="{% url machine_search %}">Machine index</a></li>
+ </ul>
+
+ <div class="row-fluid">
+ <div class="span5">
+ <form id="filter-form">
+ <input type="text" class="input-xxlarge" id="filter" placeholder="Search layers">
+ </form>
+ </div>
+
+ <div class="pull-right">
+ <div class="btn-group">
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+ Filter layers
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
+ {% for choice_id, choice_label in layer_type_choices %}
+ <li><a tabindex="-1" href="#">
+ <label class="checkbox">
+ <input type="checkbox" checked value="{{ choice_id }}">{{ choice_label }}
+ </label>
+ </a></li>
+ {% endfor %}
+
+ </ul>
+
+ </div>
+ </div>
+ </div>
+
+ <table class="table table-striped table-bordered layerstable">
+ <thead>
+ <tr>
+ <th>Layer name</th>
+ <th class="span4">Description</th>
+ <th>Type</th>
+ <th>Repository</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for layerbranch in layerbranch_list %}
+ <tr class="layertype_{{ layerbranch.layer.layer_type }}">
+ <td><a href="{% url layer_item layerbranch.layer.name %}">{{ layerbranch.layer.name }}</a></td>
+ <td>{{ layerbranch.layer.summary }}</td>
+ <td>{{ layerbranch.layer.get_layer_type_display }}</td>
+ <td class="showRollie">
+ {{ layerbranch.layer.vcs_url }}
+ {% if layerbranch.layer.vcs_web_url %}
+ <a class="rollie" href="{{ layerbranch.layer.vcs_web_url }}">
+ <span class="label label-info">
+ web repo
+ </span>
+ </a>
+ {% endif %}
+ {% if layerbranch.tree_url %}
+ <a class="rollie" href="{{ layerbranch.tree_url }}">
+ <span class="label label-info">
+ tree
+ </span>
+ </a>
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+ {% if is_paginated %}
+ {% load pagination %}
+ {% pagination page_obj %}
+ {% endif %}
+{% else %}
+ <p>No matching layers in database.</p>
+{% endif %}
+
+{% endautoescape %}
+
+{% endblock %}
+
+
+{% block scripts %}
+<script src="{% static "js/uitablefilter.js" %}"></script>
+
+<script>
+ $(document).ready(function() {
+ $("input:checkbox").change();
+
+ $("input:checkbox").change(function(){
+ var selectedType = $(this).val();
+ if($(this).is(":checked")){
+ $(".layertype_"+selectedType).show();
+ }
+ else{
+ $(".layertype_"+selectedType).hide();
+ }
+
+ });
+
+ $(function() {
+ var theTable = $('table.layerstable');
+
+ $("#filter").keyup(function() {
+ $.uiTableFilter( theTable, this.value );
+ })
+
+ $('#filter-form').submit(function(){
+ theTable.find("tbody > tr:visible > td:eq(1)").mousedown();
+ return false;
+ }).focus(); //Give focus to input field
+ });
+
+ });
+</script>
+{% endblock %}
+
diff --git a/templates/layerindex/machines.html b/templates/layerindex/machines.html
new file mode 100644
index 0000000000..7cade25011
--- /dev/null
+++ b/templates/layerindex/machines.html
@@ -0,0 +1,77 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - machine index page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - machines{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+ <div class="row-fluid">
+
+ <div class="span9 offset1">
+
+ <ul class="nav nav-tabs">
+ <li><a href="{% url layer_list %}">Layer index</a></li>
+ <li><a href="{% url recipe_search %}">Recipe index</a></li>
+ <li class="active"><a href="{% url machine_search %}">Machine index</a></li>
+ </ul>
+
+ <div class="row-fluid">
+ <div class="input-append">
+ <form id="filter-form" action="{% url machine_search %}" method="get">
+ <input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search machines" name="q" value="{{ search_keyword }}" />
+ <button class="btn" type="submit">search</button>
+ </form>
+ </div>
+ </div>
+
+{% if machine_list %}
+ <table class="table table-striped table-bordered machinestable">
+ <thead>
+ <tr>
+ <th>Machine name</th>
+ <th class="span9">Description</th>
+ <th>Layer</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for machine in machine_list %}
+ <tr>
+ <td><a href="{{ machine.vcs_web_url }}">{{ machine.name }}</a></td>
+ <td>{{ machine.description }}</td>
+ <td><a href="{% url layer_item machine.layerbranch.layer.name %}">{{ machine.layerbranch.layer.name }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if is_paginated %}
+ {% load pagination %}
+ {% pagination page_obj %}
+ {% endif %}
+{% else %}
+ {% if search_keyword %}
+ <p>No matching machines in database.</p>
+ {% endif %}
+{% endif %}
+
+ </div>
+
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/layerindex/rawrecipes.txt b/templates/layerindex/rawrecipes.txt
new file mode 100644
index 0000000000..c1911c9c97
--- /dev/null
+++ b/templates/layerindex/rawrecipes.txt
@@ -0,0 +1,2 @@
+{% for recipe in recipe_list %}{{ recipe.layerbranch.layer.name }} {{ recipe.pn }} {{ recipe.pv }} {{ recipe.full_path }}
+{% endfor %}
diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html
new file mode 100644
index 0000000000..b0d366a983
--- /dev/null
+++ b/templates/layerindex/recipedetail.html
@@ -0,0 +1,92 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - recipe detail page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% autoescape on %}
+{% block title %}OpenEmbedded metadata index - {{ recipe.pn }}{% endblock %}
+{% endautoescape %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+ <div class="row-fluid">
+
+ <div class="span9 offset1">
+
+ <ul class="nav nav-tabs">
+ <li>
+ <a href="{% url layer_list %}">Layer index</a>
+ </li>
+ <li><a href="{% url recipe_search %}">Recipe index</a></li>
+ <li class="active"><a href="#">Recipe</a></li>
+ </ul>
+
+ {% if recipe.layerbranch.branch.name != current_branch %}
+ <div class="alert alert-error">
+ This recipe record is for a different branch than the one you have selected. To search for the equivalent recipe on the {{ current_branch }} branch, click <a href="{% url recipe_search %}?q={{ recipe.name }}">here</a>.
+ </div>
+ {% endif %}
+
+ <table class="table table-striped table-bordered">
+ <tbody>
+ <tr>
+ <th>Name</th>
+ <td>{{ recipe.name }}</td>
+ </tr>
+ <tr>
+ <th>Version</th>
+ <td>{{ recipe.pv }}</td>
+ </tr>
+ <tr>
+ <th>Summary</th>
+ <td>{{ recipe.summary }}</td>
+ </tr>
+ <tr>
+ <th>Description</th>
+ <td>{{ recipe.description }}</td>
+ </tr>
+ <tr>
+ <th>Section</th>
+ <td>{{ recipe.section }}</td>
+ </tr>
+ <tr>
+ <th>License</th>
+ <td>{{ recipe.license }}</td>
+ </tr>
+ <tr>
+ <th>Homepage</th>
+ <td>{% if recipe.homepage %}<a href="{{ recipe.homepage }}">{{ recipe.homepage }}</a>{% endif %}</td>
+ </tr>
+ <tr>
+ <th>Recipe file</th>
+ <td>
+ {% if recipe.vcs_web_url %}
+ <a href="{{ recipe.vcs_web_url }}">{{ recipe.full_path }}</a>
+ {% else %}
+ {{ recipe.full_path }}
+ {% endif %}
+ </td>
+ </tr>
+ <tr>
+ <th>Layer</th>
+ <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a> ({{ recipe.layerbranch.branch.name}} branch)</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html
new file mode 100644
index 0000000000..ccc3b5481f
--- /dev/null
+++ b/templates/layerindex/recipes.html
@@ -0,0 +1,79 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - recipe index page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - recipes{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+ <div class="row-fluid">
+
+ <div class="span9 offset1">
+
+ <ul class="nav nav-tabs">
+ <li><a href="{% url layer_list %}">Layer index</a></li>
+ <li class="active"><a href="{% url recipe_search %}">Recipe index</a></li>
+ <li><a href="{% url machine_search %}">Machine index</a></li>
+ </ul>
+
+ <div class="row-fluid">
+ <div class="input-append">
+ <form id="filter-form" action="{% url recipe_search %}" method="get">
+ <input type="text" class="input-xxlarge" id="appendedInputButtons" placeholder="Search recipes" name="q" value="{{ search_keyword }}" />
+ <button class="btn" type="submit">search</button>
+ </form>
+ </div>
+ </div>
+
+{% if recipe_list %}
+ <table class="table table-striped table-bordered recipestable">
+ <thead>
+ <tr>
+ <th>Recipe name</th>
+ <th>Version</th>
+ <th class="span9">Description</th>
+ <th>Layer</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for recipe in recipe_list %}
+ <tr>
+ <td><a href="{% url recipe recipe.id %}">{{ recipe.name }}</a></td>
+ <td>{{ recipe.pv }}</td>
+ <td>{{ recipe.short_desc }}</td>
+ <td><a href="{% url layer_item recipe.layerbranch.layer.name %}">{{ recipe.layerbranch.layer.name }}</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+
+ {% if is_paginated %}
+ {% load pagination %}
+ {% pagination page_obj %}
+ {% endif %}
+{% else %}
+ {% if search_keyword %}
+ <p>No matching recipes in database.</p>
+ {% endif %}
+{% endif %}
+
+ </div>
+
+ </div>
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/layerindex/submitemail.txt b/templates/layerindex/submitemail.txt
new file mode 100644
index 0000000000..fab7bf796a
--- /dev/null
+++ b/templates/layerindex/submitemail.txt
@@ -0,0 +1,7 @@
+Hi {{ user_name }},
+
+A user has submitted a new layer, {{ layer_name }}. Please review it at the following URL:
+
+ {{ layer_url }}
+
+Thanks! \ No newline at end of file
diff --git a/templates/layerindex/submitlayer.html b/templates/layerindex/submitlayer.html
new file mode 100644
index 0000000000..274f102e61
--- /dev/null
+++ b/templates/layerindex/submitlayer.html
@@ -0,0 +1,36 @@
+{% extends "layerindex/editlayer.html" %}
+
+{% comment %}
+
+ layerindex-web - layer submission form page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - submit layer{% endblock %}
+-->
+
+ {% block heading %}
+ <div class="page-header">
+ <h1>Submit layer</h1>
+ </div>
+ {% endblock %}
+
+
+{% block branch_selector %}
+<li class="disabled"><a href="#">Branch: <b>master</b></a></li>
+{% endblock %}
+
+{% block formtop %}
+<div class="submitformintro">
+ <p>Please enter the details for the layer you wish to add to the index.</p>
+</div>
+{% endblock %}
+
+{% block submitbuttons %}
+<input type="submit" value="Submit layer" class="btn btn-primary btn-large" />
+{% endblock %}
diff --git a/templates/layerindex/submitthanks.html b/templates/layerindex/submitthanks.html
new file mode 100644
index 0000000000..9279f1f6bb
--- /dev/null
+++ b/templates/layerindex/submitthanks.html
@@ -0,0 +1,26 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% comment %}
+
+ layerindex-web - layer submission acknowledgement page template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+
+<!--
+{% block title %}OpenEmbedded metadata index - layer submitted{% endblock %}
+-->
+
+{% block content %}
+{% autoescape on %}
+
+<p>Thank you for submitting a layer. Your submission will be reviewed and if accepted should be published in the index soon.</p>
+
+
+{% endautoescape %}
+
+{% endblock %}
diff --git a/templates/pagination.html b/templates/pagination.html
new file mode 100644
index 0000000000..4e08cb7fdf
--- /dev/null
+++ b/templates/pagination.html
@@ -0,0 +1,57 @@
+{% comment %}
+
+ layerindex-web - pagination template
+
+ Copyright (C) 2013 Intel Corporation
+ Licensed under the MIT license, see COPYING.MIT for details
+
+{% endcomment %}
+
+{% load addurlparameter %}
+
+<div class="pagination pagination-centered">
+ <ul>
+ {% if page.has_previous %}
+ <li><a href="{% addurlparameter 'page' page.previous_page_number %}">prev</a></li>
+ {% else %}
+ <li class="disabled"><span>prev</span></li>
+ {% endif %}
+
+
+ {% for pnum in begin %}
+ {% if pnum == page.number %}
+ <li class="active"><a href="#">{{ page.number }}</a></li>
+ {% else %}
+ <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li>
+ {% endif %}
+ {% endfor %}
+
+ {% if middle %}
+ <li class="disabled"><span>...</span></li>
+ {% for pnum in middle %}
+ {% if pnum == page.number %}
+ <li class="active"><span>{{ page.number }}</span></li>
+ {% else %}
+ <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ {% if end %}
+ <li class="disabled"><span>...</span></li>
+ {% for pnum in end %}
+ {% if pnum == page.number %}
+ <li class="active"><span>{{ page.number }}</span></li>
+ {% else %}
+ <li><a href="{% addurlparameter 'page' pnum %}">{{ pnum }}</a></li>
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ {% if page.has_next %}
+ <li><a href="{% addurlparameter 'page' page.next_page_number %}">next</a></li>
+ {% else %}
+ <li class="disabled"><span>next</span></li>
+ {% endif %}
+ </ul>
+</div>
diff --git a/templates/registration/activate.html b/templates/registration/activate.html
new file mode 100644
index 0000000000..e85121e054
--- /dev/null
+++ b/templates/registration/activate.html
@@ -0,0 +1,18 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% if account %}
+
+<p>{% trans "Account successfully activated" %}</p>
+
+<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p>
+
+{% else %}
+
+<p>{% trans "Account activation failed" %}</p>
+
+{% endif %}
+
+{% endblock %}
diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt
new file mode 100644
index 0000000000..588cb49fa5
--- /dev/null
+++ b/templates/registration/activation_email.txt
@@ -0,0 +1,12 @@
+{% load i18n %}
+{% blocktrans %}
+A request has been made to activate an account at {{ site.name }} using your email address.
+
+If you made this request, please click on the link below to activate your account. The
+link is valid for {{ expiration_days }} days.
+
+http://{{ site.domain }}{% url registration_activate activation_key %}
+
+If you did not make this request, please ignore this message.
+{% endblocktrans %}
+
diff --git a/templates/registration/activation_email_subject.txt b/templates/registration/activation_email_subject.txt
new file mode 100644
index 0000000000..24f477cbb8
--- /dev/null
+++ b/templates/registration/activation_email_subject.txt
@@ -0,0 +1 @@
+{% load i18n %}{% trans "Account activation on" %} {{ site.name }}
diff --git a/templates/registration/login.html b/templates/registration/login.html
new file mode 100644
index 0000000000..e41c7291a8
--- /dev/null
+++ b/templates/registration/login.html
@@ -0,0 +1,24 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form id="login_form" method="post" action=".">
+ {{ form.as_p }}
+
+ <input type="submit" class="btn" value="{% trans 'Log in' %}" />
+ <input type="hidden" name="next" value="{{ next }}" />
+ {% csrf_token %}
+</form>
+
+<p>{% trans "Forgot password" %}? <a href="{% url auth_password_reset %}">{% trans "Reset it" %}</a>!</p>
+<p>{% trans "Not a member" %}? <a href="{% url registration_register %}">{% trans "Register" %}</a>!</p>
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ $("#login_form input:text, #login_form textarea").first().focus();
+ });
+</script>
+{% endblock %}
diff --git a/templates/registration/logout.html b/templates/registration/logout.html
new file mode 100644
index 0000000000..f8da51fa0d
--- /dev/null
+++ b/templates/registration/logout.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Logged out" %}</p>
+{% endblock %}
diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html
new file mode 100644
index 0000000000..659be0a46d
--- /dev/null
+++ b/templates/registration/password_change_done.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "Password changed" %}</p>
+{% endblock %}
diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html
new file mode 100644
index 0000000000..6e6358e271
--- /dev/null
+++ b/templates/registration/password_change_form.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form method="post" action=".">
+ {{ form.as_p }}
+
+ <input type="submit" class="btn" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html
new file mode 100644
index 0000000000..ef3637c709
--- /dev/null
+++ b/templates/registration/password_reset_complete.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+<p>{% trans "Password reset successfully" %}</p>
+
+<p><a href="{% url auth_login %}">{% trans "Log in" %}</a></p>
+
+{% endblock %}
diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html
new file mode 100644
index 0000000000..aeda0bf7ea
--- /dev/null
+++ b/templates/registration/password_reset_confirm.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+
+{% if validlink %}
+
+<form id="password_form" method="post" action=".">
+ {{ form.as_p }}
+
+ <input type="submit" class="btn" value="{% trans 'Submit' %}" />
+</form>
+
+{% else %}
+
+<p>{% trans "Password reset failed" %}</p>
+
+{% endif %}
+
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ $("#password_form input:text, #password_form textarea").first().focus();
+ });
+</script>
+{% endblock %}
diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html
new file mode 100644
index 0000000000..b8ef93cb99
--- /dev/null
+++ b/templates/registration/password_reset_done.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "An email with password reset instructions has been sent." %}</p>
+{% endblock %}
diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html
new file mode 100644
index 0000000000..a55c86958b
--- /dev/null
+++ b/templates/registration/password_reset_email.html
@@ -0,0 +1,5 @@
+{% load i18n %}
+{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
+{% block reset_link %}
+{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uidb36=uid, token=token %}
+{% endblock %}
diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html
new file mode 100644
index 0000000000..cb2f1d01cc
--- /dev/null
+++ b/templates/registration/password_reset_form.html
@@ -0,0 +1,19 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form id="password_form" method="post" action=".">
+ {{ form.as_p }}
+
+ <input type="submit" class="btn" value="{% trans 'Submit' %}" />
+</form>
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ $("#password_form input:text, #password_form textarea").first().focus();
+ });
+</script>
+{% endblock %}
diff --git a/templates/registration/registration_complete.html b/templates/registration/registration_complete.html
new file mode 100644
index 0000000000..c59bd78ad1
--- /dev/null
+++ b/templates/registration/registration_complete.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<p>{% trans "You are now registered, however your account must now be activated. An email has been sent with instructions on how to activate your account." %}</p>
+{% endblock %}
diff --git a/templates/registration/registration_form.html b/templates/registration/registration_form.html
new file mode 100644
index 0000000000..eac549bbff
--- /dev/null
+++ b/templates/registration/registration_form.html
@@ -0,0 +1,20 @@
+{% extends "base.html" %}
+{% load i18n %}
+
+{% block content %}
+<form id="registration_form" method="post" action=".">
+ {{ form.as_p }}
+
+ <input type="submit" class="btn" value="{% trans 'Submit' %}" />
+ {% csrf_token %}
+</form>
+{% endblock %}
+
+
+{% block scripts %}
+<script>
+ $(document).ready(function() {
+ $("#registration_form input:text, #registration_form textarea").first().focus();
+ });
+</script>
+{% endblock %}