1.news_appearance_cleared.patch

Andrey Lobanov (RedSoft), 2016-10-10 15:22

Download (7.11 KB)

View differences:

app/views/messages/show.html.erb (revision fc236075754c3f9f7180269a1c48aa06f608e238)
22 22
         ) if @message.destroyable_by?(User.current) %>
23 23
</div>
24 24

  
25
<div class="box">
25 26
<h2><%= avatar(@topic.author, :size => "24") %><%= @topic.subject %></h2>
26 27

  
27 28
<div class="message">
28
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
29
<p><h4 class="author"><span class="author"><%= authoring @topic.created_on, @topic.author %></span></h4></p>
29 30
<div class="wiki">
30 31
<%= textilizable(@topic, :content) %>
31 32
</div>
32 33
<%= link_to_attachments @topic, :author => false %>
33 34
</div>
34 35
<br />
36
</div>
35 37

  
36 38
<% unless @replies.empty? %>
37 39
<h3 class="comments"><%= l(:label_reply_plural) %> (<%= @reply_count %>)</h3>
app/views/news/index.html.erb (revision 6d0770c6d6fc57fb53cac49876f122485b20f47b)
1 1
<div class="contextual">
2 2
<%= link_to(l(:label_news_new),
3 3
           new_project_news_path(@project),
4 4
           :class => 'icon icon-add',
5 5
           :onclick => 'showAndScrollTo("add-news", "news_title"); return false;') if @project && User.current.allowed_to?(:manage_news, @project) %>
6 6
<%= watcher_link(@project.enabled_module('news'), User.current) if @project && User.current.logged? %>
7 7
</div>
8 8

  
9 9
<div id="add-news" style="display:none;">
10 10
<h2><%=l(:label_news_new)%></h2>
11 11
<%= labelled_form_for @news, :url => project_news_index_path(@project),
12 12
                                          :html => { :id => 'news-form', :multipart => true } do |f| %>
13 13
<%= render :partial => 'news/form', :locals => { :f => f } %>
14 14
<%= submit_tag l(:button_create) %>
15 15
<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
16 16
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
17 17
<% end if @project %>
18 18
<div id="preview" class="wiki"></div>
19 19
</div>
20 20

  
21 21
<h2><%=l(:label_news_plural)%></h2>
22 22

  
23 23
<% if @newss.empty? %>
24 24
<p class="nodata"><%= l(:label_no_data) %></p>
25 25
<% else %>
26 26
<% @newss.each do |news| %>
27
 <div class="box">
27 28
    <article class="news-article">
28 29
      <header>
29 30
        <h3><%= avatar(news.author, :size => "24") %><%= link_to_project(news.project) + ': ' unless news.project == @project %>
30 31
        <%= link_to h(news.title), news_path(news) %>
31 32
        <%= "(#{l(:label_x_comments, :count => news.comments_count)})" if news.comments_count > 0 %>
32 33
        <h4 class="author"><%= authoring news.created_on, news.author %></h4>
33 34
        </h3>
34 35
      </header>
35 36
      <div class="wiki">
36 37
      <%= textilizable(news, :description) %>
37 38
      </div>
38 39
    </article>
40
  </div>
39 41
<% end %>
40 42
<% end %>
41 43
<span class="pagination"><%= pagination_links_full @news_pages %></span>
42 44

  
43 45
<% other_formats_links do |f| %>
44 46
  <%= f.link_to 'Atom', :url => {:project_id => @project, :key => User.current.rss_key} %>
45 47
<% end %>
46 48

  
47 49
<% content_for :header_tags do %>
48 50
  <%= auto_discovery_link_tag(:atom, params.merge({:format => 'atom', :page => nil, :key => User.current.rss_key})) %>
49 51
  <%= stylesheet_link_tag 'scm' %>
50 52
<% end %>
51 53

  
52 54
<% html_title(l(:label_news_plural)) -%>
app/views/news/show.html.erb (revision fc236075754c3f9f7180269a1c48aa06f608e238)
1 1
<div class="contextual">
2 2
<%= watcher_link(@news, User.current) %>
3 3
<%= link_to(l(:button_edit),
4 4
      edit_news_path(@news),
5 5
      :class => 'icon icon-edit',
6 6
      :accesskey => accesskey(:edit),
7 7
      :onclick => '$("#edit-news").show(); return false;') if User.current.allowed_to?(:manage_news, @project) %>
8 8
<%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
9 9
</div>
10 10

  
11 11
<h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
12 12

  
13 13
<% if authorize_for('news', 'edit') %>
14 14
<div id="edit-news" style="display:none;">
15 15
<%= labelled_form_for :news, @news, :url => news_path(@news),
16 16
                                           :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
17 17
<%= render :partial => 'form', :locals => { :f => f } %>
18 18
<%= submit_tag l(:button_save) %>
19 19
%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
20 20
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
21 21
<% end %>
22 22
<div id="preview" class="wiki"></div>
23 23
</div>
24 24
<% end %>
25 25

  
26
<p><% unless @news.summary.blank? %><em><%= @news.summary %></em><br /><% end %>
27
<span class="author"><%= authoring @news.created_on, @news.author %></span></p>
26
<div class="box">
27
  <h2><%= avatar(@news.author, :size => "24") %><%= h @news.title %></h2>
28
  <p><h4 class="author">
29
  <% unless @news.summary.blank? %><em><%= @news.summary %></em><br/>
30
  <% end %>
31
  <span class="author"><%= authoring @news.created_on, @news.author %></span></h4></p>
28 32
<div class="wiki">
29 33
<%= textilizable(@news, :description) %>
30 34
</div>
31 35
<%= link_to_attachments @news %>
32 36
<br />
37
</div>
33 38

  
34 39
<div id="comments" style="margin-bottom:16px;">
35 40
<h3 class="comments"><%= l(:label_comment_plural) %></h3>
36 41
<% @comments.each do |comment| %>
37 42
    <% next if comment.new_record? %>
38 43
    <div class="contextual">
39 44
    <%= link_to_if_authorized l(:button_delete), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
40 45
                              :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,
41 46
                              :title => l(:button_delete),
42 47
                              :class => 'icon-only icon-del' %>
43 48
    </div>
44 49
    <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
45 50
    <div class="wiki">
46 51
    <%= textilizable(comment.comments) %>
47 52
    </div>
48 53
<% end if @comments.any? %>
49 54
</div>
50 55

  
51 56
<% if @news.commentable? %>
52 57
<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
53 58
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
54 59
<div class="box">
55 60
    <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
56 61
    <%= wikitoolbar_for 'comment_comments' %>
57 62
</div>
58 63
<p><%= submit_tag l(:button_add) %></p>
59 64
<% end %>
60 65
<% end %>
61 66

  
62 67
<% html_title @news.title -%>
63 68

  
64 69
<% content_for :header_tags do %>
65 70
  <%= stylesheet_link_tag 'scm' %>
66 71
<% end %>