Skip to content

Commit

Permalink
Show modified date in the model list and detail (#381)
Browse files Browse the repository at this point in the history
* Show modified date in the model list and detail

* Show modified date in the gallery
  • Loading branch information
Xpirix authored May 22, 2024
1 parent a791c6a commit 0e58058
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions qgis-app/templates/base/includes/detail_object.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@
<dd>{{ object_detail.description|md_to_html }}</dd>
<dt>Uploaded Date</dt>
<dd>{{ object_detail.upload_date|date:"d F Y" }}</dd>
{% if object_detail.review_set.last.review_date and object_detail.approved%}
<dt>Approved Date</dt>
<dd>{{ object_detail.review_set.last.review_date|date:"d F Y"}}</dd>
{% endif %}
<dt>Modified Date</dt>
<dd>{{ object_detail.modified_date|date:"d F Y" }}</dd>
<dt>Creator</dt>
<dd>{{ object_detail.get_creator_name|title }}</dd>
{% if is_qlr %}
Expand Down
2 changes: 2 additions & 0 deletions qgis-app/templates/base/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ <h2>{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en
</th>
<th> {% anchor_sort_arrow 'Creator' 'creator' order_by queries %} </th>
<th> {% anchor_sort_arrow 'Upload Date' 'upload_date' order_by queries %} </th>
<th> {% anchor_sort_arrow 'Modified Date' 'modified_date' order_by queries %} </th>
<th></th>
</tr>
</thead>
Expand All @@ -105,6 +106,7 @@ <h2>{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en
<td>{{ object.download_count }}</td>
<td>{{ object.get_creator_name|title }}</td>
<td>{{ object.upload_date|date:"d F Y" }}</td>
<td>{{ object.modified_date|date:"d F Y" }}</td>
<td>
{% if user.is_staff or user == style.creator %}
<a class="btn btn-primary btn-mini" href="{% url url_update object.id %}" title="{% trans "Edit" %}"><i class="icon-pencil icon-white"></i></a>&nbsp
Expand Down
6 changes: 4 additions & 2 deletions qgis-app/templates/base/list_galery.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
display: flex;
align-items: center;
justify-content: center;
height: 420px;
height: 380px;
background-color: white;
}
img.image-demo {
height: auto;
max-height: 100%;
max-height: 380px;
width: auto;
max-width: 100%;
}
Expand Down Expand Up @@ -78,6 +78,7 @@ <h2>{% if title %}{{title}}{% else %}{% trans "All" %} {{ resource_name }}s{% en
<option value="creator">Creator</option>
<option value="download_count">Number of downloads</option>
<option value="upload_date" selected>Upload date</option>
<option value="modified_date" selected>Modified date</option>
<option value="name">{{ resource_name }} name</option>
{% if object_list.first.style_type %}<option value="type">Style type</option>{% endif %}
</select>
Expand Down Expand Up @@ -106,6 +107,7 @@ <h4>
</h4>
<h5>
{{ object.get_creator_name|title }} | {{ object.upload_date|date:"d F Y" }} | {{ object.download_count }} downloads
<p><em>Modified Date: {{ object.modified_date|date:"d F Y" }}</em></p>
</h5>
<p>

Expand Down

0 comments on commit 0e58058

Please sign in to comment.