##// END OF EJS Templates
Merged r4107 from trunk....
Eric Davis -
r4048:d44a90045a40
parent child
Show More
@@ -1,14 +1,18
1 <h2><%=l(:label_news)%></h2>
1 <h2><%=l(:label_news)%></h2>
2
2
3 <% labelled_tabular_form_for :news, @news, :url => { :action => "edit" },
3 <% labelled_tabular_form_for :news, @news, :url => { :action => "edit" },
4 :html => { :id => 'news-form' } do |f| %>
4 :html => { :id => 'news-form' } do |f| %>
5 <%= render :partial => 'form', :locals => { :f => f } %>
5 <%= render :partial => 'form', :locals => { :f => f } %>
6 <%= submit_tag l(:button_save) %>
6 <%= submit_tag l(:button_save) %>
7 <%= link_to_remote l(:label_preview),
7 <%= link_to_remote l(:label_preview),
8 { :url => { :controller => 'news', :action => 'preview', :project_id => @project },
8 { :url => { :controller => 'news', :action => 'preview', :project_id => @project },
9 :method => 'post',
9 :method => 'post',
10 :update => 'preview',
10 :update => 'preview',
11 :with => "Form.serialize('news-form')"
11 :with => "Form.serialize('news-form')"
12 }, :accesskey => accesskey(:preview) %>
12 }, :accesskey => accesskey(:preview) %>
13 <% end %>
13 <% end %>
14 <div id="preview" class="wiki"></div>
14 <div id="preview" class="wiki"></div>
15
16 <% content_for :header_tags do %>
17 <%= stylesheet_link_tag 'scm' %>
18 <% end %>
@@ -1,50 +1,51
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to_if_authorized(l(:label_news_new),
2 <%= link_to_if_authorized(l(:label_news_new),
3 {:controller => 'news', :action => 'new', :project_id => @project},
3 {:controller => 'news', :action => 'new', :project_id => @project},
4 :class => 'icon icon-add',
4 :class => 'icon icon-add',
5 :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %>
5 :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %>
6 </div>
6 </div>
7
7
8 <div id="add-news" style="display:none;">
8 <div id="add-news" style="display:none;">
9 <h2><%=l(:label_news_new)%></h2>
9 <h2><%=l(:label_news_new)%></h2>
10 <% labelled_tabular_form_for :news, @news, :url => { :controller => 'news', :action => 'new', :project_id => @project },
10 <% labelled_tabular_form_for :news, @news, :url => { :controller => 'news', :action => 'new', :project_id => @project },
11 :html => { :id => 'news-form' } do |f| %>
11 :html => { :id => 'news-form' } do |f| %>
12 <%= render :partial => 'news/form', :locals => { :f => f } %>
12 <%= render :partial => 'news/form', :locals => { :f => f } %>
13 <%= submit_tag l(:button_create) %>
13 <%= submit_tag l(:button_create) %>
14 <%= link_to_remote l(:label_preview),
14 <%= link_to_remote l(:label_preview),
15 { :url => { :controller => 'news', :action => 'preview', :project_id => @project },
15 { :url => { :controller => 'news', :action => 'preview', :project_id => @project },
16 :method => 'post',
16 :method => 'post',
17 :update => 'preview',
17 :update => 'preview',
18 :with => "Form.serialize('news-form')"
18 :with => "Form.serialize('news-form')"
19 }, :accesskey => accesskey(:preview) %> |
19 }, :accesskey => accesskey(:preview) %> |
20 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
20 <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %>
21 <% end if @project %>
21 <% end if @project %>
22 <div id="preview" class="wiki"></div>
22 <div id="preview" class="wiki"></div>
23 </div>
23 </div>
24
24
25 <h2><%=l(:label_news_plural)%></h2>
25 <h2><%=l(:label_news_plural)%></h2>
26
26
27 <% if @newss.empty? %>
27 <% if @newss.empty? %>
28 <p class="nodata"><%= l(:label_no_data) %></p>
28 <p class="nodata"><%= l(:label_no_data) %></p>
29 <% else %>
29 <% else %>
30 <% @newss.each do |news| %>
30 <% @newss.each do |news| %>
31 <h3><%= link_to_project(news.project) + ': ' unless news.project == @project %>
31 <h3><%= link_to_project(news.project) + ': ' unless news.project == @project %>
32 <%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
32 <%= link_to h(news.title), :controller => 'news', :action => 'show', :id => news %>
33 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
33 <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %></h3>
34 <p class="author"><%= authoring news.created_on, news.author %></p>
34 <p class="author"><%= authoring news.created_on, news.author %></p>
35 <div class="wiki">
35 <div class="wiki">
36 <%= textilizable(news.description) %>
36 <%= textilizable(news.description) %>
37 </div>
37 </div>
38 <% end %>
38 <% end %>
39 <% end %>
39 <% end %>
40 <p class="pagination"><%= pagination_links_full @news_pages %></p>
40 <p class="pagination"><%= pagination_links_full @news_pages %></p>
41
41
42 <% other_formats_links do |f| %>
42 <% other_formats_links do |f| %>
43 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
43 <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
44 <% end %>
44 <% end %>
45
45
46 <% content_for :header_tags do %>
46 <% content_for :header_tags do %>
47 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
47 <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
48 <%= stylesheet_link_tag 'scm' %>
48 <% end %>
49 <% end %>
49
50
50 <% html_title(l(:label_news_plural)) -%>
51 <% html_title(l(:label_news_plural)) -%>
General Comments 0
You need to be logged in to leave comments. Login now