show creation date for each change

This commit is contained in:
Laura Klünder 2017-06-18 17:36:08 +02:00
parent 40b4540343
commit 0961bf849c
4 changed files with 15 additions and 2 deletions

View file

@ -137,9 +137,17 @@ form button.invisiblesubmit {
width:23px; width:23px;
padding-right:0; padding-right:0;
} }
.change-group tr td:last-child {
white-space:nowrap;
text-align:right;
}
.change-group tr td .glyphicon { .change-group tr td .glyphicon {
top:2px; top:2px;
} }
.change-group tr td .tooltip {
font-size:14px;
margin-top: -1px;
}
/* Styles inside leaflet */ /* Styles inside leaflet */
.leaflet-container { .leaflet-container {

View file

@ -147,6 +147,8 @@ editor = {
$('.changeset a').text(changeset.text()).attr('href', changeset.attr('href')); $('.changeset a').text(changeset.text()).attr('href', changeset.attr('href'));
} }
content.find('[data-toggle="tooltip"]').tooltip();
var geometry_url = content.find('[data-geometry-url]'); var geometry_url = content.find('[data-geometry-url]');
if (geometry_url.length) { if (geometry_url.length) {
geometry_url = geometry_url.attr('data-geometry-url'); geometry_url = geometry_url.attr('data-geometry-url');

View file

@ -14,7 +14,7 @@
<table class="table table-condensed table-h-bordered change-group"> <table class="table table-condensed table-h-bordered change-group">
<thead> <thead>
<tr> <tr>
<th colspan="2"> <th colspan="3">
{% if group.obj_title %} {% if group.obj_title %}
{{ group.obj_title }} <small>({{ group.obj }})</small> {{ group.obj_title }} <small>({{ group.obj }})</small>
{% else %} {% else %}

View file

@ -7,6 +7,7 @@ from django.core.exceptions import FieldDoesNotExist, PermissionDenied
from django.http import HttpResponseRedirect from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect, render from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse from django.urls import reverse
from django.utils.formats import date_format
from django.utils.html import escape from django.utils.html import escape
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.views.decorators.cache import never_cache from django.views.decorators.cache import never_cache
@ -378,7 +379,9 @@ def changeset_detail(request, pk):
last_obj = obj last_obj = obj
change_data = { change_data = {
'pk': change.pk 'pk': change.pk,
'author': change.author,
'created': _('created at %(datetime)s') % {'datetime': date_format(change.created, 'DATETIME_FORMAT')},
} }
changes.append(change_data) changes.append(change_data)
if change.action == 'create': if change.action == 'create':