From a082d7a8eb4c3a829cf46aaa6c268d15d5a17af0 Mon Sep 17 00:00:00 2001 From: cxt Date: Mon, 7 May 2018 11:26:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=A8=A1=E5=9D=97=E7=9A=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/statistics/_form.html.erb | 20 ++++++++++++++++++- .../statistics/_statistics_list.html.erb | 1 - app/views/statistics/show.html.erb | 11 +++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/app/views/statistics/_form.html.erb b/app/views/statistics/_form.html.erb index f465be39e..6cf96f6e8 100644 --- a/app/views/statistics/_form.html.erb +++ b/app/views/statistics/_form.html.erb @@ -39,7 +39,25 @@
- <%= f.text_area :description, :class => "wb85 h200 mb20", :style => "display: none;" %> +
diff --git a/app/views/statistics/_statistics_list.html.erb b/app/views/statistics/_statistics_list.html.erb index 718d2096d..9cffe7670 100644 --- a/app/views/statistics/_statistics_list.html.erb +++ b/app/views/statistics/_statistics_list.html.erb @@ -15,7 +15,6 @@ <% end %>
<%= link_to "#{statistic.name}", statistic ,:class => "color-grey3" %> -

<%= statistic.description.try(:html_safe) %>

<%= render :partial => 'attachments',:locals => {:attachments => statistic.try(:attachments)} %>
diff --git a/app/views/statistics/show.html.erb b/app/views/statistics/show.html.erb index a3c01c4d2..02f542222 100644 --- a/app/views/statistics/show.html.erb +++ b/app/views/statistics/show.html.erb @@ -6,7 +6,16 @@ <%= image_tag(url_to_avatar(@statistic.creator), :width => "50", :height => "50", :class =>"fl" ,:style =>"border-radius: 50%") %>

<%= @statistic.name %>

-

<%= @statistic.creator.show_name %><%= format_time @statistic.created_at %>

+

+ <%= @statistic.creator.show_name %> + <%= @statistic.main_category.name %> + <% if @statistic.sub_category.present? %> + <%= @statistic.sub_category.try(:name) %> + <% end %> + <% if @statistic.file_size.present? %> + <%= @statistic.file_size %> MB + <% end %> + <%= format_time @statistic.created_at %>

<%= link_to '返回', statistics_path ,:class=>"grey_btn fr mr45 ml15", :style=>"padding:4px 10px" %> <% if User.current.id == @statistic.user_id || User.current.admin? %>