From 03fed7b36da4429d5665cbd70b23950fffa5f3e3 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Tue, 6 Aug 2013 15:53:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E5=AD=90=E9=A1=B5=E9=9D=A2=E7=9A=84=E7=8E=B0=E5=AE=9E=20?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E9=A1=B5=E9=9D=A2=E5=8F=8A=E5=AD=90=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8E=92=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/documents/_document.html.erb | 19 +++++++++++++++++-- app/views/documents/index.html.erb | 2 +- app/views/documents/show.html.erb | 16 ++++++++++++++-- app/views/news/show.html.erb | 22 ++++++++++++++++------ public/stylesheets/application.css | 6 ++++++ 5 files changed, 54 insertions(+), 11 deletions(-) diff --git a/app/views/documents/_document.html.erb b/app/views/documents/_document.html.erb index e14d880a7..20d3af415 100644 --- a/app/views/documents/_document.html.erb +++ b/app/views/documents/_document.html.erb @@ -1,6 +1,21 @@ -

<%= link_to h(document.title), document_path(document) %>

+ + + + + + + + + + + +
<%= link_to h(document.title), document_path(document) %>
+
+ <%= textilizable(truncate_lines(document.description), :object => document) %> +
+

<%= format_time(document.updated_on) %>

diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index 28b524567..b0ccee89a 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -19,7 +19,7 @@ <% if @grouped.empty? %>

<%= l(:label_no_data) %>

<% end %> <% @grouped.keys.sort.each do |group| %> -

<%= group %>

+ <%= render :partial => 'documents/document', :collection => @grouped[group] %> <% end %> diff --git a/app/views/documents/show.html.erb b/app/views/documents/show.html.erb index 99bcc2a08..38ed88192 100644 --- a/app/views/documents/show.html.erb +++ b/app/views/documents/show.html.erb @@ -7,13 +7,25 @@ <% end %> -

<%=h @document.title %>

+ + + + + + + +

<%=h @document.title %>

+
+ <%= textilizable @document.description, :attachments => @document.attachments %> +
+

<%= format_date @document.created_on %>

+

<%= l(:label_attachment_plural) %>

<%= link_to_attachments @document %> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index f8aa85713..516b46a54 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -8,8 +8,7 @@ <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %> -

<%= link_to image_tag(url_to_avatar(@user), :class => 'avatar2'), :class => "avatar" %><%=h @news.title %>

- +

<%=h @news.title %>

<% if authorize_for('news', 'edit') %> --> +<% if @news.commentable? %>
-

<%= l(:label_comment_plural) %>

+

<%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>

+<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> +
+ <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> + <%= wikitoolbar_for 'comment_comments' %> +
+

<%= submit_tag l(:button_add) %>

+<% end %> +<% end %> +
+

<%= l(:label_comment_plural) %>

<% @comments.each do |comment| %> <% next if comment.new_record? %> @@ -44,7 +54,7 @@
<%= image_tag(url_to_avatar(comment.author), :class => "avatar")%> - + @@ -61,7 +71,7 @@ -<% if @news.commentable? %> + <% html_title @news.title -%> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index b58b8c587..9e5e9582b 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -64,6 +64,12 @@ ul.tool li{list-style-type:none; height:auto; background-color: #d0d9e0; } + +.font_title_document{ + font-size: 13px; + font-weight: bold; +} + .font_title_left{ font-family:微软雅黑; font-weight:bold;
<%=link_to_user(comment.author) if comment.respond_to?(:author) %> 添加了<%= l(:label_comment_plural) %><%=link_to_user(comment.author) if comment.respond_to?(:author) %> 发表了<%= l(:label_comment_plural) %>

<%= textilizable(comment.comments) %>