Merge branch 'hjq_beidou' into develop
This commit is contained in:
commit
f079d27622
|
@ -3087,6 +3087,10 @@ def host_with_protocol
|
|||
return Setting.protocol + "://" + Setting.host_name
|
||||
end
|
||||
|
||||
def secdomain_with_protocol secdomain
|
||||
return Setting.protocol + "://" + secdomain + ".trustie.net"
|
||||
end
|
||||
|
||||
|
||||
#获取回复的所有父节点
|
||||
def get_reply_parents parents_rely, comment
|
||||
|
|
|
@ -30,4 +30,8 @@ class Organization < ActiveRecord::Base
|
|||
def allow_set_teachers
|
||||
self.allow_teacher.to_i == 1 ? true : false
|
||||
end
|
||||
|
||||
def secdomain_name
|
||||
Secdomain.where("sub_type=2 and pid=?", self.id).first.try(:subname)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
|
@ -44,7 +43,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
|
@ -63,7 +62,7 @@
|
|||
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.title.to_s, news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Poll" %>
|
||||
<% activity = Poll.find(act.org_act_id) %>
|
||||
|
@ -88,7 +87,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.polls_description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", poll_name, Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", Setting.protocol + "://" + Setting.host_name + "/poll/" + activity.id.to_s + "/poll_result", :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -119,7 +118,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.subject.to_s, issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", issue_url_in_org(activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<% activity = Message.find(act.org_act_id) %>
|
||||
|
@ -137,7 +136,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= activity.content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", activity.parent_id.nil? ? activity.subject.to_s.html_safe : activity.parent.subject.to_s.html_safe, board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(activity.board_id, activity.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<% activity = News.find(act.org_act_id) %>
|
||||
|
@ -217,7 +216,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= content.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", message.parent_id.nil? ? message.subject.to_s.html_safe : message.parent.subject.to_s.html_safe, board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", board_message_url_in_org(message.board.id,message.id), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-news-bigbox fl">
|
||||
|
@ -239,9 +238,9 @@
|
|||
</div>
|
||||
<div class="sn-read-more">
|
||||
<% if message.parent_id.nil? %>
|
||||
<%=link_to "查看全文>>", message.subject.to_s.html_safe, board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<%=link_to "查看全文>>", board_message_path(message.board,message), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<% else %>
|
||||
<%=link_to "查看全文>>", message.parent.subject.to_s.html_safe, board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<%=link_to "查看全文>>", board_message_path(message.board,activity), :target => "_blank", :class => "sn-link-grey2 sn-fr" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -263,7 +262,7 @@
|
|||
<div class="sn-news-txt">
|
||||
<div class="sn-news-wrap"><%= news.description.to_s.html_safe %></div>
|
||||
</div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news.title.to_s, news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
<div class="sn-read-more"><%=link_to "查看全文>>", news_path(news), :target => "_blank", :class => "sn-link-grey2 sn-fr" %></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -109,9 +109,14 @@
|
|||
<div class="fr orgMemContainer">
|
||||
<div class="orgMemberAdd">
|
||||
<p class="fontBlue fb mb5">添加成员</p>
|
||||
<%= form_tag url_for(:controller => 'org_member',:action => 'create',:org=>@organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<%= form_tag url_for(:controller => 'org_member', :action => 'create', :org => @organization),:id=>'org_member_add_form',:remote=>true do |f|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、登录名搜索" class="orgAddSearch mb20" />
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<% if @organization.secdomain.nil? %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript host_with_protocol + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<% else %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript secdomain_with_protocol(@organization.secdomain_name) + "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<% end %>
|
||||
|
||||
<div id="principals_for_new_member">
|
||||
<%= find_user_not_in_current_org_by_name(@project) %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue