diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-05-25 13:39:17 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-06-03 10:59:10 +0100 |
commit | d1b875a76b18d0593dc5cc4cbaf1787e8ae5b5c5 (patch) | |
tree | 38e7d72def2d7edb1c348bffdc1c2377b4f23dd8 /templates | |
parent | 5a07f0422d8ae13f79aae3471ba8a305c4460b3c (diff) | |
download | openembedded-core-contrib-d1b875a76b18d0593dc5cc4cbaf1787e8ae5b5c5.tar.gz |
Improve history collection and add link to history page
Save individual field changes into revision comment and display this
comment on the history page. Now we're ready to add a link at the
bottom of every page so the history is easily visible.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 3 | ||||
-rw-r--r-- | templates/layerindex/history.html | 38 |
2 files changed, 24 insertions, 17 deletions
diff --git a/templates/base.html b/templates/base.html index 6a8cb84962..fd591ad623 100644 --- a/templates/base.html +++ b/templates/base.html @@ -95,7 +95,8 @@ {% block footer %} <hr /> <div class="footer"> - <a href="{% url about %}">about this site</a> + <a href="{% url history_list %}">change history</a> + • <a href="{% url about %}">about this site</a> </div> {% endblock %} diff --git a/templates/layerindex/history.html b/templates/layerindex/history.html index fa7757ffa9..87e2179e59 100644 --- a/templates/layerindex/history.html +++ b/templates/layerindex/history.html @@ -32,23 +32,29 @@ <tbody> {% for revision in revisions %} - <tr> - <td>{{ revision.date_created|timesince }} ago</td> - <td>{{ revision.user }}</td> - <td> - {% for version in revision.version_set.all %} - {% if version.type = 0 %} - Added - {% elif version.type = 1 %} - Changed - {% elif version.type = 2 %} - Deleted + {% if revision.comment != 'No changes' %} + <tr> + <td>{{ revision.date_created|timesince }} ago</td> + <td>{{ revision.user }}</td> + <td> + {% if revision.comment %} + {{ revision.comment|linebreaksbr }} + {% else %} + {% for version in revision.version_set.all %} + {% if version.type = 0 %} + Added + {% elif version.type = 1 %} + Changed + {% elif version.type = 2 %} + Deleted + {% endif %} + {{ version.content_type.name.lower }}: {{ version.object_repr }} + <br> + {% endfor %} {% endif %} - {{ version.content_type.name.lower }}: {{ version.object_repr }} - <br> - {% endfor %} - </td> - </tr> + </td> + </tr> + {% endif %} {% endfor %} </tbody> </table> |