stronghold (auth) & begin assignee
This commit is contained in:
parent
7f91c790ec
commit
153a40ca54
3 changed files with 36 additions and 24 deletions
|
@ -171,6 +171,8 @@ class Event(models.Model):
|
|||
REFERENCE = 9
|
||||
COMMENT = 10
|
||||
DESCRIBE = 11
|
||||
ASSIGN = 12
|
||||
UNASSIGN = 13
|
||||
|
||||
issue = models.ForeignKey(Issue, related_name="%(class)ss")
|
||||
|
||||
|
@ -202,7 +204,8 @@ class Event(models.Model):
|
|||
|
||||
def glyphicon(self):
|
||||
|
||||
if self.code == Event.COMMENT or self.code == Event.DESCRIBE:
|
||||
if self.code == Event.COMMENT \
|
||||
or self.code == Event.DESCRIBE:
|
||||
return "pencil"
|
||||
elif self.code == Event.CLOSE:
|
||||
return "ban-circle"
|
||||
|
@ -210,18 +213,18 @@ class Event(models.Model):
|
|||
return "refresh"
|
||||
elif self.code == Event.RENAME:
|
||||
return "transfer"
|
||||
elif self.code == Event.ADD_LABEL:
|
||||
elif self.code == Event.ADD_LABEL \
|
||||
or self.code == Event.DEL_LABEL:
|
||||
return "tag"
|
||||
elif self.code == Event.DEL_LABEL:
|
||||
return "tag"
|
||||
elif self.code == Event.SET_MILESTONE:
|
||||
return "road"
|
||||
elif self.code == Event.CHANGE_MILESTONE:
|
||||
return "road"
|
||||
elif self.code == Event.DEL_MILESTONE:
|
||||
elif self.code == Event.SET_MILESTONE \
|
||||
or self.code == Event.CHANGE_MILESTONE \
|
||||
or self.code == Event.DEL_MILESTONE:
|
||||
return "road"
|
||||
elif self.code == Event.REFERENCE:
|
||||
return "transfer"
|
||||
elif self.code == Event.ASSIGN \
|
||||
or self.code == Event.UNASSIGN:
|
||||
return "user"
|
||||
else:
|
||||
return "cog"
|
||||
|
||||
|
|
|
@ -96,17 +96,13 @@
|
|||
{% if labels.count %}
|
||||
{% for label in labels %}
|
||||
<li role="presentation">
|
||||
<a href="{% url 'add-label-to-issue' project.name issue.id label.id %}">
|
||||
<span class="label" style="{{ label.style }}">{{ label }}</span>
|
||||
</a>
|
||||
<a href="{% url 'add-label-to-issue' project.name issue.id label.id %}"><span class="label" style="{{ label.style }}">{{ label }}</span></a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<li role="presentation" class="divider"></li>
|
||||
{% endif %}
|
||||
<li role="presentation">
|
||||
<a href="{% url 'add-label' project.name %}?issue={{ issue.id }}">
|
||||
<button class="btn btn-success btn-xs btn-block">New label...</button>
|
||||
</a>
|
||||
<a href="{% url 'add-label' project.name %}?issue={{ issue.id }}"><button class="btn btn-success btn-xs btn-block">New label...</button></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -115,12 +111,8 @@
|
|||
{% if issue.labels.count %}
|
||||
{% for label in issue.labels.all %}
|
||||
<div class="row">
|
||||
<a href="{% url 'remove-label-from-issue' project.name issue.id label.id %}">
|
||||
<span class="glyphicon glyphicon-remove remove-label"></span>
|
||||
</a>
|
||||
<a href="{% url 'list-issue' project.name %}?q=is:open%20label:{{ label.name }}">
|
||||
<span class="label" style="{{ label.style }}">{{ label }}</span>
|
||||
</a>
|
||||
<a href="{% url 'remove-label-from-issue' project.name issue.id label.id %}"><span class="glyphicon glyphicon-remove remove-label"></span></a>
|
||||
<a href="{% url 'list-issue' project.name %}?q=is:open%20label:{{ label.name }}"><span class="label" style="{{ label.style }}">{{ label }}</span></a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
|
@ -130,9 +122,7 @@
|
|||
<h5>
|
||||
<b>Milestons</b>
|
||||
<div class="pull-right">
|
||||
<a href="#">
|
||||
<button class="btn btn-default btn-xs"><span class="glyphicon glyphicon-plus"></span></button>
|
||||
</a>
|
||||
<a href="#"><button class="btn btn-default btn-xs"><span class="glyphicon glyphicon-cog"></span></button></a>
|
||||
</div>
|
||||
</h5>
|
||||
{% if issue.milestones.count %}
|
||||
|
@ -142,6 +132,18 @@
|
|||
{% else %}
|
||||
No milestone
|
||||
{% endif %}
|
||||
<hr>
|
||||
<h5>
|
||||
<b>Assignee</b>
|
||||
<div class="pull-right">
|
||||
<a href="#"><button class="btn btn-default btn-xs"><span class="glyphicon glyphicon-cog"></span></button></a>
|
||||
</div>
|
||||
</h5>
|
||||
{% if issue.assignee %}
|
||||
<a href="{% url 'list-issue' project.name %}?q=is:open%20author:{{ assignee.username }}"><b>{{ assignee.username }}</b></a>
|
||||
{% else %}
|
||||
No one assigned
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -37,6 +37,9 @@ INSTALLED_APPS = (
|
|||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
'django.contrib.humanize',
|
||||
|
||||
'stronghold',
|
||||
'django_markdown',
|
||||
'crispy_forms',
|
||||
'colorful',
|
||||
|
@ -51,6 +54,8 @@ MIDDLEWARE_CLASSES = (
|
|||
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
|
||||
'stronghold.middleware.LoginRequiredMiddleware',
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'issuetracker.urls'
|
||||
|
@ -87,6 +92,8 @@ USE_TZ = True
|
|||
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
LOGIN_URL = '/login'
|
||||
|
||||
LOGIN_REDIRECT_URL='/'
|
||||
|
||||
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue