Skip to content

Commit

Permalink
* issues use now the slug (and not the id) for coloring in issue list
Browse files Browse the repository at this point in the history
* restyle of profile
* add change/reset password functions
* minor repairs of templates
  • Loading branch information
chris committed Dec 10, 2009
1 parent a06870f commit cc1d2aa
Show file tree
Hide file tree
Showing 14 changed files with 166 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -6,3 +6,4 @@ djtracker.egg-info
docs/build
*.rst~
*.rst\~
.tmp_*~
2 changes: 1 addition & 1 deletion djtracker/templates/djtracker/blocks/issue_list.html
Expand Up @@ -12,7 +12,7 @@
{% endif %}
</tr>
{% for issue in issue_list %}
<tr class="prio{{issue.priority.pk}}">
<tr class="prio-{{issue.priority.slug}}">
{% if issues_with_project %}
<td><a href="{{ issue.project.get_absolute_url }}">{{issue.project}}</a></td>
{% endif %}
Expand Down
21 changes: 15 additions & 6 deletions djtracker/templates/djtracker/djtracker.css
Expand Up @@ -189,21 +189,30 @@ td.col {
background:#E5ECF9 none repeat scroll 0 0;
}

.prio1, .prio2, .prio3 {
.prio-critical, .prio-urgent {
background-color:#FFDEDE;
}

/* form styling */
.errorlist {
color: red;
form th {
text-align: left;
vertical-align: top;
}

ul.errorlist {
ul.errorlist, #mainwrap ul.errorlist {
margin: 0;
padding: 0;
list-style: none;
margin: 2px !important;
display: inline;
}

.errorlist li {
color: red;
display: block;
margin: 0 0 3px;
padding: 4px 5px;
}


/* COPYRIGHT INFO */
#copyright {
clear: both;
Expand Down
Expand Up @@ -3,7 +3,6 @@
{% if form.errors %}
<p>Your username and password didn't match. Please try again.</p>
{% endif %}

<form method="post" action="{% url django.contrib.auth.views.login %}">
<table>
<tr>
Expand All @@ -14,10 +13,10 @@
<td>{{ form.password.label_tag }}</td>
<td>{{ form.password }}</td>
</tr>
</table>

</table>
<input type="submit" value="Login" />
<input type="hidden" name="next" value="{% url project_user_dashboard %}" />
<input type="hidden" name="next" value="{% url project_user_dashboard %}" />
</form>
<p><small>Forgot your password? Click <a href="{% url django.contrib.auth.views.password_reset %}">here</a> to get a fresh one.</small></p>
{% endblock %}

File renamed without changes.
12 changes: 12 additions & 0 deletions djtracker/templates/djtracker/profile/password_change_done.html
@@ -0,0 +1,12 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password change successful' %}{% endblock %}

{% block content %}

<h3>{% trans 'Password change successful' %}</h3>

<p>{% trans 'Your password was changed.' %}</p>

{% endblock %}
17 changes: 17 additions & 0 deletions djtracker/templates/djtracker/profile/password_change_form.html
@@ -0,0 +1,17 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password change' %}{% endblock %}

{% block content %}

<h3>{% trans 'Password change' %}</h3>

<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">
<table>{{form.as_table}}</table>
<input type="submit" value="{% trans 'Change my password' %}" />
</form>

{% endblock %}
14 changes: 14 additions & 0 deletions djtracker/templates/djtracker/profile/password_reset_complete.html
@@ -0,0 +1,14 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password reset complete' %}{% endblock %}

{% block content %}

<h3>{% trans 'Password reset complete' %}</h3>

<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>

<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>

{% endblock %}
27 changes: 27 additions & 0 deletions djtracker/templates/djtracker/profile/password_reset_confirm.html
@@ -0,0 +1,27 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password reset' %}{% endblock %}

{% block content %}

{% if validlink %}

<h3>{% trans 'Enter new password' %}</h3>

<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

<form action="" method="post">
<table>{{form.as_table}}</table>
<input type="submit" value="{% trans 'Change my password' %}" />
</form>

{% else %}

<h3>{% trans 'Password reset unsuccessful' %}</h3>

<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>

{% endif %}

{% endblock %}
12 changes: 12 additions & 0 deletions djtracker/templates/djtracker/profile/password_reset_done.html
@@ -0,0 +1,12 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans 'Password reset successful' %}{% endblock %}

{% block content %}

<h3>{% trans 'Password reset successful' %}</h3>

<p>{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}</p>

{% endblock %}
17 changes: 17 additions & 0 deletions djtracker/templates/djtracker/profile/password_reset_form.html
@@ -0,0 +1,17 @@
{% extends "djtracker/base.html" %}
{% load i18n %}

{% block title %}{% trans "Password reset" %}{% endblock %}

{% block content %}

<h3>{% trans "Password reset" %}</h3>

<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}</p>

<form action="" method="post">
<table>{{form.as_table}}</table>
<input type="submit" value="{% trans 'Reset my password' %}" />
</form>

{% endblock %}
50 changes: 25 additions & 25 deletions djtracker/templates/djtracker/user_profile.html
@@ -1,36 +1,36 @@
{% extends "djtracker/base.html" %}

{% block head %}
<script type="text/javascript">
{% include 'djtracker/sorttable.js' %}
</script>
{% endblock %}

{% block content %}
{% if user %}
<h3>User: {{ user.username }}</h3>
<h3><small class="inlineaction"><a href="{% url django.contrib.auth.views.password_change %}">change password</a></small>User: {{ user.username }}</h3>
<p>IM Information: {{ profile.instant_messanger }}</p>
{% if request.user.is_authenticated %}
<p>Email: <a href="mailto:{{ user.email }}">{{ user.email }}</a>
{% endif %}
<hr />
{% if assigned %}
{% for issue in assigned %}
{% if forloop.first %}
<h4>Assigned Issues:</h4>
<ul>
{% endif %}
<p><li><a href="{{ issue.get_absolute_url }}">{{ issue }}</a></li></p>
{% if forloop.last %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{% with 1 as issues_with_project %}
{% if assigned %}
<div class="hideable">
<h4>Issues assigned to me</h4>
{% with assigned as issue_list %}
{% include 'djtracker/blocks/issue_list.html' %}
{% endwith %}
</div>
{% endif %}
{% if created %}
{% for issue in created %}
{% if forloop.first %}
<h4>Created Issues:</h4>
<ul>
{% endif %}
<p><li><a href="{{ issue.get_absolute_url }}">{{ issue }}</a></li></p>
{% if forloop.last %}
</ul>
{% endif %}
{% endfor %}
<div class="hideable">
<h4>Issues created by me</h4>
{% with created as issue_list %}
{% include 'djtracker/blocks/issue_list.html' %}
{% endwith %}
</div>
{% endif %}
{% endwith %}
{% endif %}
{% endblock %}

2 changes: 1 addition & 1 deletion djtracker/templates/registration/registration_form.html
@@ -1,7 +1,7 @@
{% extends "djtracker/base.html" %}
{% block content %}
<form method="post" action="">
{{ form.as_p }}
<table>{{ form.as_table }}</table>
<input type="submit" value="Register" />
</form>
{% endblock %}
25 changes: 21 additions & 4 deletions djtracker/urls.py
Expand Up @@ -48,10 +48,27 @@

urlpatterns += patterns('',
(r'^profile/login/$', 'django.contrib.auth.views.login',
{'template_name': 'djtracker/login.html'},
{'template_name': 'djtracker/profile/login.html'},
'project_login'),
(r'^profile/logout/$', 'django.contrib.auth.views.logout',
{'template_name': 'djtracker/logout.html', 'next_page': '/'},
'project_logout'),

{'template_name': 'djtracker/profile/logout.html', 'next_page': '/'},
'project_logout'),
(r'^profile/password_change/$', 'django.contrib.auth.views.password_change',
{'template_name': 'djtracker/profile/password_change_form.html'},
'password_change'),
(r'^profile/password_change/done/$', 'django.contrib.auth.views.password_change_done',
{'template_name': 'djtracker/profile/password_change_done.html'},
'password_change_done'),
(r'^profile/password_reset/$', 'django.contrib.auth.views.password_reset',
{'template_name': 'djtracker/profile/password_reset_form.html'},
'password_reset'),
(r'^profile/password_reset/done/$', 'django.contrib.auth.views.password_reset_done',
{'template_name': 'djtracker/profile/password_reset_done.html'},
'password_reset_done'),
(r'^profile/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm',
{'template_name': 'djtracker/profile/password_reset_confirm.html'},
'password_reset_confirm'),
(r'^profile/reset/done/$', 'django.contrib.auth.views.password_reset_complete',
{'template_name': 'djtracker/profile/password_reset_complete.html'},
'password_reset_complete'),
)

0 comments on commit cc1d2aa

Please sign in to comment.