diff --git a/loader.py b/loader.py new file mode 100644 index 0000000..b59414b --- /dev/null +++ b/loader.py @@ -0,0 +1,22 @@ +from os.path import exists,join +from django.conf import settings +from django.template import TemplateDoesNotExist + +def load_template_source(template_name,dirs=None): + theme = getattr(settings,'THEME','default') + base = settings.TEMPLATE_DIRS[0] + path_theme = join(base,'themes',theme,template_name) + path_base = join(base,'base',template_name) + if exists(path_theme): + path = path_theme + elif exists(path_base): + path = path_base + else: + raise TemplateDoesNotExist(template_name) + f = open(path) + tpl = f.read() + f.close() + return (tpl,path) + +load_template_source.is_usable = True + diff --git a/settings.py b/settings.py index e673ff8..21f5395 100644 --- a/settings.py +++ b/settings.py @@ -56,9 +56,9 @@ SECRET_KEY = 'q6$a4f+a_f)6(h$$4t3qxd-uxo4yuq(ax4lvn!uf9tl&7946lt' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( + 'projects.loader.load_template_source', 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', -# 'django.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( @@ -96,6 +96,8 @@ INSTALLED_APPS = ( 'pygit', ) +THEME = 'default' + SHOW_BLOCKS = dict( last_comments = dict(), login = dict(hide=BASE_URL+'/login/$',show_logged=False)) diff --git a/templates/all_bugs.html b/templates/all_bugs.html deleted file mode 100644 index c9dae7b..0000000 --- a/templates/all_bugs.html +++ /dev/null @@ -1,24 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Все баги{% if state %} в состоянии {{state}}{% endif %}{% endblock %} - -{% block main %} - -<h2>Все баги{% if state %} в состоянии {{state}}{% endif %}</h2> - -<div class='bugs'> -{% for bug in bugs %} - <div class='bug bug-state-{{bug.status.id}}'> - <h3><a href='{% url mgmt.views.one_bug bug.id %}'>{{bug.name}}</a></h3> - <div class='project-link'>{{bug.project|link|safe}}</div> - {% if edit_link %} - <div class='links'><a href='{{edit_link}}'>Изменить</a></div> - {% endif %} - <p>{{bug.text|markdown|safe}}</p> - </div> -{% endfor %} -</div> -{% include "pager.html" %} - -{% endblock %} diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index de1d9d4..0000000 --- a/templates/base.html +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" lang="ru"> - <head> - <title> - {% block title %} - {% endblock %} - </title> - <meta name='author' content='Portnov'> - {% block head %} - <link rel='stylesheet' type='text/css' href='/media/css/main.css'/> - <link rel="stylesheet" type="text/css" href="/media/js/markitup/skins/markitup/style.css" /> - <link rel="stylesheet" type="text/css" href="/media/js/markitup/sets/markdown/style.css" /> - <link rel="alternate" title="Последние комментарии" type="application/rss+xml" href="{% url mgmt.views.last_comments %}" /> - <link rel="alternate" title="Баги" type="application/rss+xml" href="{% url mgmt.views.last_bugs %}" /> - <link rel="alternate" title="Отчеты" type="application/rss+xml" href="{% url mgmt.views.last_reports %}" /> - <script type="text/javascript" src="jquery.js"></script> - <script type="text/javascript" src="markitup/jquery.markitup.js"></script> - <script type="text/javascript" src="markitup/sets/markdown/set.js"></script> - <script type="text/javascript"> - $(document).ready(function() { - $("textarea").markItUp(mySettings); - }); - </script> - {% endblock %} - </head> - <body> - - <div id='body'> - <div id='header'> - {%block header%} - <h1><a href='/'>Управление проектами</a></h1> - {% if menu %} - <ul class='menu'> - {% for item in menu %} - <li>{{item|safe}}</li> - {% endfor %} - </ul> - {% endif %} - <div id='login-message'> - {{login_message}} - </div> - - {%endblock%} - </div> - - {% if blocks %} - <div id='blocks'> - {{blocks.last_comments|safe}} - {{chart|safe}} - </div> - {% endif %} - - <div id='main'> - {% if project %} - <ul class='project-menu'> - <li><a href='{% url mgmt.views.project_documents project.id %}'>Документация</a></li> - <li><a href='{% url mgmt.views.project_bugs project.id %}'>Баги</a></li> - <li><a href='{% url mgmt.views.requests project.id %}'>Запросы функциональности</a></li> - <li><a href='{% url mgmt.views.project_tasks project.id %}'>Задания</a></li> - </ul> - {% endif %} - {% block main %}{% endblock %} - </div> - - <div id='footer'> - {% block footer %} - <div class='debug'> - {% for msg in debug %} - {{msg}} - {% endfor %} - </div> - {% endblock %} - </div> - </div> - - </body> -</html> diff --git a/templates/base/base.html b/templates/base/base.html new file mode 100644 index 0000000..de1d9d4 --- /dev/null +++ b/templates/base/base.html @@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="ru"> + <head> + <title> + {% block title %} + {% endblock %} + </title> + <meta name='author' content='Portnov'> + {% block head %} + <link rel='stylesheet' type='text/css' href='/media/css/main.css'/> + <link rel="stylesheet" type="text/css" href="/media/js/markitup/skins/markitup/style.css" /> + <link rel="stylesheet" type="text/css" href="/media/js/markitup/sets/markdown/style.css" /> + <link rel="alternate" title="Последние комментарии" type="application/rss+xml" href="{% url mgmt.views.last_comments %}" /> + <link rel="alternate" title="Баги" type="application/rss+xml" href="{% url mgmt.views.last_bugs %}" /> + <link rel="alternate" title="Отчеты" type="application/rss+xml" href="{% url mgmt.views.last_reports %}" /> + <script type="text/javascript" src="jquery.js"></script> + <script type="text/javascript" src="markitup/jquery.markitup.js"></script> + <script type="text/javascript" src="markitup/sets/markdown/set.js"></script> + <script type="text/javascript"> + $(document).ready(function() { + $("textarea").markItUp(mySettings); + }); + </script> + {% endblock %} + </head> + <body> + + <div id='body'> + <div id='header'> + {%block header%} + <h1><a href='/'>Управление проектами</a></h1> + {% if menu %} + <ul class='menu'> + {% for item in menu %} + <li>{{item|safe}}</li> + {% endfor %} + </ul> + {% endif %} + <div id='login-message'> + {{login_message}} + </div> + + {%endblock%} + </div> + + {% if blocks %} + <div id='blocks'> + {{blocks.last_comments|safe}} + {{chart|safe}} + </div> + {% endif %} + + <div id='main'> + {% if project %} + <ul class='project-menu'> + <li><a href='{% url mgmt.views.project_documents project.id %}'>Документация</a></li> + <li><a href='{% url mgmt.views.project_bugs project.id %}'>Баги</a></li> + <li><a href='{% url mgmt.views.requests project.id %}'>Запросы функциональности</a></li> + <li><a href='{% url mgmt.views.project_tasks project.id %}'>Задания</a></li> + </ul> + {% endif %} + {% block main %}{% endblock %} + </div> + + <div id='footer'> + {% block footer %} + <div class='debug'> + {% for msg in debug %} + {{msg}} + {% endfor %} + </div> + {% endblock %} + </div> + </div> + + </body> +</html> diff --git a/templates/base/registration/logged_out.html b/templates/base/registration/logged_out.html new file mode 100644 index 0000000..d339ef0 --- /dev/null +++ b/templates/base/registration/logged_out.html @@ -0,0 +1,12 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %} + +{% block content %} + +<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> + +<p><a href="../">{% trans 'Log in again' %}</a></p> + +{% endblock %} diff --git a/templates/base/registration/login.html b/templates/base/registration/login.html new file mode 100644 index 0000000..c8b953c --- /dev/null +++ b/templates/base/registration/login.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} + +{% block title %}Вход в систему{% endblock %} + +{% block main %} + +{% if form.errors %} + <p class="error">Сожалеем, вы неправильно ввели логин или пароль</p> +{% endif %} + + <form action='/login/' method='post'> + <p><label for="username">Логин:</label><input type="text" name="username" value="" id="username"/></p> + <p><label for="password">Пароль:</label><input type="password" name="password" value="" id="password"/></p> + <input type='hidden' name='next' value='/'/> + <input type="submit" value="login" /> + </form> +{% endblock %} diff --git a/templates/base/registration/password_change_done.html b/templates/base/registration/password_change_done.html new file mode 100644 index 0000000..4498c63 --- /dev/null +++ b/templates/base/registration/password_change_done.html @@ -0,0 +1,13 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} + +{% block title %}{% trans 'Password change successful' %}{% endblock %} + +{% block content %} + +<h1>{% trans 'Password change successful' %}</h1> + +<p>{% trans 'Your password was changed.' %}</p> + +{% endblock %} diff --git a/templates/base/registration/password_change_form.html b/templates/base/registration/password_change_form.html new file mode 100644 index 0000000..cd2b1e0 --- /dev/null +++ b/templates/base/registration/password_change_form.html @@ -0,0 +1,25 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} + +{% block title %}{% trans 'Password change' %}{% endblock %} + +{% block content %} + +<h1>{% trans 'Password change' %}</h1> + +<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> + +<form action="" method="post"> + +{% if form.old_password.errors %}{{ form.old_password.html_error_list }}{% endif %} +<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p> +{% if form.new_password1.errors %}{{ form.new_password1.html_error_list }}{% endif %} +<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> +{% if form.new_password2.errors %}{{ form.new_password2.html_error_list }}{% endif %} +<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> + +<p><input type="submit" value="{% trans 'Change my password' %}" /></p> +</form> + +{% endblock %} diff --git a/templates/base/registration/password_reset_done.html b/templates/base/registration/password_reset_done.html new file mode 100644 index 0000000..f97b568 --- /dev/null +++ b/templates/base/registration/password_reset_done.html @@ -0,0 +1,14 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} + +{% block title %}{% trans 'Password reset successful' %}{% endblock %} + +{% block content %} + +<h1>{% trans 'Password reset successful' %}</h1> + +<p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p> + +{% endblock %} diff --git a/templates/base/registration/password_reset_email.html b/templates/base/registration/password_reset_email.html new file mode 100644 index 0000000..f765dd0 --- /dev/null +++ b/templates/base/registration/password_reset_email.html @@ -0,0 +1,15 @@ +{% load i18n %} +{% trans "You're receiving this e-mail because you requested a password reset" %} +{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. + +{% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %} + +{% trans "Feel free to change this password by going to this page:" %} + +http://{{ domain }}/password_change/ + +{% trans "Your username, in case you've forgotten:" %} {{ user.username }} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} diff --git a/templates/base/registration/password_reset_form.html b/templates/base/registration/password_reset_form.html new file mode 100644 index 0000000..423821b --- /dev/null +++ b/templates/base/registration/password_reset_form.html @@ -0,0 +1,19 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} + +{% block title %}{% trans "Password reset" %}{% endblock %} + +{% block content %} + +<h1>{% trans "Password reset" %}</h1> + +<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p> + +<form action="" method="post"> +{% if form.email.errors %}{{ form.email.html_error_list }}{% endif %} +<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p> +</form> + +{% endblock %} diff --git a/templates/base/rss.xml b/templates/base/rss.xml new file mode 100644 index 0000000..45612ea --- /dev/null +++ b/templates/base/rss.xml @@ -0,0 +1,21 @@ +<?xml version="1.0"?> +<rss version="2.0"> +{% load prj_filters %} + +<channel> + <title>{{title}}</title> + <link>http://projects.rtfm-com.ru/</link> + <description>{{description}}</description> + <language>ru-ru</language> + <pubDate>{{pub_date}}</pubDate> + +{% for object in objects %} +<item> + <title>{% if object.title %}{{object.title}}{% else %}{{object.name}}{% endif %}</title> + <link>http://rtfm-server{{object.url}}</link> + <description>{{object.text|markdown|safe}}</description> +</item> +{% endfor %} + +</channel> +</rss> diff --git a/templates/bug.html b/templates/bug.html deleted file mode 100644 index 07e0848..0000000 --- a/templates/bug.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Баг: {{bug.name}}{% endblock %} - -{% block main %} -{% include "bug_body.html" %} - -{% if change_state %} - <h3>Сменить состояние бага</h3> - {% form change_state "<input type='hidden' name='action' value='change_state'/>" %} -{% endif %} -{% if priority_form %} - <h3>Установить приоритет</h3> - {% form priority_form "<input type='hidden' name='action' value='set_priority'/>" %} -{% endif %} -{% if complexity_form %} - <h3>Указать сложность исправления</h3> - {% form complexity_form "<input type='hidden' name='action' value='set_complexity'/>" %} -{% endif %} - -{% include "comments.html" %} -{% endblock %} diff --git a/templates/bug_body.html b/templates/bug_body.html deleted file mode 100644 index 290e95c..0000000 --- a/templates/bug_body.html +++ /dev/null @@ -1,30 +0,0 @@ - {% load prj_filters %} - <div class='bug bug-state-{{bug.status.id}}'> - <div class='project-link'> - <a href='{% url mgmt.views.project_bugs project.id %}'>{{project.name}}</a> - </div> - <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> - {% if edit_link %} - <div class='links'><a href='{{edit_link}}'>Изменить</a></div> - {% endif %} - <div class='bug-priority'> - <p><strong>Приоритет:</strong> {{priority}}</p> - <p><strong>Сложность:</strong> {{complexity}}</p> - </div> - {% if bug.component %} - <p><strong>Компонент:</strong> {{bug.component}}</p> - {% endif %} - <p><strong>Действия для воспроизведения:</strong> {{bug.actions|markdown|safe}}</p> - <p><strong>Что ожидали:</strong> {{bug.expected|markdown|safe}}</p> - <p><strong>Что получили:</strong> {{bug.unexpected|markdown|safe}}</p> - <div>{{bug.text|markdown|safe}}</div> - {% if tasks %} - <div class='related-tasks'> - Связанные задания: - {% for task in tasks %} - <a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a> - {% endfor %} - </div> - {% endif %} - - </div> diff --git a/templates/bug_report.html b/templates/bug_report.html deleted file mode 100644 index 6568d11..0000000 --- a/templates/bug_report.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Отправить баг в проект {{project.name}}{% endblock %} - -{% block main %} -<h2>Отправить баг в проект {{project.name}}</h2> - -{% form form %} - -{% endblock %} diff --git a/templates/comments.html b/templates/comments.html deleted file mode 100644 index 6a8c58b..0000000 --- a/templates/comments.html +++ /dev/null @@ -1,28 +0,0 @@ -{% load prj_filters %} -{% if comments %} - <h3>Комментарии</h3> - <div class='comments'> - {% for comment in comments %} - <div class='comment'> - <div class='comment-title'> - {% if comment.can_delete %} - <div class='links'> - <a href='{% url mgmt.views.delete_comment comment.id %}'>Удалить</a> - </div> - {% endif %} - <a name='comment-{{comment.id}}'>#</a> - {{comment.title}} от <a href='{% url mgmt.views.user_page comment.author %}'>{{comment.author}}</a>, {{comment.created}} - </div> - <div>{{comment.text|markdown|safe}}</div> - </div> - {% endfor %} - </div> - {% include "pager.html" %} -{% else %} - <p>Комментариев пока нет.</p> -{% endif %} - -{% if form %} -<h3>Отправить комментарий</h3> -{% form form "<input type='hidden' name='action' value='comment'/>" %} -{% endif %} diff --git a/templates/commits_table.html b/templates/commits_table.html deleted file mode 100644 index 6263ed9..0000000 --- a/templates/commits_table.html +++ /dev/null @@ -1,8 +0,0 @@ -<table> - {% for id,dt,author,message in commits %} - <tr> - <td><a href='{% url pygit.views.diff_all rid,current_branch,id %}'>{{id}}</a></td> - <td>{{dt}}</td><td>{{author}}</td><td>{{message}}</td> - </tr> - {% endfor %} -</table> diff --git a/templates/create_article.html b/templates/create_article.html deleted file mode 100644 index eb9888b..0000000 --- a/templates/create_article.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Создать статью KB{% endblock %} - -{% block main %} -<h2>Создать статью KB</h2> -{% form form %} -{% endblock %} diff --git a/templates/create_doc.html b/templates/create_doc.html deleted file mode 100644 index 47fde7b..0000000 --- a/templates/create_doc.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{%block title%}Создать страницу документации{%endblock%} - -{%block main%} -<h2>Создать страницу документации</h2> - -{% if msg %} - <div class='message'> - {{msg}} - </div> -{% endif %} - -{% if form %} - {% form form %} -{% else %} - <p>Вы не можете создавать документацию.</p> -{% endif %} - -{% endblock %} diff --git a/templates/create_report.html b/templates/create_report.html deleted file mode 100644 index 4565fd7..0000000 --- a/templates/create_report.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Создать отчет{% endblock %} - -{% block main %} -<h2>Создать отчет</h2> - -{% form form %} -{% endblock %} diff --git a/templates/create_request.html b/templates/create_request.html deleted file mode 100644 index 814d28a..0000000 --- a/templates/create_request.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Создать запрос функциональности для проекта {{project.name}}{% endblock %} - -{% block main %} -<h2>Создать запрос функциональности для проекта {{project.name}}</h2> - -{% form form %} - -{% endblock %} diff --git a/templates/create_task.html b/templates/create_task.html deleted file mode 100644 index cbeeae4..0000000 --- a/templates/create_task.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Создать задание{% endblock %} - -{% block main %} -<h2>Создать задание</h2> - -{% form form %} -{% endblock %} diff --git a/templates/delete.html b/templates/delete.html deleted file mode 100644 index c214ab9..0000000 --- a/templates/delete.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Удалить {% if message.name %}{{message.name}}{% else %}{{message.title}}{% endif %}?{% endblock %} - -{% block main %} - -<h2>Удалить {% if message.name %}{{message.name}}{% else %}{{message.title}}{% endif %}?</h2> - -<form method='post' action='.'> - <p><input type='submit' value='Да'/> - <a href='{{referer}}'>Нет</a> - </p> -</form> - -{% endblock %} - diff --git a/templates/document.html b/templates/document.html deleted file mode 100644 index 6fb2340..0000000 --- a/templates/document.html +++ /dev/null @@ -1,22 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{%block title%}Документ: {{document.name}}{%endblock%} - -{% block main %} - -{% if edit_link %} - <div class='links'> - <a href='{{edit_link}}'>Изменить</a> - </div> -{% endif %} -<h2>{{document.category.title}}: {{document.name}}</h2> - -<p>Проект: <a href='{% url mgmt.views.one_project document.project.id %}'>{{document.project.name}}</a></p> -<div class='document'> - {{document.text|markdown|safe}} -</div> - -{% include "comments.html" %} - -{% endblock %} diff --git a/templates/edit_article.html b/templates/edit_article.html deleted file mode 100644 index 5faac0e..0000000 --- a/templates/edit_article.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Редактировать статью KB #{{article.id}}: {{article.title}}{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url kb.views.one_article article.id %}'>Просмотреть</a> -</div> -<h2>Редактировать статью KB #{{article.id}}: {{article.title}}</h2> - -{% form form %} - -{% endblock %} diff --git a/templates/edit_bug.html b/templates/edit_bug.html deleted file mode 100644 index ab924a5..0000000 --- a/templates/edit_bug.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Редактировать баг #{{bug.id}}{% endblock %} - -{% block main %} - -<h2>Редактировать баг #{{bug.id}}</h2> -<div class='links'><a href='{% url mgmt.views.one_bug bug.id %}'>Посмотреть</a></div> - -{% form form %} - -{% endblock %} diff --git a/templates/edit_document.html b/templates/edit_document.html deleted file mode 100644 index a934d94..0000000 --- a/templates/edit_document.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Редактировать документ: {{document.name}}{% endblock %} - -{% block main %} - -<h2>Редактировать документ</h2> -<div class='links'> - <a href='{% url mgmt.views.one_document document.id %}'>Посмотреть</a> -</div> - -{% form form %} - -{% endblock %} diff --git a/templates/edit_report.html b/templates/edit_report.html deleted file mode 100644 index 8dcf1ea..0000000 --- a/templates/edit_report.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Редактировать отчет{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url mgmt.views.one_report report.id %}'>Просмотреть</a> -</div> -<h2>Редактировать отчет: {{report.name}}</h2> - -{% form form %} -{% endblock %} diff --git a/templates/edit_request.html b/templates/edit_request.html deleted file mode 100644 index 6d82e80..0000000 --- a/templates/edit_request.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Изменить запрос: {{rq.name}}{% endblock %} - -{% block main %} -<h2>Изменить запрос: {{rq.name}}</h2> - -{% form form %} -{% endblock %} diff --git a/templates/edit_task.html b/templates/edit_task.html deleted file mode 100644 index f5e26b2..0000000 --- a/templates/edit_task.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Редактировать задание{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url mgmt.views.one_task task.id %}'>Просмотреть</a> -</div> -<h2>Редактировать задание</h2> - -{% form form %} -{% endblock %} diff --git a/templates/git.html b/templates/git.html deleted file mode 100644 index 35898d8..0000000 --- a/templates/git.html +++ /dev/null @@ -1,8 +0,0 @@ -{% extends "base.html" %} - -{% block main %} -<div class='links'>Репозиторий: <a href='{% url pygit.views.one_repo repo.rid %}'>{{repo.description}}</a></div> - - {% block git %} - {% endblock %} -{% endblock %} diff --git a/templates/git_blame.html b/templates/git_blame.html deleted file mode 100644 index f26dbd3..0000000 --- a/templates/git_blame.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "git.html" %} - -{% block title %}История файла {{path}}{% endblock %} - -{% block git %} -<h2>История файла {{path}}</h2> - -<table> - {% for cid,author,dt,message,line in blame %} - <tr> - <td><a href='{% url pygit.views.diff_file repo.rid,branch,cid,path %}'>{{cid}}</a></td> - <td>{{author}}</td><td>{{dt}}</td><td>{{message}}</td><td>{{forloop.counter}}</td><td>{{line}}</td> - </tr> - {% endfor %} -</table> - -{% endblock %} diff --git a/templates/git_commits.html b/templates/git_commits.html deleted file mode 100644 index 9444769..0000000 --- a/templates/git_commits.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "git.html" %} - -{% block title %}Последние коммиты в репозитории {{repo.description}}{% endblock %} - -{% block git %} -<h1>Последние коммиты в репозитории {{repo.description}}</h1> -<table> - {% for id,dt,author,message in commits %} - <tr> - <td><a href='{% url pygit.views.diff_all repo.rid,current_branch,id %}'>{{id}}</a></td> - <td>{{dt}}</td><td>{{author}}</td><td>{{message}}</td> - </tr> - {% endfor %} -</table> -{% endblock %} diff --git a/templates/git_diff.html b/templates/git_diff.html deleted file mode 100644 index b6728f2..0000000 --- a/templates/git_diff.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "git.html" %} - -{% block title %}Diff: #{{cid}}{% if path %} {{path}}{% endif %}{% endblock %} - -{% block git %} - -<h2>Diff: #{{cid}}{% if path %} {{path}}{% endif %}</h2> -<div class='links'> - <a href='{% url pygit.views.tarball repo.rid,cid %}'>Скачать в tar.gz</a> -</div> -<p><a href='{% url pygit.views.diff_all repo.rid,branch,cid %}'>Коммит: {{message}}</a></p> -<p>Автор: {{author}}, дата: {{date}}</p> -<p>Всего файлов: {{total_stats.files}}, всего строк: {{total_stats.lines}}, -всего новых строк: {{total_stats.insertions}}, всего удалено строк: {{total_stats.deletions}}</p> -{% autoescape off %} -{% for file,diff,stats in diffs %} - <h3><a href='{% url pygit.views.blame repo.rid,branch,file %}'>{{file}}</a></h3> - <p>Новых строк: {{stats.insertions}}, удалено строк: {{stats.deletions}}</p> - <code><pre> - {{diff}} - </pre></code> -{% endfor %} -{% endautoescape %} - -{% endblock %} diff --git a/templates/git_tree.html b/templates/git_tree.html deleted file mode 100644 index 3338a35..0000000 --- a/templates/git_tree.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "git.html" %} - -{% block title %}Список файлов{% endblock %} - -{% block git %} -<h3>Файлы:</h3> - -<ul> - {% for id,name in dirs %} - <li><a href='{% url pygit.views.tree repo.rid,branch,id,path %}{{name}}/'>{{name}}</a></li> - {% endfor %} - {% for id,name in files %} - <li><a href='{% url pygit.views.blame repo.rid,branch,path %}{{name}}/'>{{name}}</a></li> - {% endfor %} -</ul> - -{% endblock %} diff --git a/templates/kb.html b/templates/kb.html deleted file mode 100644 index 192ae5c..0000000 --- a/templates/kb.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "base.html" %} - -{% block title %}База знаний{% endblock %} - -{% block main %} -<h2>База знаний</h2> - -<p><a href='{% url kb.views.create_article %}'>Создать статью</a></p> - -{% for section in sections %} - {% if section.kbarticle_set.count %} - <h3>{{section.title}}</h3> - <ul> - {% for article in section.kbarticle_set.all %} - <li><a href='{% url kb.views.one_article article.id %}'>{{article.title}}</a></li> - {% endfor %} - </ul> - {% endif %} -{% endfor %} - -<p><a href='{% url kb.views.create_article %}'>Создать статью</a></p> - -{% endblock %} diff --git a/templates/kb_article.html b/templates/kb_article.html deleted file mode 100644 index 58ea852..0000000 --- a/templates/kb_article.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Статья KB #{{article.id}}: {{article.title}}{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url kb.views.edit_article article.id %}'>Изменить</a> -</div> -<h2>Статья KB #{{article.id}}: {{article.title}}</h2> - -<p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page article.author.username %}'>{{article.author.username}}</a></p> - -{{article.text|markdown|safe}} - -{% endblock %} - diff --git a/templates/main.html b/templates/main.html deleted file mode 100644 index e78e541..0000000 --- a/templates/main.html +++ /dev/null @@ -1,11 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Список проектов{% endblock %} - -{% block main %} - <div id='projects'> - {% for project in projects %} - {% include "project_body.html" %} - {% endfor %} - </div> -{% endblock %} diff --git a/templates/pager.html b/templates/pager.html deleted file mode 100644 index 765d74c..0000000 --- a/templates/pager.html +++ /dev/null @@ -1,11 +0,0 @@ -{% if page_numbers %} -<div class='pager'> - {% for page in page_numbers %} - {% ifequal page current_page %} - <span class='pager pager-current'>{{page}}</span> - {% else %} - <span class='pager pager-other'><a href='?page={{page}}'>{{page}}</a></span> - {% endifequal %} - {% endfor %} -</div> -{% endif %} diff --git a/templates/preview.html b/templates/preview.html deleted file mode 100644 index 51c57ac..0000000 --- a/templates/preview.html +++ /dev/null @@ -1,2 +0,0 @@ -{% load prj_filters %} -{{text|markdown|safe}} diff --git a/templates/private_message.html b/templates/private_message.html deleted file mode 100644 index ae77da5..0000000 --- a/templates/private_message.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Сообщение: {{message.name}}{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url mgmt.views.delete_private_message message.id %}'>Удалить</a> -</div> - -<h2>{{message.name}}</h2> -<p><strong>От:</strong> <a href='{% url mgmt.views.user_page message.author.username %}'>{{message.author.username}}</a></p> -<p><strong>Отправлено:</strong> {{message.created}}</p> - -<div class='message'> -{{message.text|markdown|safe}} -</div> - -{% endblock %} diff --git a/templates/project.html b/templates/project.html deleted file mode 100644 index dcdebba..0000000 --- a/templates/project.html +++ /dev/null @@ -1,10 +0,0 @@ -{% extends "base.html" %} - -{% block title %} -Проект: {{ project.name }} -{% endblock %} - -{% block main %} -{% include "project_body.html" %} -{% include "comments.html" %} -{% endblock %} diff --git a/templates/project_body.html b/templates/project_body.html deleted file mode 100644 index c7b0e82..0000000 --- a/templates/project_body.html +++ /dev/null @@ -1,11 +0,0 @@ - {% load prj_filters %} - <div class='project'> - <p><strong><a href='{% url mgmt.views.one_project project.id %}'>{{ project.name }}</a></strong></p> - <p><strong>Репозиторий Git:</strong> - {% if project.git_link %} - <a href='{{project.git_link}}'>{{project.repo}}</a> - {% else %} - {{ project.repo }} - {% endif %}</p> - <div>{{ project.text|markdown|safe }}</div> - </div> diff --git a/templates/project_bugs.html b/templates/project_bugs.html deleted file mode 100644 index 377a817..0000000 --- a/templates/project_bugs.html +++ /dev/null @@ -1,45 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Баги проекта {{project.name}} {% endblock %} - -{% block main %} - -{% include "project_body.html" %} - -<h3><a href='{% url mgmt.views.all_bugs %}'>Баги:</a></h3> - - -{% if bugs %} - {% if can_report %} - <p><a href='{% url mgmt.views.bug_report project.id %}'>Отправить баг</a></p> - {% endif %} - <div class='bugs'> - {% for bug in bugs %} - <div class='bug bug-state-{{bug.status.id}}'> - <div class='bug-priority'> - <p><strong>Приоритет:</strong> {{bug.priority_str}}</p> - <p><strong>Сложность:</strong> {{bug.complexity_str}}</p> - </div> - <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> - {% if edit_link %} - <div class='links'><a href='{{edit_link}}'>Изменить</a></div> - {% endif %} - {% if bug.component %} - <p><strong>Компонент:</strong> {{bug.component}}</p> - {% endif %} - <p><strong>Получаемое поведение:</strong> {{bug.unexpected}}</p> - <div>{{bug.text|markdown|safe}}</div> - </div> - {% endfor %} - </div> - {% include "pager.html" %} -{% else %} -<p>В этом проекте нет багов.</p> -{%endif%} - -{% if can_report %} - <p><a href='{% url mgmt.views.bug_report project.id %}'>Отправить баг</a></p> -{% endif %} - -{% endblock %} diff --git a/templates/project_docs.html b/templates/project_docs.html deleted file mode 100644 index f85c54c..0000000 --- a/templates/project_docs.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Документация по проекту {{project.name}}{% endblock %} - -{% block main %} - - <h2>Документация по проекту {{project|link|safe}}</h2> - {%if categories %} - {% for cat in categories %} - <h3>{{cat.title}}:</h3> - <ul class='documents'> - {% category_documents project cat as docs %} - {% for doc in docs %} - <li><a href='{% url mgmt.views.one_document doc.id %}'>{{doc.name}}</a></li> - {% endfor %} - </ul> - {% endfor %} - {%else%} - <p>Документации пока нет.</p> - {%endif%} - <p><a href='{% url mgmt.views.create_document project.id %}'>Создать страницу документации</a></p> - -{% endblock %} - diff --git a/templates/project_tasks.html b/templates/project_tasks.html deleted file mode 100644 index 0e31028..0000000 --- a/templates/project_tasks.html +++ /dev/null @@ -1,23 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Задания по проекту {{project.name}}{% endblock %} - -{% block main %} -<h2>Задания по проекту {{project.name}}</h2> - -{% if tasks %} - {% if can_task %} - <p><a href='{% url mgmt.views.create_task project.id %}'>Добавить задание</a></p> - {% endif %} - - {% include "tasks_table.html" %} -{% else %} - <p>Заданий по этому проекту нет.</p> -{% endif %} - -{% if can_task %} -<p><a href='{% url mgmt.views.create_task project.id %}'>Добавить задание</a></p> -{% endif %} - -{% endblock %} diff --git a/templates/registration/logged_out.html b/templates/registration/logged_out.html deleted file mode 100644 index d339ef0..0000000 --- a/templates/registration/logged_out.html +++ /dev/null @@ -1,12 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a></div>{% endblock %} - -{% block content %} - -<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p> - -<p><a href="../">{% trans 'Log in again' %}</a></p> - -{% endblock %} diff --git a/templates/registration/login.html b/templates/registration/login.html deleted file mode 100644 index c8b953c..0000000 --- a/templates/registration/login.html +++ /dev/null @@ -1,17 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Вход в систему{% endblock %} - -{% block main %} - -{% if form.errors %} - <p class="error">Сожалеем, вы неправильно ввели логин или пароль</p> -{% endif %} - - <form action='/login/' method='post'> - <p><label for="username">Логин:</label><input type="text" name="username" value="" id="username"/></p> - <p><label for="password">Пароль:</label><input type="password" name="password" value="" id="password"/></p> - <input type='hidden' name='next' value='/'/> - <input type="submit" value="login" /> - </form> -{% endblock %} diff --git a/templates/registration/password_change_done.html b/templates/registration/password_change_done.html deleted file mode 100644 index 4498c63..0000000 --- a/templates/registration/password_change_done.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} -{% block breadcrumbs %}<div class="breadcrumbs"><a href="../../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} - -{% block title %}{% trans 'Password change successful' %}{% endblock %} - -{% block content %} - -<h1>{% trans 'Password change successful' %}</h1> - -<p>{% trans 'Your password was changed.' %}</p> - -{% endblock %} diff --git a/templates/registration/password_change_form.html b/templates/registration/password_change_form.html deleted file mode 100644 index cd2b1e0..0000000 --- a/templates/registration/password_change_form.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} -{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password change' %}</div>{% endblock %} - -{% block title %}{% trans 'Password change' %}{% endblock %} - -{% block content %} - -<h1>{% trans 'Password change' %}</h1> - -<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p> - -<form action="" method="post"> - -{% if form.old_password.errors %}{{ form.old_password.html_error_list }}{% endif %} -<p class="aligned wide"><label for="id_old_password">{% trans 'Old password:' %}</label>{{ form.old_password }}</p> -{% if form.new_password1.errors %}{{ form.new_password1.html_error_list }}{% endif %} -<p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> -{% if form.new_password2.errors %}{{ form.new_password2.html_error_list }}{% endif %} -<p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> - -<p><input type="submit" value="{% trans 'Change my password' %}" /></p> -</form> - -{% endblock %} diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html deleted file mode 100644 index f97b568..0000000 --- a/templates/registration/password_reset_done.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} - -{% block title %}{% trans 'Password reset successful' %}{% endblock %} - -{% block content %} - -<h1>{% trans 'Password reset successful' %}</h1> - -<p>{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}</p> - -{% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html deleted file mode 100644 index f765dd0..0000000 --- a/templates/registration/password_reset_email.html +++ /dev/null @@ -1,15 +0,0 @@ -{% load i18n %} -{% trans "You're receiving this e-mail because you requested a password reset" %} -{% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. - -{% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %} - -{% trans "Feel free to change this password by going to this page:" %} - -http://{{ domain }}/password_change/ - -{% trans "Your username, in case you've forgotten:" %} {{ user.username }} - -{% trans "Thanks for using our site!" %} - -{% blocktrans %}The {{ site_name }} team{% endblocktrans %} diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html deleted file mode 100644 index 423821b..0000000 --- a/templates/registration/password_reset_form.html +++ /dev/null @@ -1,19 +0,0 @@ -{% extends "admin/base_site.html" %} -{% load i18n %} - -{% block breadcrumbs %}<div class="breadcrumbs"><a href="../">{% trans 'Home' %}</a> › {% trans 'Password reset' %}</div>{% endblock %} - -{% block title %}{% trans "Password reset" %}{% endblock %} - -{% block content %} - -<h1>{% trans "Password reset" %}</h1> - -<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}</p> - -<form action="" method="post"> -{% if form.email.errors %}{{ form.email.html_error_list }}{% endif %} -<p><label for="id_email">{% trans 'E-mail address:' %}</label> {{ form.email }} <input type="submit" value="{% trans 'Reset my password' %}" /></p> -</form> - -{% endblock %} diff --git a/templates/repo.html b/templates/repo.html deleted file mode 100644 index de8b5e7..0000000 --- a/templates/repo.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends "base.html" %} - -{% block title %}Репозиторий: {{description}}{% endblock %} - -{% block main %} - -<div class='links'> - <a href='{% url pygit.views.tarball rid,current_branch %}'>Скачать в tar.gz</a> -</div> - -<h2>Репозиторий: {{description}}</h2> - -<div class='links'> - Ветви: - {% for branch in branches %} - <a href='{% url pygit.views.one_repo rid %}{{branch}}/'>{{branch}}</a> - {% endfor %} -</div> - -<h3>Активность:</h3> -{{activity_chart|safe}} - -<h3><a href='{% url pygit.views.commits rid,current_branch %}'>Последние коммиты:</a></h3> -{% include "commits_table.html" %} - -{% if tags %} -<div class='git-tags'> - <h3>Теги:</h3> - <ul> - {% for tag in tags %} - <li><a href='{% url pygit.views.diff_all rid,current_branch,tag %}'>{{tag}}</a></li> - {% endfor %} - </ul> -</div> -{% endif %} - -<h3>Файлы:</h3> - -<ul> - {% for id,name in dirs %} - <li><a href='{% url pygit.views.tree rid,current_branch,id,name %}'>{{name}}</a></li> - {% endfor %} - {% for id,name in files %} - <li><a href='{% url pygit.views.blame rid,current_branch,name %}'>{{name}}</a></li> - {% endfor %} -</ul> - -{% endblock %} diff --git a/templates/report.html b/templates/report.html deleted file mode 100644 index a11029c..0000000 --- a/templates/report.html +++ /dev/null @@ -1,20 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Отчет: {{report.name}}{% endblock %} - -{% block main %} -{% if can_edit %} -<div class='links'> - <a href='{% url mgmt.views.edit_report report.id %}'>Изменить</a> -</div> -{% endif %} -<h2>Отчет: {{report.name}}</h2> - -<div class='report'> - <p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page report.author.username %}'>{{report.author.username}}</a></p> - <p><strong>Задание:</strong> <a href='{% url mgmt.views.one_task report.task.id %}'>{{report.task.name}}</a></p> - - {{report.text|markdown|safe}} -</div> -{% endblock %} diff --git a/templates/repos.html b/templates/repos.html deleted file mode 100644 index 0457d89..0000000 --- a/templates/repos.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} - -{%block title%}Список репозиториев Git{% endblock %} - -{% block main %} - -<h2>Список репозиториев Git</h2> - -<ul> - {% for id,name in repos %} - <li><a href='{% url pygit.views.one_repo id %}'>{{name}}</a></li> - {% endfor %} -</ul> - -{% endblock %} diff --git a/templates/request.html b/templates/request.html deleted file mode 100644 index 0f1b5cc..0000000 --- a/templates/request.html +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Запрос функциональности: {{request.name}}{% endblock %} - -{% block main %} -<div class='links'> - <a href='{% url mgmt.views.requests request.project.id %}'>{{request.project.name}}</a> -</div> -{% if can_edit %} - <div class='links'> - <a href='{% url mgmt.views.edit_request request.id %}'>Изменить</a> - </div> -{% endif %} -<h2>Запрос функциональности #{{request.id}}: {{request.name}}</h2> - -{% if tasks %} - <div class='related-tasks'> - Связанные задания: - {% for task in tasks %} - <a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a> - {% endfor %} - </div> -{% endif %} - -<div class='request request-state-{{request.status}}'> - {{request.text|markdown|safe}} -</div> - -{% if state_form %} - {% form state_form "<input type='hidden' name='action' value='change_state'/>"%} -{% endif %} - -{% include "comments.html" %} - -{% endblock %} diff --git a/templates/requests.html b/templates/requests.html deleted file mode 100644 index 3c046d3..0000000 --- a/templates/requests.html +++ /dev/null @@ -1,28 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Запросы функциональности для проекта {{project.name}}{% endblock %} - -{% block main %} -<h2>Запросы функциональности для проекта <a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></h2> - -{% if requests %} - {% if can_request %} - <p><a href='{% url mgmt.views.create_request project.id %}'>Создать запрос</a></p> - {% endif %} - {% for request in requests %} - <div class='request request-state-{{request.status}}'> - <h3><a href='{% url mgmt.views.one_request request.id %}'>#{{request.id}}: {{request.name}}</a></h3> - {{request.text|markdown|safe}} - </div> - {% endfor %} -{% else %} - <p>Запросов для этого проекта нет.</p> -{% endif %} - -{% if can_request %} - <p><a href='{% url mgmt.views.create_request project.id %}'>Создать запрос</a></p> -{% endif %} - -{% endblock %} - diff --git a/templates/rss.xml b/templates/rss.xml deleted file mode 100644 index 45612ea..0000000 --- a/templates/rss.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0"?> -<rss version="2.0"> -{% load prj_filters %} - -<channel> - <title>{{title}}</title> - <link>http://projects.rtfm-com.ru/</link> - <description>{{description}}</description> - <language>ru-ru</language> - <pubDate>{{pub_date}}</pubDate> - -{% for object in objects %} -<item> - <title>{% if object.title %}{{object.title}}{% else %}{{object.name}}{% endif %}</title> - <link>http://rtfm-server{{object.url}}</link> - <description>{{object.text|markdown|safe}}</description> -</item> -{% endfor %} - -</channel> -</rss> diff --git a/templates/task.html b/templates/task.html deleted file mode 100644 index 5ebe811..0000000 --- a/templates/task.html +++ /dev/null @@ -1,51 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Задание: {{task.name}}{% endblock %} - -{% block main %} -{% if can_edit %} -<div class='links'> - <a href='{% url mgmt.views.edit_task task.id %}'>Изменить</a> -</div> -{% endif %} -<h2>Задание: {{task.name}}</h2> - -<div class='task task-state-{{task.status}}'> - <p><strong>Проект:</strong> <a href='{% url mgmt.views.one_project task.project.id %}'>{{task.project.name}}</a></p> - <p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page task.author.username %}'>{{task.author.username}}</a></p> - <p><strong>Кому:</strong> <a href='{% url mgmt.views.user_page task.to.username %}'>{{task.to.username}}</a></p> - - {% if task.bug %} - <p><strong>Связанный баг:</strong> <a href='{% url mgmt.views.one_bug task.bug.id %}'>{{task.bug.name}}</a></p> - {% endif %} - - {% if task.request %} - <p><strong>Связанный запрос функциональности:</strong> <a href='{% url mgmt.views.one_request task.request.id %}'>{{task.request.name}}</a></p> - {% endif %} - - {{task.text|markdown|safe}} -</div> - -{% if state_form %} - {% form state_form %} -{% endif %} - -{% if reports %} - {% if can_report %} - <p><a href='{% url mgmt.views.create_report task.id %}'>Создать отчет</a></p> - {% endif %} - <h3>Отчеты:</h3> - {% for report in reports %} - <div class='report'> - <h4><a href='{% url mgmt.views.one_report report.id %}'>{{report.name}}</a></h4> - {{report.text|markdown|safe}} - </div> - {% endfor %} -{% endif %} - -{% if can_report %} - <p><a href='{% url mgmt.views.create_report task.id %}'>Создать отчет</a></p> -{% endif %} - -{% endblock %} diff --git a/templates/tasks_table.html b/templates/tasks_table.html deleted file mode 100644 index 7117636..0000000 --- a/templates/tasks_table.html +++ /dev/null @@ -1,13 +0,0 @@ -{% load prj_filters %} - <table> - {% for task in tasks %} - <tr class='task task-state-{{task.status}}'> - <td><a href='{% url mgmt.views.one_project task.project.id %}'>{{task.project.name}}</a></td> - <td><a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a></td> - <td><a href='{% url mgmt.views.user_page task.author.username %}'>{{task.author.username}}</a></td> - <td><a href='{% url mgmt.views.user_page task.to.username %}'>{{task.to.username}}</a></td> - <td>{{task.created}}</td> - <td>{{task.text|teaser|markdown|safe}}</td> - </tr> - {% endfor %} - </table> diff --git a/templates/themes/default/all_bugs.html b/templates/themes/default/all_bugs.html new file mode 100644 index 0000000..c9dae7b --- /dev/null +++ b/templates/themes/default/all_bugs.html @@ -0,0 +1,24 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Все баги{% if state %} в состоянии {{state}}{% endif %}{% endblock %} + +{% block main %} + +<h2>Все баги{% if state %} в состоянии {{state}}{% endif %}</h2> + +<div class='bugs'> +{% for bug in bugs %} + <div class='bug bug-state-{{bug.status.id}}'> + <h3><a href='{% url mgmt.views.one_bug bug.id %}'>{{bug.name}}</a></h3> + <div class='project-link'>{{bug.project|link|safe}}</div> + {% if edit_link %} + <div class='links'><a href='{{edit_link}}'>Изменить</a></div> + {% endif %} + <p>{{bug.text|markdown|safe}}</p> + </div> +{% endfor %} +</div> +{% include "pager.html" %} + +{% endblock %} diff --git a/templates/themes/default/bug.html b/templates/themes/default/bug.html new file mode 100644 index 0000000..07e0848 --- /dev/null +++ b/templates/themes/default/bug.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Баг: {{bug.name}}{% endblock %} + +{% block main %} +{% include "bug_body.html" %} + +{% if change_state %} + <h3>Сменить состояние бага</h3> + {% form change_state "<input type='hidden' name='action' value='change_state'/>" %} +{% endif %} +{% if priority_form %} + <h3>Установить приоритет</h3> + {% form priority_form "<input type='hidden' name='action' value='set_priority'/>" %} +{% endif %} +{% if complexity_form %} + <h3>Указать сложность исправления</h3> + {% form complexity_form "<input type='hidden' name='action' value='set_complexity'/>" %} +{% endif %} + +{% include "comments.html" %} +{% endblock %} diff --git a/templates/themes/default/bug_body.html b/templates/themes/default/bug_body.html new file mode 100644 index 0000000..290e95c --- /dev/null +++ b/templates/themes/default/bug_body.html @@ -0,0 +1,30 @@ + {% load prj_filters %} + <div class='bug bug-state-{{bug.status.id}}'> + <div class='project-link'> + <a href='{% url mgmt.views.project_bugs project.id %}'>{{project.name}}</a> + </div> + <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> + {% if edit_link %} + <div class='links'><a href='{{edit_link}}'>Изменить</a></div> + {% endif %} + <div class='bug-priority'> + <p><strong>Приоритет:</strong> {{priority}}</p> + <p><strong>Сложность:</strong> {{complexity}}</p> + </div> + {% if bug.component %} + <p><strong>Компонент:</strong> {{bug.component}}</p> + {% endif %} + <p><strong>Действия для воспроизведения:</strong> {{bug.actions|markdown|safe}}</p> + <p><strong>Что ожидали:</strong> {{bug.expected|markdown|safe}}</p> + <p><strong>Что получили:</strong> {{bug.unexpected|markdown|safe}}</p> + <div>{{bug.text|markdown|safe}}</div> + {% if tasks %} + <div class='related-tasks'> + Связанные задания: + {% for task in tasks %} + <a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a> + {% endfor %} + </div> + {% endif %} + + </div> diff --git a/templates/themes/default/bug_report.html b/templates/themes/default/bug_report.html new file mode 100644 index 0000000..6568d11 --- /dev/null +++ b/templates/themes/default/bug_report.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Отправить баг в проект {{project.name}}{% endblock %} + +{% block main %} +<h2>Отправить баг в проект {{project.name}}</h2> + +{% form form %} + +{% endblock %} diff --git a/templates/themes/default/comments.html b/templates/themes/default/comments.html new file mode 100644 index 0000000..6a8c58b --- /dev/null +++ b/templates/themes/default/comments.html @@ -0,0 +1,28 @@ +{% load prj_filters %} +{% if comments %} + <h3>Комментарии</h3> + <div class='comments'> + {% for comment in comments %} + <div class='comment'> + <div class='comment-title'> + {% if comment.can_delete %} + <div class='links'> + <a href='{% url mgmt.views.delete_comment comment.id %}'>Удалить</a> + </div> + {% endif %} + <a name='comment-{{comment.id}}'>#</a> + {{comment.title}} от <a href='{% url mgmt.views.user_page comment.author %}'>{{comment.author}}</a>, {{comment.created}} + </div> + <div>{{comment.text|markdown|safe}}</div> + </div> + {% endfor %} + </div> + {% include "pager.html" %} +{% else %} + <p>Комментариев пока нет.</p> +{% endif %} + +{% if form %} +<h3>Отправить комментарий</h3> +{% form form "<input type='hidden' name='action' value='comment'/>" %} +{% endif %} diff --git a/templates/themes/default/commits_table.html b/templates/themes/default/commits_table.html new file mode 100644 index 0000000..6263ed9 --- /dev/null +++ b/templates/themes/default/commits_table.html @@ -0,0 +1,8 @@ +<table> + {% for id,dt,author,message in commits %} + <tr> + <td><a href='{% url pygit.views.diff_all rid,current_branch,id %}'>{{id}}</a></td> + <td>{{dt}}</td><td>{{author}}</td><td>{{message}}</td> + </tr> + {% endfor %} +</table> diff --git a/templates/themes/default/create_article.html b/templates/themes/default/create_article.html new file mode 100644 index 0000000..eb9888b --- /dev/null +++ b/templates/themes/default/create_article.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Создать статью KB{% endblock %} + +{% block main %} +<h2>Создать статью KB</h2> +{% form form %} +{% endblock %} diff --git a/templates/themes/default/create_doc.html b/templates/themes/default/create_doc.html new file mode 100644 index 0000000..47fde7b --- /dev/null +++ b/templates/themes/default/create_doc.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{%block title%}Создать страницу документации{%endblock%} + +{%block main%} +<h2>Создать страницу документации</h2> + +{% if msg %} + <div class='message'> + {{msg}} + </div> +{% endif %} + +{% if form %} + {% form form %} +{% else %} + <p>Вы не можете создавать документацию.</p> +{% endif %} + +{% endblock %} diff --git a/templates/themes/default/create_report.html b/templates/themes/default/create_report.html new file mode 100644 index 0000000..4565fd7 --- /dev/null +++ b/templates/themes/default/create_report.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Создать отчет{% endblock %} + +{% block main %} +<h2>Создать отчет</h2> + +{% form form %} +{% endblock %} diff --git a/templates/themes/default/create_request.html b/templates/themes/default/create_request.html new file mode 100644 index 0000000..814d28a --- /dev/null +++ b/templates/themes/default/create_request.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Создать запрос функциональности для проекта {{project.name}}{% endblock %} + +{% block main %} +<h2>Создать запрос функциональности для проекта {{project.name}}</h2> + +{% form form %} + +{% endblock %} diff --git a/templates/themes/default/create_task.html b/templates/themes/default/create_task.html new file mode 100644 index 0000000..cbeeae4 --- /dev/null +++ b/templates/themes/default/create_task.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Создать задание{% endblock %} + +{% block main %} +<h2>Создать задание</h2> + +{% form form %} +{% endblock %} diff --git a/templates/themes/default/delete.html b/templates/themes/default/delete.html new file mode 100644 index 0000000..c214ab9 --- /dev/null +++ b/templates/themes/default/delete.html @@ -0,0 +1,16 @@ +{% extends "base.html" %} + +{% block title %}Удалить {% if message.name %}{{message.name}}{% else %}{{message.title}}{% endif %}?{% endblock %} + +{% block main %} + +<h2>Удалить {% if message.name %}{{message.name}}{% else %}{{message.title}}{% endif %}?</h2> + +<form method='post' action='.'> + <p><input type='submit' value='Да'/> + <a href='{{referer}}'>Нет</a> + </p> +</form> + +{% endblock %} + diff --git a/templates/themes/default/document.html b/templates/themes/default/document.html new file mode 100644 index 0000000..6fb2340 --- /dev/null +++ b/templates/themes/default/document.html @@ -0,0 +1,22 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{%block title%}Документ: {{document.name}}{%endblock%} + +{% block main %} + +{% if edit_link %} + <div class='links'> + <a href='{{edit_link}}'>Изменить</a> + </div> +{% endif %} +<h2>{{document.category.title}}: {{document.name}}</h2> + +<p>Проект: <a href='{% url mgmt.views.one_project document.project.id %}'>{{document.project.name}}</a></p> +<div class='document'> + {{document.text|markdown|safe}} +</div> + +{% include "comments.html" %} + +{% endblock %} diff --git a/templates/themes/default/edit_article.html b/templates/themes/default/edit_article.html new file mode 100644 index 0000000..5faac0e --- /dev/null +++ b/templates/themes/default/edit_article.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Редактировать статью KB #{{article.id}}: {{article.title}}{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url kb.views.one_article article.id %}'>Просмотреть</a> +</div> +<h2>Редактировать статью KB #{{article.id}}: {{article.title}}</h2> + +{% form form %} + +{% endblock %} diff --git a/templates/themes/default/edit_bug.html b/templates/themes/default/edit_bug.html new file mode 100644 index 0000000..ab924a5 --- /dev/null +++ b/templates/themes/default/edit_bug.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Редактировать баг #{{bug.id}}{% endblock %} + +{% block main %} + +<h2>Редактировать баг #{{bug.id}}</h2> +<div class='links'><a href='{% url mgmt.views.one_bug bug.id %}'>Посмотреть</a></div> + +{% form form %} + +{% endblock %} diff --git a/templates/themes/default/edit_document.html b/templates/themes/default/edit_document.html new file mode 100644 index 0000000..a934d94 --- /dev/null +++ b/templates/themes/default/edit_document.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Редактировать документ: {{document.name}}{% endblock %} + +{% block main %} + +<h2>Редактировать документ</h2> +<div class='links'> + <a href='{% url mgmt.views.one_document document.id %}'>Посмотреть</a> +</div> + +{% form form %} + +{% endblock %} diff --git a/templates/themes/default/edit_report.html b/templates/themes/default/edit_report.html new file mode 100644 index 0000000..8dcf1ea --- /dev/null +++ b/templates/themes/default/edit_report.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Редактировать отчет{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url mgmt.views.one_report report.id %}'>Просмотреть</a> +</div> +<h2>Редактировать отчет: {{report.name}}</h2> + +{% form form %} +{% endblock %} diff --git a/templates/themes/default/edit_request.html b/templates/themes/default/edit_request.html new file mode 100644 index 0000000..6d82e80 --- /dev/null +++ b/templates/themes/default/edit_request.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Изменить запрос: {{rq.name}}{% endblock %} + +{% block main %} +<h2>Изменить запрос: {{rq.name}}</h2> + +{% form form %} +{% endblock %} diff --git a/templates/themes/default/edit_task.html b/templates/themes/default/edit_task.html new file mode 100644 index 0000000..f5e26b2 --- /dev/null +++ b/templates/themes/default/edit_task.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Редактировать задание{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url mgmt.views.one_task task.id %}'>Просмотреть</a> +</div> +<h2>Редактировать задание</h2> + +{% form form %} +{% endblock %} diff --git a/templates/themes/default/git.html b/templates/themes/default/git.html new file mode 100644 index 0000000..35898d8 --- /dev/null +++ b/templates/themes/default/git.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block main %} +<div class='links'>Репозиторий: <a href='{% url pygit.views.one_repo repo.rid %}'>{{repo.description}}</a></div> + + {% block git %} + {% endblock %} +{% endblock %} diff --git a/templates/themes/default/git_blame.html b/templates/themes/default/git_blame.html new file mode 100644 index 0000000..f26dbd3 --- /dev/null +++ b/templates/themes/default/git_blame.html @@ -0,0 +1,17 @@ +{% extends "git.html" %} + +{% block title %}История файла {{path}}{% endblock %} + +{% block git %} +<h2>История файла {{path}}</h2> + +<table> + {% for cid,author,dt,message,line in blame %} + <tr> + <td><a href='{% url pygit.views.diff_file repo.rid,branch,cid,path %}'>{{cid}}</a></td> + <td>{{author}}</td><td>{{dt}}</td><td>{{message}}</td><td>{{forloop.counter}}</td><td>{{line}}</td> + </tr> + {% endfor %} +</table> + +{% endblock %} diff --git a/templates/themes/default/git_commits.html b/templates/themes/default/git_commits.html new file mode 100644 index 0000000..9444769 --- /dev/null +++ b/templates/themes/default/git_commits.html @@ -0,0 +1,15 @@ +{% extends "git.html" %} + +{% block title %}Последние коммиты в репозитории {{repo.description}}{% endblock %} + +{% block git %} +<h1>Последние коммиты в репозитории {{repo.description}}</h1> +<table> + {% for id,dt,author,message in commits %} + <tr> + <td><a href='{% url pygit.views.diff_all repo.rid,current_branch,id %}'>{{id}}</a></td> + <td>{{dt}}</td><td>{{author}}</td><td>{{message}}</td> + </tr> + {% endfor %} +</table> +{% endblock %} diff --git a/templates/themes/default/git_diff.html b/templates/themes/default/git_diff.html new file mode 100644 index 0000000..b6728f2 --- /dev/null +++ b/templates/themes/default/git_diff.html @@ -0,0 +1,25 @@ +{% extends "git.html" %} + +{% block title %}Diff: #{{cid}}{% if path %} {{path}}{% endif %}{% endblock %} + +{% block git %} + +<h2>Diff: #{{cid}}{% if path %} {{path}}{% endif %}</h2> +<div class='links'> + <a href='{% url pygit.views.tarball repo.rid,cid %}'>Скачать в tar.gz</a> +</div> +<p><a href='{% url pygit.views.diff_all repo.rid,branch,cid %}'>Коммит: {{message}}</a></p> +<p>Автор: {{author}}, дата: {{date}}</p> +<p>Всего файлов: {{total_stats.files}}, всего строк: {{total_stats.lines}}, +всего новых строк: {{total_stats.insertions}}, всего удалено строк: {{total_stats.deletions}}</p> +{% autoescape off %} +{% for file,diff,stats in diffs %} + <h3><a href='{% url pygit.views.blame repo.rid,branch,file %}'>{{file}}</a></h3> + <p>Новых строк: {{stats.insertions}}, удалено строк: {{stats.deletions}}</p> + <code><pre> + {{diff}} + </pre></code> +{% endfor %} +{% endautoescape %} + +{% endblock %} diff --git a/templates/themes/default/git_tree.html b/templates/themes/default/git_tree.html new file mode 100644 index 0000000..3338a35 --- /dev/null +++ b/templates/themes/default/git_tree.html @@ -0,0 +1,17 @@ +{% extends "git.html" %} + +{% block title %}Список файлов{% endblock %} + +{% block git %} +<h3>Файлы:</h3> + +<ul> + {% for id,name in dirs %} + <li><a href='{% url pygit.views.tree repo.rid,branch,id,path %}{{name}}/'>{{name}}</a></li> + {% endfor %} + {% for id,name in files %} + <li><a href='{% url pygit.views.blame repo.rid,branch,path %}{{name}}/'>{{name}}</a></li> + {% endfor %} +</ul> + +{% endblock %} diff --git a/templates/themes/default/kb.html b/templates/themes/default/kb.html new file mode 100644 index 0000000..192ae5c --- /dev/null +++ b/templates/themes/default/kb.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block title %}База знаний{% endblock %} + +{% block main %} +<h2>База знаний</h2> + +<p><a href='{% url kb.views.create_article %}'>Создать статью</a></p> + +{% for section in sections %} + {% if section.kbarticle_set.count %} + <h3>{{section.title}}</h3> + <ul> + {% for article in section.kbarticle_set.all %} + <li><a href='{% url kb.views.one_article article.id %}'>{{article.title}}</a></li> + {% endfor %} + </ul> + {% endif %} +{% endfor %} + +<p><a href='{% url kb.views.create_article %}'>Создать статью</a></p> + +{% endblock %} diff --git a/templates/themes/default/kb_article.html b/templates/themes/default/kb_article.html new file mode 100644 index 0000000..58ea852 --- /dev/null +++ b/templates/themes/default/kb_article.html @@ -0,0 +1,17 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Статья KB #{{article.id}}: {{article.title}}{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url kb.views.edit_article article.id %}'>Изменить</a> +</div> +<h2>Статья KB #{{article.id}}: {{article.title}}</h2> + +<p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page article.author.username %}'>{{article.author.username}}</a></p> + +{{article.text|markdown|safe}} + +{% endblock %} + diff --git a/templates/themes/default/main.html b/templates/themes/default/main.html new file mode 100644 index 0000000..e78e541 --- /dev/null +++ b/templates/themes/default/main.html @@ -0,0 +1,11 @@ +{% extends "base.html" %} + +{% block title %}Список проектов{% endblock %} + +{% block main %} + <div id='projects'> + {% for project in projects %} + {% include "project_body.html" %} + {% endfor %} + </div> +{% endblock %} diff --git a/templates/themes/default/pager.html b/templates/themes/default/pager.html new file mode 100644 index 0000000..765d74c --- /dev/null +++ b/templates/themes/default/pager.html @@ -0,0 +1,11 @@ +{% if page_numbers %} +<div class='pager'> + {% for page in page_numbers %} + {% ifequal page current_page %} + <span class='pager pager-current'>{{page}}</span> + {% else %} + <span class='pager pager-other'><a href='?page={{page}}'>{{page}}</a></span> + {% endifequal %} + {% endfor %} +</div> +{% endif %} diff --git a/templates/themes/default/preview.html b/templates/themes/default/preview.html new file mode 100644 index 0000000..51c57ac --- /dev/null +++ b/templates/themes/default/preview.html @@ -0,0 +1,2 @@ +{% load prj_filters %} +{{text|markdown|safe}} diff --git a/templates/themes/default/private_message.html b/templates/themes/default/private_message.html new file mode 100644 index 0000000..ae77da5 --- /dev/null +++ b/templates/themes/default/private_message.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Сообщение: {{message.name}}{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url mgmt.views.delete_private_message message.id %}'>Удалить</a> +</div> + +<h2>{{message.name}}</h2> +<p><strong>От:</strong> <a href='{% url mgmt.views.user_page message.author.username %}'>{{message.author.username}}</a></p> +<p><strong>Отправлено:</strong> {{message.created}}</p> + +<div class='message'> +{{message.text|markdown|safe}} +</div> + +{% endblock %} diff --git a/templates/themes/default/project.html b/templates/themes/default/project.html new file mode 100644 index 0000000..dcdebba --- /dev/null +++ b/templates/themes/default/project.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} + +{% block title %} +Проект: {{ project.name }} +{% endblock %} + +{% block main %} +{% include "project_body.html" %} +{% include "comments.html" %} +{% endblock %} diff --git a/templates/themes/default/project_body.html b/templates/themes/default/project_body.html new file mode 100644 index 0000000..c7b0e82 --- /dev/null +++ b/templates/themes/default/project_body.html @@ -0,0 +1,11 @@ + {% load prj_filters %} + <div class='project'> + <p><strong><a href='{% url mgmt.views.one_project project.id %}'>{{ project.name }}</a></strong></p> + <p><strong>Репозиторий Git:</strong> + {% if project.git_link %} + <a href='{{project.git_link}}'>{{project.repo}}</a> + {% else %} + {{ project.repo }} + {% endif %}</p> + <div>{{ project.text|markdown|safe }}</div> + </div> diff --git a/templates/themes/default/project_bugs.html b/templates/themes/default/project_bugs.html new file mode 100644 index 0000000..377a817 --- /dev/null +++ b/templates/themes/default/project_bugs.html @@ -0,0 +1,45 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Баги проекта {{project.name}} {% endblock %} + +{% block main %} + +{% include "project_body.html" %} + +<h3><a href='{% url mgmt.views.all_bugs %}'>Баги:</a></h3> + + +{% if bugs %} + {% if can_report %} + <p><a href='{% url mgmt.views.bug_report project.id %}'>Отправить баг</a></p> + {% endif %} + <div class='bugs'> + {% for bug in bugs %} + <div class='bug bug-state-{{bug.status.id}}'> + <div class='bug-priority'> + <p><strong>Приоритет:</strong> {{bug.priority_str}}</p> + <p><strong>Сложность:</strong> {{bug.complexity_str}}</p> + </div> + <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> + {% if edit_link %} + <div class='links'><a href='{{edit_link}}'>Изменить</a></div> + {% endif %} + {% if bug.component %} + <p><strong>Компонент:</strong> {{bug.component}}</p> + {% endif %} + <p><strong>Получаемое поведение:</strong> {{bug.unexpected}}</p> + <div>{{bug.text|markdown|safe}}</div> + </div> + {% endfor %} + </div> + {% include "pager.html" %} +{% else %} +<p>В этом проекте нет багов.</p> +{%endif%} + +{% if can_report %} + <p><a href='{% url mgmt.views.bug_report project.id %}'>Отправить баг</a></p> +{% endif %} + +{% endblock %} diff --git a/templates/themes/default/project_docs.html b/templates/themes/default/project_docs.html new file mode 100644 index 0000000..f85c54c --- /dev/null +++ b/templates/themes/default/project_docs.html @@ -0,0 +1,25 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Документация по проекту {{project.name}}{% endblock %} + +{% block main %} + + <h2>Документация по проекту {{project|link|safe}}</h2> + {%if categories %} + {% for cat in categories %} + <h3>{{cat.title}}:</h3> + <ul class='documents'> + {% category_documents project cat as docs %} + {% for doc in docs %} + <li><a href='{% url mgmt.views.one_document doc.id %}'>{{doc.name}}</a></li> + {% endfor %} + </ul> + {% endfor %} + {%else%} + <p>Документации пока нет.</p> + {%endif%} + <p><a href='{% url mgmt.views.create_document project.id %}'>Создать страницу документации</a></p> + +{% endblock %} + diff --git a/templates/themes/default/project_tasks.html b/templates/themes/default/project_tasks.html new file mode 100644 index 0000000..0e31028 --- /dev/null +++ b/templates/themes/default/project_tasks.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Задания по проекту {{project.name}}{% endblock %} + +{% block main %} +<h2>Задания по проекту {{project.name}}</h2> + +{% if tasks %} + {% if can_task %} + <p><a href='{% url mgmt.views.create_task project.id %}'>Добавить задание</a></p> + {% endif %} + + {% include "tasks_table.html" %} +{% else %} + <p>Заданий по этому проекту нет.</p> +{% endif %} + +{% if can_task %} +<p><a href='{% url mgmt.views.create_task project.id %}'>Добавить задание</a></p> +{% endif %} + +{% endblock %} diff --git a/templates/themes/default/repo.html b/templates/themes/default/repo.html new file mode 100644 index 0000000..de8b5e7 --- /dev/null +++ b/templates/themes/default/repo.html @@ -0,0 +1,48 @@ +{% extends "base.html" %} + +{% block title %}Репозиторий: {{description}}{% endblock %} + +{% block main %} + +<div class='links'> + <a href='{% url pygit.views.tarball rid,current_branch %}'>Скачать в tar.gz</a> +</div> + +<h2>Репозиторий: {{description}}</h2> + +<div class='links'> + Ветви: + {% for branch in branches %} + <a href='{% url pygit.views.one_repo rid %}{{branch}}/'>{{branch}}</a> + {% endfor %} +</div> + +<h3>Активность:</h3> +{{activity_chart|safe}} + +<h3><a href='{% url pygit.views.commits rid,current_branch %}'>Последние коммиты:</a></h3> +{% include "commits_table.html" %} + +{% if tags %} +<div class='git-tags'> + <h3>Теги:</h3> + <ul> + {% for tag in tags %} + <li><a href='{% url pygit.views.diff_all rid,current_branch,tag %}'>{{tag}}</a></li> + {% endfor %} + </ul> +</div> +{% endif %} + +<h3>Файлы:</h3> + +<ul> + {% for id,name in dirs %} + <li><a href='{% url pygit.views.tree rid,current_branch,id,name %}'>{{name}}</a></li> + {% endfor %} + {% for id,name in files %} + <li><a href='{% url pygit.views.blame rid,current_branch,name %}'>{{name}}</a></li> + {% endfor %} +</ul> + +{% endblock %} diff --git a/templates/themes/default/report.html b/templates/themes/default/report.html new file mode 100644 index 0000000..a11029c --- /dev/null +++ b/templates/themes/default/report.html @@ -0,0 +1,20 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Отчет: {{report.name}}{% endblock %} + +{% block main %} +{% if can_edit %} +<div class='links'> + <a href='{% url mgmt.views.edit_report report.id %}'>Изменить</a> +</div> +{% endif %} +<h2>Отчет: {{report.name}}</h2> + +<div class='report'> + <p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page report.author.username %}'>{{report.author.username}}</a></p> + <p><strong>Задание:</strong> <a href='{% url mgmt.views.one_task report.task.id %}'>{{report.task.name}}</a></p> + + {{report.text|markdown|safe}} +</div> +{% endblock %} diff --git a/templates/themes/default/repos.html b/templates/themes/default/repos.html new file mode 100644 index 0000000..0457d89 --- /dev/null +++ b/templates/themes/default/repos.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{%block title%}Список репозиториев Git{% endblock %} + +{% block main %} + +<h2>Список репозиториев Git</h2> + +<ul> + {% for id,name in repos %} + <li><a href='{% url pygit.views.one_repo id %}'>{{name}}</a></li> + {% endfor %} +</ul> + +{% endblock %} diff --git a/templates/themes/default/request.html b/templates/themes/default/request.html new file mode 100644 index 0000000..0f1b5cc --- /dev/null +++ b/templates/themes/default/request.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Запрос функциональности: {{request.name}}{% endblock %} + +{% block main %} +<div class='links'> + <a href='{% url mgmt.views.requests request.project.id %}'>{{request.project.name}}</a> +</div> +{% if can_edit %} + <div class='links'> + <a href='{% url mgmt.views.edit_request request.id %}'>Изменить</a> + </div> +{% endif %} +<h2>Запрос функциональности #{{request.id}}: {{request.name}}</h2> + +{% if tasks %} + <div class='related-tasks'> + Связанные задания: + {% for task in tasks %} + <a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a> + {% endfor %} + </div> +{% endif %} + +<div class='request request-state-{{request.status}}'> + {{request.text|markdown|safe}} +</div> + +{% if state_form %} + {% form state_form "<input type='hidden' name='action' value='change_state'/>"%} +{% endif %} + +{% include "comments.html" %} + +{% endblock %} diff --git a/templates/themes/default/requests.html b/templates/themes/default/requests.html new file mode 100644 index 0000000..3c046d3 --- /dev/null +++ b/templates/themes/default/requests.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Запросы функциональности для проекта {{project.name}}{% endblock %} + +{% block main %} +<h2>Запросы функциональности для проекта <a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></h2> + +{% if requests %} + {% if can_request %} + <p><a href='{% url mgmt.views.create_request project.id %}'>Создать запрос</a></p> + {% endif %} + {% for request in requests %} + <div class='request request-state-{{request.status}}'> + <h3><a href='{% url mgmt.views.one_request request.id %}'>#{{request.id}}: {{request.name}}</a></h3> + {{request.text|markdown|safe}} + </div> + {% endfor %} +{% else %} + <p>Запросов для этого проекта нет.</p> +{% endif %} + +{% if can_request %} + <p><a href='{% url mgmt.views.create_request project.id %}'>Создать запрос</a></p> +{% endif %} + +{% endblock %} + diff --git a/templates/themes/default/task.html b/templates/themes/default/task.html new file mode 100644 index 0000000..5ebe811 --- /dev/null +++ b/templates/themes/default/task.html @@ -0,0 +1,51 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Задание: {{task.name}}{% endblock %} + +{% block main %} +{% if can_edit %} +<div class='links'> + <a href='{% url mgmt.views.edit_task task.id %}'>Изменить</a> +</div> +{% endif %} +<h2>Задание: {{task.name}}</h2> + +<div class='task task-state-{{task.status}}'> + <p><strong>Проект:</strong> <a href='{% url mgmt.views.one_project task.project.id %}'>{{task.project.name}}</a></p> + <p><strong>Автор:</strong> <a href='{% url mgmt.views.user_page task.author.username %}'>{{task.author.username}}</a></p> + <p><strong>Кому:</strong> <a href='{% url mgmt.views.user_page task.to.username %}'>{{task.to.username}}</a></p> + + {% if task.bug %} + <p><strong>Связанный баг:</strong> <a href='{% url mgmt.views.one_bug task.bug.id %}'>{{task.bug.name}}</a></p> + {% endif %} + + {% if task.request %} + <p><strong>Связанный запрос функциональности:</strong> <a href='{% url mgmt.views.one_request task.request.id %}'>{{task.request.name}}</a></p> + {% endif %} + + {{task.text|markdown|safe}} +</div> + +{% if state_form %} + {% form state_form %} +{% endif %} + +{% if reports %} + {% if can_report %} + <p><a href='{% url mgmt.views.create_report task.id %}'>Создать отчет</a></p> + {% endif %} + <h3>Отчеты:</h3> + {% for report in reports %} + <div class='report'> + <h4><a href='{% url mgmt.views.one_report report.id %}'>{{report.name}}</a></h4> + {{report.text|markdown|safe}} + </div> + {% endfor %} +{% endif %} + +{% if can_report %} + <p><a href='{% url mgmt.views.create_report task.id %}'>Создать отчет</a></p> +{% endif %} + +{% endblock %} diff --git a/templates/themes/default/tasks_table.html b/templates/themes/default/tasks_table.html new file mode 100644 index 0000000..7117636 --- /dev/null +++ b/templates/themes/default/tasks_table.html @@ -0,0 +1,13 @@ +{% load prj_filters %} + <table> + {% for task in tasks %} + <tr class='task task-state-{{task.status}}'> + <td><a href='{% url mgmt.views.one_project task.project.id %}'>{{task.project.name}}</a></td> + <td><a href='{% url mgmt.views.one_task task.id %}'>{{task.name}}</a></td> + <td><a href='{% url mgmt.views.user_page task.author.username %}'>{{task.author.username}}</a></td> + <td><a href='{% url mgmt.views.user_page task.to.username %}'>{{task.to.username}}</a></td> + <td>{{task.created}}</td> + <td>{{task.text|teaser|markdown|safe}}</td> + </tr> + {% endfor %} + </table> diff --git a/templates/themes/default/user_page.html b/templates/themes/default/user_page.html new file mode 100644 index 0000000..e2f7590 --- /dev/null +++ b/templates/themes/default/user_page.html @@ -0,0 +1,76 @@ +{% extends "base.html" %} +{% load prj_filters %} + +{% block title %}Пользователь {{user_view.username}}{% endblock %} + +{% block main %} +<h2>Пользователь {{user_view.username}}</h2> + +{% if form %} + <h3>Отправить сообщение</h3> + {% form form %} +{% else %} + <h3>Сообщения</h3> + <table> + {% for message in private_messages %} + <tr> + <td><a href='{% url mgmt.views.private_message message.id %}'>{{message.name}}</a></td> + <td>{{message.author.username}}</td><td>{{message.created}}</td> + <td><a href='{% url mgmt.views.delete_private_message message.id %}'>Удалить</a></td> + </tr> + {% endfor %} + </table> +{% endif %} + +{% if projects_admin %} + <h3>Администрирует проекты:</h3> + <ul> + {% for project in projects_admin %} + <li><a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></li> + {% endfor %} + </ul> +{% endif %} + +{% if projects_team %} + <h3>В команде проектов:</h3> + <ul> + {% for project in projects_team %} + <li><a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></li> + {% endfor %} + </ul> +{% endif %} + +{% if tasks %} + <h3>Задания:</h3> + {% include "tasks_table.html" %} +{% endif %} + +{% if reports %} + <h3>Отчеты:</h3> + <table> + {% for report in reports %} + <tr> + <td><a href='{% url mgmt.views.one_task report.task.id%}'>{{report.task.name}}</a></td> + <td><a href='{% url mgmt.views.one_report report.id %}'>{{report.name}}</a></td> + <td><a href='{% url mgmt.views.edit_report report.id %}'>Изменить</a></td> + </tr> + {% endfor %} + </table> +{% endif %} + +{% if bugs_resp %} + <h3>Отвечает за баги:</h3> + <div class='bugs'> + {% for bug in bugs_resp %} + <div class='bug bug-state-{{bug.status.id}}'> + <div class='project-link'>{{bug.project|link|safe}}</div> + <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> + {% if edit_link %} + <div class='links'><a href='{{edit_link}}'>Изменить</a></div> + {% endif %} + <p>{{bug.text|markdown|safe}}</p> + </div> + {% endfor %} + </div> +{% endif %} +{% endblock %} diff --git a/templates/user_page.html b/templates/user_page.html deleted file mode 100644 index e2f7590..0000000 --- a/templates/user_page.html +++ /dev/null @@ -1,76 +0,0 @@ -{% extends "base.html" %} -{% load prj_filters %} - -{% block title %}Пользователь {{user_view.username}}{% endblock %} - -{% block main %} -<h2>Пользователь {{user_view.username}}</h2> - -{% if form %} - <h3>Отправить сообщение</h3> - {% form form %} -{% else %} - <h3>Сообщения</h3> - <table> - {% for message in private_messages %} - <tr> - <td><a href='{% url mgmt.views.private_message message.id %}'>{{message.name}}</a></td> - <td>{{message.author.username}}</td><td>{{message.created}}</td> - <td><a href='{% url mgmt.views.delete_private_message message.id %}'>Удалить</a></td> - </tr> - {% endfor %} - </table> -{% endif %} - -{% if projects_admin %} - <h3>Администрирует проекты:</h3> - <ul> - {% for project in projects_admin %} - <li><a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></li> - {% endfor %} - </ul> -{% endif %} - -{% if projects_team %} - <h3>В команде проектов:</h3> - <ul> - {% for project in projects_team %} - <li><a href='{% url mgmt.views.one_project project.id %}'>{{project.name}}</a></li> - {% endfor %} - </ul> -{% endif %} - -{% if tasks %} - <h3>Задания:</h3> - {% include "tasks_table.html" %} -{% endif %} - -{% if reports %} - <h3>Отчеты:</h3> - <table> - {% for report in reports %} - <tr> - <td><a href='{% url mgmt.views.one_task report.task.id%}'>{{report.task.name}}</a></td> - <td><a href='{% url mgmt.views.one_report report.id %}'>{{report.name}}</a></td> - <td><a href='{% url mgmt.views.edit_report report.id %}'>Изменить</a></td> - </tr> - {% endfor %} - </table> -{% endif %} - -{% if bugs_resp %} - <h3>Отвечает за баги:</h3> - <div class='bugs'> - {% for bug in bugs_resp %} - <div class='bug bug-state-{{bug.status.id}}'> - <div class='project-link'>{{bug.project|link|safe}}</div> - <h3><a href='{% url mgmt.views.one_bug bug.id %}'>Баг #{{bug.id}}: {{bug.name}}</a></h3> - {% if edit_link %} - <div class='links'><a href='{{edit_link}}'>Изменить</a></div> - {% endif %} - <p>{{bug.text|markdown|safe}}</p> - </div> - {% endfor %} - </div> -{% endif %} -{% endblock %}