annotate .svn/pristine/43/435d200d5b8e7f06b0e465d23cb053a76fc8f49e.svn-base @ 1519:afce8026aaeb redmine-2.4-integration

Merge from branch "live"
author Chris Cannam
date Tue, 09 Sep 2014 09:34:53 +0100
parents 261b3d9a4903
children
rev   line source
Chris@1464 1 <div class="contextual">
Chris@1464 2 <%= watcher_link(@news, User.current) %>
Chris@1464 3 <%= link_to(l(:button_edit),
Chris@1464 4 edit_news_path(@news),
Chris@1464 5 :class => 'icon icon-edit',
Chris@1464 6 :accesskey => accesskey(:edit),
Chris@1464 7 :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
Chris@1464 8 <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
Chris@1464 9 </div>
Chris@1464 10
Chris@1464 11 <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
Chris@1464 12
Chris@1464 13 <% if authorize_for('news', 'edit') %>
Chris@1464 14 <div id="edit-news" style="display:none;">
Chris@1464 15 <%= labelled_form_for :news, @news, :url => news_path(@news),
Chris@1464 16 :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
Chris@1464 17 <%= render :partial => 'form', :locals => { :f => f } %>
Chris@1464 18 <%= submit_tag l(:button_save) %>
Chris@1464 19 <%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
Chris@1464 20 <%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
Chris@1464 21 <% end %>
Chris@1464 22 <div id="preview" class="wiki"></div>
Chris@1464 23 </div>
Chris@1464 24 <% end %>
Chris@1464 25
Chris@1464 26 <p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %>
Chris@1464 27 <span class="author"><%= authoring @news.created_on, @news.author %></span></p>
Chris@1464 28 <div class="wiki">
Chris@1464 29 <%= textilizable(@news, :description) %>
Chris@1464 30 </div>
Chris@1464 31 <%= link_to_attachments @news %>
Chris@1464 32 <br />
Chris@1464 33
Chris@1464 34 <div id="comments" style="margin-bottom:16px;">
Chris@1464 35 <h3 class="comments"><%= l(:label_comment_plural) %></h3>
Chris@1464 36 <% @comments.each do |comment| %>
Chris@1464 37 <% next if comment.new_record? %>
Chris@1464 38 <div class="contextual">
Chris@1464 39 <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
Chris@1464 40 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
Chris@1464 41 </div>
Chris@1464 42 <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
Chris@1464 43 <%= textilizable(comment.comments) %>
Chris@1464 44 <% end if @comments.any? %>
Chris@1464 45 </div>
Chris@1464 46
Chris@1464 47 <% if @news.commentable? %>
Chris@1464 48 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
Chris@1464 49 <%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
Chris@1464 50 <div class="box">
Chris@1464 51 <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
Chris@1464 52 <%= wikitoolbar_for 'comment_comments' %>
Chris@1464 53 </div>
Chris@1464 54 <p><%= submit_tag l(:button_add) %></p>
Chris@1464 55 <% end %>
Chris@1464 56 <% end %>
Chris@1464 57
Chris@1464 58 <% html_title @news.title -%>
Chris@1464 59
Chris@1464 60 <% content_for :header_tags do %>
Chris@1464 61 <%= stylesheet_link_tag 'scm' %>
Chris@1464 62 <% end %>