Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit 979b44b

Browse files
update views: display cursor on tooltips, replace title with a super duper 80s-grid image, change position of priority tag (only display it if its value is "important" or "critical"), rename temp var in annotation for last comment view, re-enter debug mode
1 parent 03199c1 commit 979b44b

File tree

6 files changed

+34
-26
lines changed

6 files changed

+34
-26
lines changed

bugboard/static/bugboard/design.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,20 @@ details:not([open]){
120120

121121
details[open]{
122122
max-height: 500em;
123+
}
124+
125+
h6 span.badge, .blockquote-footer span.badge{
126+
cursor: help;
127+
}
128+
129+
.card-text span{
130+
margin: 3px;
131+
}
132+
133+
.card-text{
134+
cursor: default;
135+
}
136+
137+
.title{
138+
border-radius: 5px;
123139
}

bugboard/static/bugboard/title.png

45.4 KB
Loading

bugboard/templates/bugboard/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<div class="container-fluid">
1818
<div class="row">
1919
<div class="col">
20-
<a class="navbar-brand" href="/bugboard/">the bugboard</a>
20+
<a class="navbar-brand" href="/bugboard/"><img class="title" src="{% static 'bugboard/title.png' %}" /></a>
2121
is displaying <b>{% block infos %}{% endblock %}</b> tasks
2222
<div class="alert alert-warning float-right" role="alert">
2323
<b>{% block open_tasks %}{% endblock %}</b> open tasks in <b>{% block projects %}{% endblock %}</b> projects

bugboard/templates/bugboard/task_list.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ <h6 class="card-subtitle mb-2 text-muted">
3636
<span class="badge badge-light" data-toggle="tooltip" data-placement="top" title="{{ task.created_at|date:"d/m/Y, H:i:s" }}">
3737
{{ task.created_at|timesince }}
3838
</span>
39+
<!-- get_priority_display -->
40+
{% if task.priority_id == 1 or task.priority_id == 2 %}
41+
<span class="badge badge-danger font-size-lg">
42+
{{ task.priority|title }}
43+
</span>
44+
{% endif %}
3945
</h6>
4046
<blockquote class="blockquote">
4147
<p class="mb-0 card-text">
@@ -93,18 +99,6 @@ <h6 class="card-subtitle mb-2 text-muted">
9399
<img src="{{ assignee.avatar_url }}" class="avatar" /> {{ assignee.email.0 }}{{ assignee.email.1 }}
94100
</span>
95101
{% endfor %}
96-
<!-- get_priority_display -->
97-
<span class="badge
98-
{% if task.priority_id == 0 %}
99-
badge-info
100-
{% elif task.priority_id == 1 or task.priority_id == 2 %}
101-
badge-danger
102-
{% else %}
103-
badge-light
104-
{% endif %}
105-
font-size-lg">
106-
{{ task.priority|title }}
107-
</span>
108102
<span class="badge
109103
{% if task.status_id == None %}
110104
badge-warning

bugboard/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ class CommentedView(generic.ListView):
4949
queryset = Task.objects.exclude(
5050
comment=None
5151
).annotate(
52-
com=Max(
52+
last_com=Max(
5353
'comment__created_at'
5454
)
5555
).order_by(
56-
'-com'
56+
'-last_com'
5757
)
5858

5959
def get_context_data(self, **kwargs):

randomdjangoprojectname/settings.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@
2323
SECRET_KEY = os.environ['SECRET_KEY']
2424

2525
# SECURITY WARNING: don't run with debug turned on in production!
26-
DEBUG = False
26+
DEBUG = True
2727

28-
ALLOWED_HOSTS = ['192.168.7.32', '127.0.0.1']
28+
ALLOWED_HOSTS = ['192.168.7.32', '127.0.0.1', '192.168.7.110', '192.168.7.131']
2929

3030

3131
# Application definition
3232

3333
INSTALLED_APPS = [
3434
'sslserver',
35+
'django_extensions',
3536
'django.contrib.auth',
3637
'django.contrib.admin',
3738
'django.contrib.sessions',
@@ -120,13 +121,7 @@
120121
USE_TZ = True
121122

122123

123-
# Static files (CSS, JavaScript, Images)
124-
# https://docs.djangoproject.com/en/2.2/howto/static-files/
125-
126-
STATIC_URL = '/static/'
127-
128-
129-
# security features (python3.7 managE.py check --deploy) :
124+
# security features (python3.7 manage.py check --deploy) :
130125

131126
# X_FRAME_OPTIONS = 'DENY'
132127
# SECURE_HSTS_SECONDS = 60
@@ -137,6 +132,9 @@
137132
# SECURE_BROWSER_XSS_FILTER = True
138133
# SECURE_CONTENT_TYPE_NOSNIFF = True
139134
# SECURE_HSTS_INCLUDE_SUBDOMAINS = True
135+
CONN_MAX_AGE = 4 # help with the "all" page (now = 2.7-2.8 seconds to load the page, before = ~2.8s to load the page)
136+
137+
# Static files (CSS, JavaScript, Images)
138+
# https://docs.djangoproject.com/en/2.2/howto/static-files/
139+
STATIC_URL = '/static/'
140140
# STATIC_ROOT =
141-
# STATIC_URL =
142-
CONN_MAX_AGE = 5 # help with the "all" page (now = 2.7-2.8 seconds to load the page, before = ~4s to load the page)

0 commit comments

Comments
 (0)