annotate .svn/pristine/43/435d200d5b8e7f06b0e465d23cb053a76fc8f49e.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

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