Project

General

Profile

Style for message board. » show.rhtml.patch

Patch of masseges_show.rhtml - Akiko Takano, 2009-07-06 22:34

View differences:

show.rhtml (working copy)
19 19
</div>
20 20
<br />
21 21

  
22
<% unless @replies.empty? %>
23
<h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3>
24
<% @replies.each do |message| %>
25
  <a name="<%= "message-#{message.id}" %>"></a>
26
  <div class="contextual">
27
    <%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %>
28
    <%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by?(User.current) %>
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) %>
30
  </div>
31
  <div class="message reply">
32
  <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4>
33
  <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div>
34
  <%= link_to_attachments message, :author => false %>
35
  </div>
36
<% end %>
37
<% end %>
38 22

  
23
<% unless @replies.empty? %> 
24
<% i = 0%> 
25
<h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> 
26
<% @replies.each do |message| %> 
27
  <% i = i + 1 %> 
28
  <div class="list <%= cycle('odd', 'even') %>"> 
29
  <a name="<%= "message-#{message.id}" %>"></a> 
30
  <div class="contextual"> (<%= "#{i}" %>) 
31
    <%= link_to_remote_if_authorized image_tag('comment.png'), { :url => {:action => 'quote', :id => message} }, :title => l(:button_quote) %> 
32
    <%= link_to(image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit)) if message.editable_by? (User.current) %> 
33
    <%= 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) %> 
34
  </div> 
35
  <div class="message reply"> 
36
  <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> 
37
  <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> 
38
  <%= link_to_attachments message, :author => false %> 
39
  </div> 
40
 </div>
41
<% end %> 
42
<% end %> 
43

  
39 44
<% if !@topic.locked? && authorize_for('messages', 'reply') %>
40 45
<p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p>
41 46
<div id="reply" style="display:none;">
(1-1/3)