From a4d4dd5d971050362a65bfe4d4d5a693bf9c3940 Mon Sep 17 00:00:00 2001 From: fanqiang <316257774@qq.com> Date: Sat, 23 Nov 2013 20:04:26 +0800 Subject: [PATCH] haha --- app/views/forums/_show_topics.html.erb | 38 ++++++ app/views/layouts/base_forums.html.erb | 172 +++++++++++++++++++++++++ app/views/memos/new.html.erb | 5 + 3 files changed, 215 insertions(+) create mode 100644 app/views/forums/_show_topics.html.erb create mode 100644 app/views/layouts/base_forums.html.erb create mode 100644 app/views/memos/new.html.erb diff --git a/app/views/forums/_show_topics.html.erb b/app/views/forums/_show_topics.html.erb new file mode 100644 index 000000000..d0adb4ba9 --- /dev/null +++ b/app/views/forums/_show_topics.html.erb @@ -0,0 +1,38 @@ + +
<%=h @forum.name %>
+
共有 <%=link_to memos.count %> 个贴子
+
+<% if memos.any? %> + <% memos.each do |topic| %> + + + + +
<%= link_to image_tag(url_to_avatar(topic.author), :class => "avatar"), user_path(topic.author) %> + + + + + + + + + + + +
<%= link_to h(topic.subject), forum_memo_path(@forum, topic) %> + + + + + + + +
<%= link_to (topic.replies_count), forum_memo_path(@forum, topic) %>
回答
标签
<%= authoring topic.created_at, topic.author %> +
+
+ <% end %> +<% else %> +

<%= l(:label_no_data) %>

+<% end %> +
\ No newline at end of file diff --git a/app/views/layouts/base_forums.html.erb b/app/views/layouts/base_forums.html.erb new file mode 100644 index 000000000..d723a41ce --- /dev/null +++ b/app/views/layouts/base_forums.html.erb @@ -0,0 +1,172 @@ + + + + + <%= h html_title %> + + + <%= csrf_meta_tag %> + <%= favicon %> + <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', 'nyan', :media => 'all' %> + <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %> + <%= javascript_heads %> + <%= heads_for_theme %> + <%= call_hook :view_layouts_base_html_head %> + + <%= yield :header_tags -%> + + + +
+
+
+ <%=render :partial => 'layouts/base_header'%> +
+ + +
+ + + + + + + + + + +
软件项目托管社区<%= l(:label_user_location) %> : + +
<%= 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) %>

+
+ + + + + + +
+ + <%= render_flash_messages %> + <%= yield %> + <%= call_hook :view_layouts_base_content %> +
+ +
+ <%= render :partial => 'layouts/base_footer'%> + <%= debug(params) if Rails.env.development? %> +
+ + + +
+
+ <%= call_hook :view_layouts_base_body_bottom %> + + + diff --git a/app/views/memos/new.html.erb b/app/views/memos/new.html.erb new file mode 100644 index 000000000..bf2b573c3 --- /dev/null +++ b/app/views/memos/new.html.erb @@ -0,0 +1,5 @@ +

New memo

+ +<%= render 'form' %> + +<%= link_to 'Back', forums_path(@forum) %> \ No newline at end of file