Skip to content

Commit

Permalink
adding links to metadata > item details
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhuang committed May 6, 2013
1 parent 6ba09fb commit 023d23d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions deme_django/cms/templatetags/item_tags.py
Expand Up @@ -592,7 +592,7 @@ def render(self, context):
result.append('<tr>')
result.append('<th>Item Name:</th>')
result.append('<td>')
result.append(escape(item.name))
result.append(get_item_link_tag(context, item))
result.append('</td>')
result.append('</tr>')

Expand All @@ -607,7 +607,12 @@ def render(self, context):
result.append('<tr>')
result.append('<th>Item type:</th>')
result.append('<td>')
result.append(u'%s' % capfirst(item.actual_item_type()._meta.verbose_name))
item_type = item.actual_item_type()
item_type_url = reverse('item_type_url', kwargs={'viewer': item_type.__name__.lower()})
result.append(u'<a href="%s">%s</a>' % (
item_type_url,
capfirst(item.actual_item_type()._meta.verbose_name))
)
result.append('</td>')
result.append('</tr>')

Expand Down
2 changes: 1 addition & 1 deletion deme_django/static/javascripts/deme/metabar-ck.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion deme_django/static/javascripts/deme/metabar.js
Expand Up @@ -147,7 +147,9 @@ $(function(){
success: function(data) {
collapse.addClass('ajax-loaded');
collapse.find('.content').html(data);
collapse.css('height', 'auto');
if ($('body').hasClass('nonadmin')) {
collapse.css('height', 'auto');
}
if (typeof(cb) == 'function') {
cb(collapse);
}
Expand Down

0 comments on commit 023d23d

Please sign in to comment.