From dc002166030f356f83cd87fe14261aca3c605aa5 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Mon, 25 Nov 2013 21:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=B0=88=E8=AE=BA?= =?UTF-8?q?=E5=8C=BA=E6=A1=86=E6=9E=B6=E3=80=81=E5=88=97=E8=A1=A8=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/boards/show.html.erb | 10 +- app/views/forums/_forum_list.html.erb | 2 +- app/views/forums/_show_topics.html.erb | 1 - app/views/forums/show.html.erb | 10 +- app/views/layouts/base_forums.html.erb | 135 +++++-------------------- app/views/layouts/base_memos.html.erb | 113 ++++----------------- app/views/messages/show.html.erb | 86 ++++++++++++++-- public/images/sidebar/forums.png | Bin 0 -> 2248 bytes public/stylesheets/application.css | 53 ++++++++-- 9 files changed, 178 insertions(+), 232 deletions(-) create mode 100644 public/images/sidebar/forums.png diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index fbe77d00a..d5faf8f03 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -41,19 +41,15 @@
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %> - +
- - - - - - + +
<%= link_to h(topic.subject), board_message_path(@board, topic) %>
<%=link_to (topic.replies_count), board_message_path(@board, topic) %>
回答
标签
<%= authoring topic.created_on, topic.author %>
标签
<%= authoring topic.created_on, topic.author %>
diff --git a/app/views/forums/_forum_list.html.erb b/app/views/forums/_forum_list.html.erb index eb55e0711..99060bb59 100644 --- a/app/views/forums/_forum_list.html.erb +++ b/app/views/forums/_forum_list.html.erb @@ -6,7 +6,7 @@ <%= link_to image_tag(url_to_avatar(forum.creator), :class => "avatar"), user_path(forum.creator) %> - +
<%= link_to h(forum.name), forum_path(forum) %> diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb index b7f68196a..047c957f2 100644 --- a/app/views/forums/_show_topics.html.erb +++ b/app/views/forums/_show_topics.html.erb @@ -1,6 +1,5 @@ -
<%=h @forum.name %>
共有 <%=link_to memos.count %> 个贴子
<% if memos.any? %> diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index fcb4769d1..a33a7547f 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -8,9 +8,9 @@

<%= %>

- -<%= link_to 'Edit', edit_forum_path(@forum) %> | -<%= link_to 'Back', forums_path %> -<%= link_to 'new_topic', new_forum_memo_path(@forum) %> - + +<%= link_to '新建', new_forum_memo_path(@forum), :class => 'icon icon-add' %> +<% if User.current.admin?||User.current.login==@forum.creator.login %> | +<%= link_to '编辑', edit_forum_path(@forum), :class => 'icon icon-edit' %> +<% end %> <%= render :partial => 'forums/show_topics', :locals => {:memos => @memos} %> diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb index 631816b6c..694806d72 100644 --- a/app/views/layouts/base_forums.html.erb +++ b/app/views/layouts/base_forums.html.erb @@ -1,3 +1,4 @@ + @@ -14,17 +15,14 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - - +
<%=render :partial => 'layouts/base_header'%>
- - -
+
@@ -41,111 +39,33 @@ - +
软件项目托管社区
<%= link_to "forge.trustie.net/projects", :controller => 'projects', :action => 'index', :project_type => 0 %>

<%=link_to l(:label_home),home_path %> > <%=link_to '讨论区', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %>

<%=link_to l(:label_home),home_path %> > <%=link_to '讨论区', :controller => 'forums', :action => 'index' %> > <%=link_to @forum.name, forum_path(@forum) %>

-
- - - - - +
-