Commits

psviderski committed 2bd2dad

Add 'Modify entry' link on a blog entry. It is displayed on the entry if the user has the right to modify this entry.

  • Participants
  • Parent commits 4bf5108

Comments (0)

Files changed (3)

File MoinMoin/templates/blog_layout.html

     {% endif %}
     <h1><a href="{{ url_for('frontend.show_item', item_name=entry_item.name) }}"
         title="{{ title }}" class="moin-blog-entry-link">{{ title }}</a></h1>
+    {% if user.may.write(entry_item.name) %}
+        <div class="moin-blog-entry-modify">
+            <span class="moin-blog-icon">&#x2710;</span>
+            <a href="{{ url_for('frontend.modify_item', item_name=entry_item.name) }}">{{ _("Modify entry") }}</a>
+        </div>
+    {% endif %}
     <div class="moin-blog-entry-info">
         {% set publish_time = entry_item.meta['ptime'] %}
         {% if publish_time %}

File MoinMoin/themes/modernized/static/css/common.css

 #moin-blog-header{margin:1em 0 -1em 0}
 #moin-blog-content{padding:0 2em 0 0;display:table-cell}
 #moin-blog-sidebar{width:15em;display:table-cell}
+.moin-blog-icon{font-size:1.6em}
 .moin-blog-entry-info{font-size:.8em;color:#737373}
 .moin-blog-entry-bottominfo{font-size:.8em;color:#737373;padding:0 1em;border:1px solid #4e7da9}
+.moin-blog-entry-modify{font-size:.8em;margin:0;float:right}
 ul.moin-blog-entry-tags{list-style:none;display:inline;margin:0;}
 ul.moin-blog-entry-tags li{display:inline;}
 ul.moin-blog-entry-tags li:after{content:","}

File MoinMoin/themes/modernized/static/css/stylus/main.styl

     width 15em
     display table-cell
 
+.moin-blog-icon
+    font-size 1.6em
+
 .moin-blog-entry-info
     font-size 0.8em
     color footer_color
     padding 0em 1em
     border border_style
 
+.moin-blog-entry-modify
+    font-size 0.8em
+    margin 0
+    float right
+
 ul.moin-blog-entry-tags
     list-style none
     display inline