2015-04-07 17:45:00 +08:00
|
|
|
<div class="project_r_h">
|
2015-04-16 11:07:37 +08:00
|
|
|
<h2 class="project_h2">
|
|
|
|
<% if User.current.language == "zh"%>
|
|
|
|
<%= h @board.name %>
|
|
|
|
<% else %>
|
|
|
|
<%= l(:project_module_boards) %>
|
|
|
|
<% end %>
|
|
|
|
</h2>
|
2015-04-07 17:45:00 +08:00
|
|
|
</div>
|
2014-06-12 10:03:01 +08:00
|
|
|
|
|
|
|
<!--display the board-->
|
2014-07-18 10:54:22 +08:00
|
|
|
<% if !User.current.logged? %>
|
2015-04-22 13:56:36 +08:00
|
|
|
<div class="c_grey f14">
|
|
|
|
<%= l(:label_user_login_project_board) %>
|
|
|
|
<%= link_to l(:label_user_login_new), signin_path, :class => "c_blue ml5" %>
|
2014-06-12 10:03:01 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-03-17 17:02:32 +08:00
|
|
|
|
|
|
|
<!-- 内容显示部分 -->
|
2015-04-16 11:17:44 +08:00
|
|
|
<div class="talk_top">
|
2015-04-16 17:29:04 +08:00
|
|
|
<div class="fl"><span><%= l(:label_project_board_count , :count => @topic_count)%></span></div>
|
2015-04-16 11:17:44 +08:00
|
|
|
<% if @project.enabled_modules.where("name = 'boards'").count > 0 && User.current.member_of?(@project) %>
|
2015-04-10 12:48:02 +08:00
|
|
|
<span><%= link_to l(:project_module_boards_post), new_board_message_path(@board),
|
2015-04-07 17:45:00 +08:00
|
|
|
:class => 'problem_new_btn fl c_dorange',
|
|
|
|
:onclick => 'showAndScrollTo("add-message", "message_subject"); return false;' if User.current.logged? %></span>
|
2015-04-07 12:48:47 +08:00
|
|
|
<% end %>
|
2015-04-16 17:29:04 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
2015-03-17 17:02:32 +08:00
|
|
|
<!-- 帖子内容显示 -->
|
2015-04-16 11:17:44 +08:00
|
|
|
<% if @topics.any? %>
|
2015-04-07 12:48:47 +08:00
|
|
|
<% @topics.each do |topic| %>
|
2015-03-17 17:02:32 +08:00
|
|
|
<div class="problem_main">
|
2015-04-07 12:48:47 +08:00
|
|
|
<%= link_to image_tag(url_to_avatar(topic.author), :width=>"32",:height=>"32"), user_path(topic.author),:class => 'problem_pic talk_pic fl' %>
|
2015-03-17 17:02:32 +08:00
|
|
|
<div class="talk_txt fl">
|
2015-04-16 11:07:37 +08:00
|
|
|
<%= link_to h(topic.subject), board_message_path(@board, topic), title:topic.subject.to_s, :class =>"problem_tit fl" %>
|
2015-03-17 17:02:32 +08:00
|
|
|
<% if topic.sticky? %>
|
2015-04-16 11:07:37 +08:00
|
|
|
<a href="javascript:void(0)" class="talk_up fr c_red"><%= l(:label_board_sticky)%></a>
|
2015-03-17 17:02:32 +08:00
|
|
|
<% end %>
|
2015-04-16 11:07:37 +08:00
|
|
|
<br/>
|
|
|
|
<%= l(:label_post_by)%><%= link_to topic.author, user_path(topic.author), :class =>"problem_name" %>
|
|
|
|
<%= l(:label_post_by_time)%><%= format_time topic.created_on %>
|
2015-03-18 20:04:59 +08:00
|
|
|
</div>
|
2015-04-16 17:29:04 +08:00
|
|
|
<%= link_to (l(:label_short_reply) + " "+topic.replies_count.to_s), board_message_path(@board, topic), :class => "talk_btn fr c_white" %>
|
2015-03-17 17:02:32 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
</div><!--讨论主类容 end-->
|
|
|
|
<% end %>
|
2014-06-12 10:03:01 +08:00
|
|
|
<% else %>
|
|
|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
|
|
|
<% end %>
|
2015-04-16 11:17:44 +08:00
|
|
|
<ul class="wlist">
|
2015-04-07 12:48:47 +08:00
|
|
|
<%= pagination_links_full @topic_pages, @topic_count, :per_page_links => false, :remote => false, :flag => true %>
|
|
|
|
</ul>
|
|
|
|
<!--讨论主类容 end-->
|
2014-06-12 10:03:01 +08:00
|
|
|
|
2015-04-15 00:30:33 +08:00
|
|
|
<%# other_formats_links do |f| %>
|
|
|
|
<%#= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
|
|
|
<%# end %>
|
2014-06-12 10:03:01 +08:00
|
|
|
|
|
|
|
<% html_title @board.name %>
|
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@project}: #{@board}") %>
|
|
|
|
<% end %>
|