##// END OF EJS Templates
Fixed: Syntax highlighting unavailable from board new topic or topic edit preview (#7625)....
Jean-Philippe Lang -
r4769:58f5d3ab098b
parent child
Show More
@@ -1,72 +1,73
1 1 <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %>
2 2
3 3 <div class="contextual">
4 4 <%= link_to_if_authorized l(:label_message_new),
5 5 {:controller => 'messages', :action => 'new', :board_id => @board},
6 6 :class => 'icon icon-add',
7 7 :onclick => 'Element.show("add-message"); Form.Element.focus("message_subject"); return false;' %>
8 8 <%= watcher_tag(@board, User.current) %>
9 9 </div>
10 10
11 11 <div id="add-message" style="display:none;">
12 12 <% if authorize_for('messages', 'new') %>
13 13 <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%= l(:label_message_new) %></h2>
14 14 <% form_for :message, @message, :url => {:controller => 'messages', :action => 'new', :board_id => @board}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
15 15 <%= render :partial => 'messages/form', :locals => {:f => f} %>
16 16 <p><%= submit_tag l(:button_create) %>
17 17 <%= link_to_remote l(:label_preview),
18 18 { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
19 19 :method => 'post',
20 20 :update => 'preview',
21 21 :with => "Form.serialize('message-form')",
22 22 :complete => "Element.scrollTo('preview')"
23 23 }, :accesskey => accesskey(:preview) %> |
24 24 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-message")' %></p>
25 25 <% end %>
26 26 <div id="preview" class="wiki"></div>
27 27 <% end %>
28 28 </div>
29 29
30 30 <h2><%=h @board.name %></h2>
31 31 <p class="subtitle"><%=h @board.description %></p>
32 32
33 33 <% if @topics.any? %>
34 34 <table class="list messages">
35 35 <thead><tr>
36 36 <th><%= l(:field_subject) %></th>
37 37 <th><%= l(:field_author) %></th>
38 38 <%= sort_header_tag('created_on', :caption => l(:field_created_on)) %>
39 39 <%= sort_header_tag('replies', :caption => l(:label_reply_plural)) %>
40 40 <%= sort_header_tag('updated_on', :caption => l(:label_message_last)) %>
41 41 </tr></thead>
42 42 <tbody>
43 43 <% @topics.each do |topic| %>
44 44 <tr class="message <%= cycle 'odd', 'even' %> <%= topic.sticky? ? 'sticky' : '' %> <%= topic.locked? ? 'locked' : '' %>">
45 45 <td class="subject"><%= link_to h(topic.subject), { :controller => 'messages', :action => 'show', :board_id => @board, :id => topic } %></td>
46 46 <td class="author" align="center"><%= topic.author %></td>
47 47 <td class="created_on" align="center"><%= format_time(topic.created_on) %></td>
48 48 <td class="replies" align="center"><%= topic.replies_count %></td>
49 49 <td class="last_message">
50 50 <% if topic.last_reply %>
51 51 <%= authoring topic.last_reply.created_on, topic.last_reply.author %><br />
52 52 <%= link_to_message topic.last_reply %>
53 53 <% end %>
54 54 </td>
55 55 </tr>
56 56 <% end %>
57 57 </tbody>
58 58 </table>
59 59 <p class="pagination"><%= pagination_links_full @topic_pages, @topic_count %></p>
60 60 <% else %>
61 61 <p class="nodata"><%= l(:label_no_data) %></p>
62 62 <% end %>
63 63
64 64 <% other_formats_links do |f| %>
65 65 <%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
66 66 <% end %>
67 67
68 68 <% html_title h(@board.name) %>
69 69
70 70 <% content_for :header_tags do %>
71 71 <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
72 <%= stylesheet_link_tag 'scm' %>
72 73 <% end %>
@@ -1,14 +1,18
1 1 <h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%=h @message.subject %></h2>
2 2
3 3 <% form_for :message, @message, :url => {:action => 'edit'}, :html => {:multipart => true, :id => 'message-form'} do |f| %>
4 4 <%= render :partial => 'form', :locals => {:f => f, :replying => !@message.parent.nil?} %>
5 5 <%= submit_tag l(:button_save) %>
6 6 <%= link_to_remote l(:label_preview),
7 7 { :url => { :controller => 'messages', :action => 'preview', :board_id => @board },
8 8 :method => 'post',
9 9 :update => 'preview',
10 10 :with => "Form.serialize('message-form')",
11 11 :complete => "Element.scrollTo('preview')"
12 12 }, :accesskey => accesskey(:preview) %>
13 13 <% end %>
14 14 <div id="preview" class="wiki"></div>
15
16 <% content_for :header_tags do %>
17 <%= stylesheet_link_tag 'scm' %>
18 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now