左三”更多“提供链接

This commit is contained in:
huang 2016-05-06 17:03:54 +08:00
parent 7f9a327166
commit 3de2b151a3
2 changed files with 34 additions and 12 deletions

View File

@ -30,7 +30,7 @@
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, student_work_index_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", student_work_index_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
</div>
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
@ -51,7 +51,11 @@
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= link_to "更多", board_message_url_in_org(activity.board_id, activity.id), :class => "more-btn", :target => "_blank" %>
<% else %>
<%= link_to "更多", board_message_url_in_org(activity.board_id, activity.id), :class => "more-btn", :target => "_blank" %>
<% end %>
</div>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
@ -68,7 +72,7 @@
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
</div>
<% elsif act.org_act_type == "Poll" %>
<% activity = Poll.find(act.org_act_id) %>
@ -92,7 +96,11 @@
<div class="resources-tagbox">
<%= link_to activity.polls_description.to_s.html_safe, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<% if has_commit %>
<%= link_to "更多", Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :class => "more-btn", :target => "_blank" %>
<% else %>
<%= link_to "更多", Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :class => "more-btn", :target => "_blank" %>
<% end %>
</div>
<% end %>
<% end %>
@ -130,7 +138,7 @@
<div class="resources-tagbox">
<%= link_to activity.description.to_s.html_safe, issue_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", issue_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
</div>
<% elsif act.org_act_type == "Message" %>
<% activity = Message.find(act.org_act_id) %>
@ -151,7 +159,11 @@
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<% if activity.parent_id.nil? %> <!--+"(帖子标题)"-->
<%= link_to "更多", board_message_url_in_org(activity.board_id, activity.id), :class => "more-btn", :target => "_blank" %>
<% else %>
<%= link_to "更多", board_message_url_in_org(activity.board_id, activity.id), :class => "more-btn", :target => "_blank" %>
<% end %>
</div>
<% elsif act.org_act_type == "News" %>
<% activity = News.find(act.org_act_id) %>
@ -168,7 +180,7 @@
<div class="resources-tagbox">
<%= link_to activity.content.to_s.html_safe, news_url_in_org(activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", news_url_in_org(activity.id), :class => "more-btn", :target => "_blank" %>
</div>
<% end %>
<% end %>
@ -213,7 +225,8 @@
<div class="resources-tagbox">
<%= link_to document.content.to_s.html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => "more-btn", :target => "_blank" %>
</div>
<% else activity.container_type == 'OrgSubfield' %>
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
@ -241,7 +254,7 @@
<div class="resources-tagbox">
<%= link_to content.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", board_message_url_in_org(message.board.id,message.id), :class => "more-btn", :target => "_blank" %>
</div>
<% else %>
<div class="sn-index-resourcesbox">
@ -260,7 +273,7 @@
<div class="resources-tagbox">
<%= link_to content.to_s.html_safe, board_message_path(message.board,activity), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", board_message_path(message.board,activity), :class => "more-btn", :target => "_blank" %>
</div>
<% end %>
<% end %>
@ -279,7 +292,7 @@
<div class="resources-tagbox">
<%= link_to news.description.to_s.html_safe, news_path(news), :target => '_blank', :class => "resources-tag" %>
</div>
<a href="javascript:void(0);" target="_blank" class="more-btn">更多</a>
<%= link_to "更多", news_path(news), :class => "more-btn", :target => "_blank" %>
</div>
<% end %>
<% end %>
@ -287,7 +300,6 @@
<div class="cl"></div>
</div>
</div>
<% end %>
<% end %>
<% end %>

View File

@ -0,0 +1,10 @@
class UpdateOrgHide < ActiveRecord::Migration
def up
Organization.all.each do |org|
org.update_column(:show_mode, false)
end
end
def down
end
end