[damned-lies] Use anchors to define unique links for feed items (Fixes #574864)
- From: Claude Paroz <claudep src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [damned-lies] Use anchors to define unique links for feed items (Fixes #574864)
- Date: Fri, 30 Oct 2009 17:39:48 +0000 (UTC)
commit b018f0d358c4cd352f260ea2c134b648d68efd53
Author: Claude Paroz <claude 2xlibre net>
Date: Fri Oct 30 18:39:27 2009 +0100
Use anchors to define unique links for feed items (Fixes #574864)
templates/vertimus/vertimus_detail.html | 2 +-
vertimus/feeds.py | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/templates/vertimus/vertimus_detail.html b/templates/vertimus/vertimus_detail.html
index eceb239..c2a622a 100644
--- a/templates/vertimus/vertimus_detail.html
+++ b/templates/vertimus/vertimus_detail.html
@@ -122,7 +122,7 @@ $(document).ready(function() {
{% for action,files in action_history %}
<div class="vertimus_action">
<div class="vertimus_action_head">
- <img src="{{ MEDIA_URL }}img/nobody-16.png" alt="Person"/>
+ <a name="{{ action.id }}"></a><img src="{{ MEDIA_URL }}img/nobody-16.png" alt="Person"/>
<a href="{{ action.person.get_absolute_url }}">{{ action.person.name }}</a>
, <strong>{{ action }}</strong>, {{ action.created|date:_("Y-m-d g:i a O") }}
</div>
diff --git a/vertimus/feeds.py b/vertimus/feeds.py
index 6ba175c..cbcea46 100644
--- a/vertimus/feeds.py
+++ b/vertimus/feeds.py
@@ -61,11 +61,12 @@ class LatestActionsByLanguage(Feed):
return (action_db.get_action() for action_db in islice(imerge_sorted_by_field(actions_db, archived_actions_db, '-created'), 20))
def item_link(self, item):
- return urlresolvers.reverse('vertimus_by_names',
+ link = urlresolvers.reverse('vertimus_by_names',
args=(item.state.branch.module.name,
item.state.branch.name,
item.state.domain.name,
item.state.language.locale))
+ return "%s#%d" % (link, item.id)
def item_pubdate(self, item):
return item.created
@@ -108,11 +109,12 @@ class LatestActionsByTeam(Feed):
return (action_db.get_action() for action_db in islice(imerge_sorted_by_field(actions_db, archived_actions_db, '-created'), 20))
def item_link(self, item):
- return urlresolvers.reverse('vertimus_by_names',
+ link = urlresolvers.reverse('vertimus_by_names',
args=(item.state.branch.module.name,
item.state.branch.name,
item.state.domain.name,
item.state.language.locale))
+ return "%s#%d" % (link, item.id)
def item_pubdate(self, item):
return item.created
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]