annotate app/views/messages/show.rhtml @ 904:0a8317a50fa0 redmine-1.1

Close obsolete branch redmine-1.1
author Chris Cannam
date Fri, 14 Jan 2011 12:53:21 +0000
parents cca12e1c1fd4
children
rev   line source
Chris@0 1 <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}),
Chris@0 2 link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %>
Chris@0 3
Chris@0 4 <div class="contextual">
Chris@0 5 <%= watcher_tag(@topic, User.current) %>
Chris@0 6 <%= link_to_remote_if_authorized(l(:button_quote), { :url => {:action => 'quote', :id => @topic} }, :class => 'icon icon-comment') unless @topic.locked? %>
Chris@0 7 <%= link_to(l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit') if @message.editable_by?(User.current) %>
Chris@0 8 <%= link_to(l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') if @message.destroyable_by?(User.current) %>
Chris@0 9 </div>
Chris@0 10
Chris@0 11 <h2><%= avatar(@topic.author, :size => "24") %><%=h @topic.subject %></h2>
Chris@0 12
Chris@0 13 <div class="message">
Chris@0 14 <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
Chris@0 15 <div class="wiki">
Chris@0 16 <%= textilizable(@topic.content, :attachments => @topic.attachments) %>
Chris@0 17 </div>
Chris@0 18 <%= link_to_attachments @topic, :author => false %>
Chris@0 19 </div>
Chris@0 20 <br />
Chris@0 21
Chris@0 22 <% unless @replies.empty? %>
Chris@0 23 <h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
Chris@0 24 <% @replies.each do |message| %>
Chris@0 25 <div class="message reply" id="<%= "message-#{message.id}" %>">
Chris@0 26 <div class="contextual">
Chris@0 27 <%= link_to_remote_if_authorized(image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote)) unless @topic.locked? %>
Chris@0 28 <%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
Chris@0 29 <%= link_to(image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete)) if message.destroyable_by?(User.current) %>
Chris@0 30 </div>
Chris@0 31 <h4>
Chris@0 32 <%= avatar(message.author, :size => "24") %>
Chris@1 33 <%= link_to h(message.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => @topic, :r => message, :anchor => "message-#{message.id}" } %>
Chris@0 34 -
Chris@0 35 <%= authoring message.created_on, message.author %>
Chris@0 36 </h4>
Chris@0 37 <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
Chris@0 38 <%= link_to_attachments message, :author => false %>
Chris@0 39 </div>
Chris@0 40 <% end %>
Chris@0 41 <p class="pagination"><%= pagination_links_full @reply_pages, @reply_count, :per_page_links => false %></p>
Chris@0 42 <% end %>
Chris@0 43
Chris@0 44 <% if !@topic.locked? && authorize_for('messages', 'reply') %>
Chris@0 45 <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
Chris@0 46 <div id="reply" style="display:none;">
Chris@0 47 <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
Chris@0 48 <%= render :partial => 'form', :locals => {:f => f, :replying => true} %>
Chris@0 49 <%= submit_tag l(:button_submit) %>
Chris@0 50 <%= link_to_remote l(:label_preview),
Chris@0 51 { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
Chris@0 52 :method => 'post',
Chris@0 53 :update => 'preview',
Chris@0 54 :with => "Form.serialize('message-form')",
Chris@0 55 :complete => "Element.scrollTo('preview')"
Chris@0 56 }, :accesskey => accesskey(:preview) %>
Chris@0 57 <% end %>
Chris@0 58 <div id="preview" class="wiki"></div>
Chris@0 59 </div>
Chris@0 60 <% end %>
Chris@0 61
Chris@0 62 <% content_for :header_tags do %>
Chris@0 63 <%= stylesheet_link_tag 'scm' %>
Chris@0 64 <% end %>
Chris@0 65
Chris@0 66 <% html_title h(@topic.subject) %>