Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop
This commit is contained in:
commit
a88a36bd35
4
Gemfile
4
Gemfile
|
@ -50,10 +50,10 @@ gem 'elasticsearch-model'
|
|||
gem 'elasticsearch-rails'
|
||||
|
||||
#rails 3.2.22.2 bug
|
||||
gem "test-unit", "~>3.0"
|
||||
# gem "test-unit", "~>3.0"
|
||||
|
||||
### profile
|
||||
gem 'oneapm_rpm'
|
||||
# gem 'oneapm_rpm'
|
||||
|
||||
group :development do
|
||||
gem 'grape-swagger'
|
||||
|
|
|
@ -183,6 +183,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 用户发布新issue
|
||||
def create
|
||||
call_hook(:controller_issues_new_before_save, { :params => params, :issue => @issue })
|
||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||
|
@ -225,6 +226,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
def edit
|
||||
# 修改实例变量的值
|
||||
return unless update_issue_from_params
|
||||
|
||||
respond_to do |format|
|
||||
|
@ -233,6 +235,7 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 用户编辑更改issue
|
||||
def update
|
||||
if params[:issue_detail]
|
||||
issue = Issue.find(params[:id])
|
||||
|
@ -240,6 +243,7 @@ class IssuesController < ApplicationController
|
|||
@saved = update_user_issue_detail(issue, params)
|
||||
return
|
||||
else
|
||||
# 修改实例变量的值
|
||||
return unless update_issue_from_params
|
||||
@issue.save_attachments(params[:attachments] || (params[:issue] && params[:issue][:uploads]))
|
||||
saved = false
|
||||
|
@ -575,6 +579,7 @@ class IssuesController < ApplicationController
|
|||
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
|
||||
@time_entry.attributes = params[:time_entry]
|
||||
|
||||
# 更新issue状态时,journal表产生记录,返回@current_journal
|
||||
@issue.init_journal(User.current)
|
||||
|
||||
issue_attributes = params[:issue]
|
||||
|
|
|
@ -8,18 +8,33 @@ class OrgMemberController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# 组织子成员,及其分页
|
||||
def org_member_paging
|
||||
@organization = Organization.find(params[:org])
|
||||
|
||||
if User.current.admin? || User.current.admin_of_org?(@organization)
|
||||
@members = OrgMember.where(:organization_id => @organization.id).all.sort
|
||||
@members = paginateHelper @members, 20
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
@org = Organization.find(params[:org])
|
||||
@organization = Organization.find(params[:org])
|
||||
if params[:membership].nil?
|
||||
@fail_hint = l(:label_blank_user_lists_for_org)
|
||||
else
|
||||
member_ids = params[:membership][:user_ids]
|
||||
role_id = params[:orgRole]
|
||||
member_ids.each do |user_id|
|
||||
member = OrgMember.create(:user_id=>user_id, :created_at => Time.now)
|
||||
@org.org_members << member
|
||||
member = OrgMember.create(:user_id => user_id, :created_at => Time.now)
|
||||
@organization.org_members << member
|
||||
OrgMemberRole.create(:org_member_id => member.id, :role_id => role_id)
|
||||
end
|
||||
@members = (@organization.org_members).sort
|
||||
@members = paginateHelper @members, 20
|
||||
end
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
@ -32,7 +47,11 @@ class OrgMemberController < ApplicationController
|
|||
@member_role = @member.org_member_roles[0]
|
||||
@member_role.role_id = params[:org_member][:role_ids][0]
|
||||
@member_role.save
|
||||
@org = @member.organization
|
||||
@organization = @member.organization
|
||||
# 成员编辑角色后分页
|
||||
@members = (@organization.org_members).sort
|
||||
@members = paginateHelper @members, 20
|
||||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
@ -44,8 +63,10 @@ class OrgMemberController < ApplicationController
|
|||
|
||||
def destroy
|
||||
member = OrgMember.find(params[:id])
|
||||
@org = member.organization
|
||||
@organization = member.organization
|
||||
member.destroy
|
||||
@members = (@organization.org_members).sort
|
||||
@members = paginateHelper @members, 20
|
||||
respond_to do |format|
|
||||
format.js
|
||||
end
|
||||
|
|
|
@ -421,6 +421,8 @@ class OrganizationsController < ApplicationController
|
|||
@organization = Organization.find(params[:id])
|
||||
|
||||
if User.current.admin? || User.current.admin_of_org?(@organization)
|
||||
@members = OrgMember.where(:organization_id => @organization.id).all.sort
|
||||
@members = paginateHelper @members, 20
|
||||
else
|
||||
render_403
|
||||
end
|
||||
|
@ -451,10 +453,11 @@ class OrganizationsController < ApplicationController
|
|||
|
||||
def members
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
@members = OrgMember.where("organization_id =?", @organization.id)
|
||||
@members = OrgMember.where(:organization_id => @organization.id).all.sort
|
||||
else
|
||||
render_403
|
||||
end
|
||||
@members = paginateHelper @members, 20
|
||||
end
|
||||
|
||||
def more_org_projects
|
||||
|
|
|
@ -580,6 +580,7 @@ class ProjectsController < ApplicationController
|
|||
end
|
||||
end
|
||||
@members = paginateHelper @members
|
||||
|
||||
end
|
||||
|
||||
def update_message_status(user, project)
|
||||
|
|
|
@ -2677,7 +2677,8 @@ class UsersController < ApplicationController
|
|||
project_ids.each do |project_id|
|
||||
project = Project.find(project_id)
|
||||
if project.news.map(&:id).exclude?(news.id)
|
||||
message = Message.create(:board_id => project.boards.first.id, :subject => news.title, :content => news.description, :author_id => User.current.id)
|
||||
# message = Message.create(:board_id => project.boards.first.id, :subject => news.title, :content => news.description, :author_id => User.current.id)
|
||||
message = News.create(:project_id => project.id, :title => news.title, :summary => news.summary, :description => news.description, :author_id => User.current.id, :created_on => Time.now )
|
||||
# record forward to table forwards if new record is valid
|
||||
if message.valid?
|
||||
news.forwards << Forward.new(:to_type => message.class.name, :to_id => message.id)
|
||||
|
@ -3515,11 +3516,15 @@ class UsersController < ApplicationController
|
|||
@order, @c_sort, @type, @list_type = 1, 2, 1, 1
|
||||
#limit = 5
|
||||
|
||||
@my_projects = @user.projects.visible.where("projects.user_id = #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
# 用户的所有项目
|
||||
# @my_projects = @user.projects.visible.where("projects.user_id = #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
@my_projects = @user.projects.where("projects.user_id = #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
@my_projects_count = @my_projects.count
|
||||
|
||||
@my_joined_projects = @user.projects.visible.where("projects.user_id != #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
#@my_joined_projects = @user.projects.visible.where("projects.user_id != #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
@my_joined_projects = @user.projects.where("projects.user_id != #{@user.id}").select("projects.*,(SELECT MAX(updated_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS updatetime").order("updatetime DESC")
|
||||
@my_joined_projects_count = @my_joined_projects.count
|
||||
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'new_base_user'}
|
||||
end
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
module OrgMemberHelper
|
||||
include ApplicationHelper
|
||||
|
||||
def find_user_not_in_current_org_by_name org
|
||||
if params[:q] && params[:q].lstrip.rstrip != ""
|
||||
scope = Principal.active.sorted.not_member_of_org(org).like(params[:q])
|
||||
|
|
|
@ -757,6 +757,7 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
|
||||
# 更新issue时,判断更新之前当前是否有自动更新的评论
|
||||
def init_journal(user, notes = "")
|
||||
@current_journal ||= Journal.new(:journalized => self, :user => user, :notes => notes)
|
||||
if new_record?
|
||||
|
@ -1454,8 +1455,18 @@ class Issue < ActiveRecord::Base
|
|||
end
|
||||
|
||||
# Callback on file attachment
|
||||
# 在执行issue模块前 执行:当附件被添加时,产生评论
|
||||
# 第一次创建issue时,@current_journal为nil,评论不产生
|
||||
# 当附件名称重名时,也不产生评论
|
||||
# 当更新isuue时,第一次上传的附件的已经存在,则不更新次附件评论
|
||||
def attachment_added(obj)
|
||||
if @current_journal && @current_journal.user_id == obj.author_id && JournalDetail.find_all_by_value(obj.filename).count == 0
|
||||
|
||||
# 找出该issue评论表中,附件重名的个数
|
||||
jor = Journal.where(:journalized_id => self.id)
|
||||
jor_ids = jor.empty? ? "(-1)" : "(" + jor.map{|detail| detail.id}.join(",") + ")"
|
||||
jor_details_count = JournalDetail.where("journal_id in #{jor_ids} and value = '#{obj.filename}'").count
|
||||
|
||||
if @current_journal && @current_journal.user_id == obj.author_id && jor_details_count == 0 && self.attachments.find_all_by_filename(obj.filename).count == 0
|
||||
@current_journal.details << JournalDetail.new(:property => 'attachment', :prop_key => obj.id, :value => obj.filename)
|
||||
|
||||
end
|
||||
|
|
|
@ -74,7 +74,6 @@
|
|||
});
|
||||
function check_and_submit(doc){
|
||||
$("#error").html('').hide();
|
||||
check_forum_name();
|
||||
if( $("textarea[name='forum[name]']").val().trim() == "" && $("textarea[name='forum[description]']").val().trim() != "" ){
|
||||
$("#error").html("名称不能为空").show();
|
||||
return;
|
||||
|
@ -98,7 +97,6 @@
|
|||
'<%= check_forum_name_forums_path %>',
|
||||
{"forum_name":encodeURIComponent(name)},
|
||||
function(data){
|
||||
|
||||
if( data == 'true'){
|
||||
$("#error").html("贴吧名称已经存在").show();
|
||||
check_pass = false;
|
||||
|
|
|
@ -78,5 +78,5 @@
|
|||
<div class="cl"></div>
|
||||
<%= call_hook(:view_issues_form_details_bottom, {:issue => @issue, :form => f}) %>
|
||||
<% end %>
|
||||
<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();" class="blue_btn fl ml80"> 确定</a>
|
||||
<a href="javascript:void(0);" onclick="issue_desc_editor.sync();$('#issue-form').submit();location.reload()" class="blue_btn fl ml80" id="issue_confirm"> 确定</a>
|
||||
<a href="javascript:void(0);" onclick="issueDetailShow();" class="grey_btn fl mr50 ml10" > 取消 </a>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<a href ="javascript:void(0);" disabled="true"><%= image_tag(url_to_avatar(User.current),:width =>"40",:height => "40",:alt=>"头像", :id => "nh_user_logo", :class => "portraitRadius") %></a>
|
||||
<ul class="topnav_login_list none" id="topnav_login_list">
|
||||
<li>
|
||||
<a href ="javascript:void(0);" class="menuGrey" disabled="true">修改资料</a>
|
||||
<%= link_to "修改资料", my_account_path(:tip => 1), :class => "menuGrey"%>
|
||||
</li>
|
||||
<li>
|
||||
<a href ="javascript:void(0);" class="menuGrey" disabled="true">我的组织</a>
|
||||
|
@ -48,7 +48,7 @@
|
|||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "退出",logout_url_without_domain,:class => "menuGrey",:method => "post"%>
|
||||
<%= link_to "退出", logout_url_without_domain, :class => "menuGrey", :method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
<div class="homepageLeft mt10" id="LSide">
|
||||
<div class="user_leftinfo mb10">
|
||||
<% if User.current.logged?%>
|
||||
<a href ="javascript:void(0);" disabled="true" class="user_leftinfo_img"><%= image_tag(url_to_avatar(@user),width:"74", height: "74", :id=>'nh_user_tx')%></a>
|
||||
<a href ="javascript:void(0);" disabled="true" class="user_leftinfo_img"><%= image_tag(url_to_avatar(@user), width:"74", height: "74", :id=>'nh_user_tx')%></a>
|
||||
<% else %>
|
||||
<img src="images/user/male.jpg" width="74" height="74" />
|
||||
<% end %>
|
||||
|
@ -112,7 +112,7 @@
|
|||
<% end %>
|
||||
<div class="user_info_inner">
|
||||
<div class=" user_leftinfo_namebox" >
|
||||
<a href="javascript:void(0);" class="user_leftinfo_name"><%=@user.show_name %></a>
|
||||
<a href="javascript:void(0);" class="user_leftinfo_name"><%= @user.show_name %></a>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<span class="user_cirbtn_yellow" ><%= get_user_roll @user %></span>
|
||||
<% end%>
|
||||
|
@ -123,7 +123,7 @@
|
|||
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
|
||||
</div>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑签名" id="user_brief_introduction_edit" onblur="edit_user_introduction('<%= edit_brief_introduction_user_path(@user.id)%>');"><%= @user.user_extensions.brief_introduction %></textarea>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑签名" id="user_brief_introduction_edit" onblur="edit_user_introduction('<%= edit_brief_introduction_user_path(@user.id) %>');"><%= @user.user_extensions.brief_introduction %></textarea>
|
||||
</div>
|
||||
<ul class="user_atten clear">
|
||||
<li>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher"><a href="<%=user_path(reply.author)%>" class="newsBlue mr10 f14"><%= reply.author.name%></a><%= format_date(reply.created_at) %></div>
|
||||
<div class="homepagePostReplyContent" id="activity_description_<%= reply.id %>"><%= h reply.content%></div>
|
||||
<div class="homepagePostReplyContent" id="activity_description_<%= reply.id %>"><%= h reply.content.html_safe%></div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
|
|
|
@ -70,15 +70,15 @@
|
|||
</select>
|
||||
<span nhname="tag" nh_tag_1="true" style='display:none;'>
|
||||
<% if !User.current.user_extensions.nil? && !User.current.user_extensions.student_id.nil? %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID),:style=>"width:127px;" %>
|
||||
<%= text_field_tag :no, User.current.user_extensions.student_id, :placeholder => l(:label_account_identity_studentID),:style => "width:127px;" %>
|
||||
<% else %>
|
||||
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID),:style=>"60px" %></span>
|
||||
<%= text_field_tag :no, nil, :placeholder => l(:label_account_identity_studentID), :style => "60px" %></span>
|
||||
<% end %>
|
||||
</span>
|
||||
<span id="identity_hint" style="display: none"></span>
|
||||
</li>
|
||||
|
||||
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;"><%= text_field_tag :lastname,@user.lastname+@user.firstname,:no_label=>true, :required => true,:nh_required=>"1",:class=>"w210" %><span id="last_name_notice" class="none c_red">姓名不能为空</span>
|
||||
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;"><%= text_field_tag :lastname, @user.lastname+@user.firstname, :no_label => true, :required => true, :nh_required => "1",:class => "w210" %><span id="last_name_notice" class="none c_red">姓名不能为空</span>
|
||||
|
||||
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">
|
||||
<% if User.current.user_extensions && User.current.user_extensions.gender && User.current.user_extensions.gender == 1 %>
|
||||
|
@ -90,6 +90,7 @@
|
|||
</li>
|
||||
|
||||
<li nhname="tag" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" style="display:none;">
|
||||
<!-- 基本资料页面单位审核显示 -->
|
||||
<% if User.current.user_extensions.nil? %>
|
||||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="" placeholder=" --请选择您所属的单位--"/>
|
||||
|
@ -98,13 +99,14 @@
|
|||
<span id="hint" style="color: #7f7f7f;display: none"><a id="school_num" href="javascript:void(0)" style="color: red" ></a><a id="search_condition" href="javascript:void(0)"></a></span>
|
||||
</p>
|
||||
<!--<input nhname="tag" nh_tag_0="true" nh_tag_1="true" id="occupation_name" type="text" style="display: none;width:117px;" readonly/>-->
|
||||
<!-- 从业者选择单位名称 -->
|
||||
<% elsif User.current.user_extensions.identity == 3 || User.current.user_extensions.identity == 2 %>
|
||||
<% if User.current.user_extensions.school_id.nil? %>
|
||||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text" placeholder="--请搜索您所在的高校(单位)--" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
<% else %>
|
||||
<input nhname="tag" autocomplete="off" maxlength="36" nh_tag_0="true" nh_tag_1="true" nh_tag_3="true" id="province" name="province" style="display: none;" class="w210 fl" type="text"value="<%= User.current.user_extensions.school %>" >
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.occupation %>" />
|
||||
<input nhname="tag" nh_tag_4="true" id="occupation" name="occupation" style="display: none;" class="w210" type="text" value="<%= @user.user_extensions.school.id %>" /> <!-- 单位名称的test框选中下拉列表框的id -->
|
||||
<% end %>
|
||||
<p class="fl ml10">
|
||||
<!-- <span id="errortip" class="icons_warning fl mt5" style="display: none;"></span> -->
|
||||
|
@ -605,12 +607,15 @@
|
|||
});
|
||||
});
|
||||
|
||||
// 基本资料页面提交表单时,判断身份与单位是否合法
|
||||
function my_account_form_submit(){
|
||||
if($("#userIdentity").val() == -1 ) {
|
||||
$("#identity_hint").html('<span style="color:red">请选择身份</span>').show();
|
||||
e.stopImmediatePropagation();
|
||||
e.stopImmediatePropagation(); // 阻止事件冒泡
|
||||
return;
|
||||
}
|
||||
|
||||
// 单位或高校必须从下拉列表中选择
|
||||
if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话
|
||||
$("#hint").html('<span style="color:red">单位名称必须是从下拉列表中选择的,不能手动修改</span>').show();
|
||||
e.stopImmediatePropagation();
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<% if @fail_hint %>
|
||||
alert("<%= @fail_hint %>");
|
||||
<% else %>
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
||||
// 组织添加成员后,同步刷新成员列表,左侧成员数
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial => "organizations/org_member_list", :locals => {:members => @members}) %>');
|
||||
$("#principals_for_new_member").html('');
|
||||
$("#org_members_count_id").html("<%= @org.org_members.count %>");
|
||||
$("#org_members_count_id").html("<%= @organization.org_members.count %>");
|
||||
$("#not_org_member_search").val("");
|
||||
<% end %>
|
|
@ -1,3 +1,4 @@
|
|||
// 删除成员后,同步刷新成员列表与左侧成员显示数
|
||||
$("#org_members_count_id").html("");
|
||||
$("#org_members_count_id").html("<%= @org.org_members.count %>")
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
||||
$("#org_members_count_id").html("<%= @organization.org_members.count %>");
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial => "organizations/org_member_list", :locals=> {:members => @members}) %>');
|
|
@ -1,3 +1,4 @@
|
|||
// 组织成员删除后,同步刷新成员数和成员列表
|
||||
$("#org_members_count_id").html("");
|
||||
$("#org_members_count_id").html("<%= @org.org_members.count %>")
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
||||
$("#org_members_count_id").html("<%= @organization.org_members.count %>");
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial => "organizations/org_member_list", :locals => {:members => @members}) %>');
|
|
@ -1,23 +1,23 @@
|
|||
<% if @org%>
|
||||
<% if @org %>
|
||||
var checked = $("#principals_for_new_member input:checked").size();
|
||||
if(checked > 0)
|
||||
{
|
||||
alert('翻页或搜索后将丢失当前选择的用户数据!');
|
||||
}
|
||||
<% if @flag == "true"%>
|
||||
<%# if @flag == "true"%>
|
||||
// $('#principals_for_new_member').html('<%#= escape_javascript(find_user_not_in_current_org_by_name(@org)) %>');
|
||||
<%# else%>
|
||||
$('#principals_for_new_member').html('<%= escape_javascript(find_user_not_in_current_org_by_name(@org)) %>');
|
||||
<% else%>
|
||||
$('#principals_for_new_member').html('<%= escape_javascript(find_user_not_in_current_org_by_name(@org)) %>');
|
||||
<% end%>
|
||||
<%# end%>
|
||||
|
||||
<%end%>
|
||||
var collection=$("#principals_for_new_member").children("#principals").children("label");
|
||||
collection.css("text-overflow","ellipsis");
|
||||
collection.css("white-space","nowrap");
|
||||
collection.css("width","200px");
|
||||
collection.css("overflow","hidden");
|
||||
for(i=0;i<collection.length;i++){ //增加悬浮显示
|
||||
var label=collection[i];
|
||||
var text=$(label).text();
|
||||
$(label).attr("title",text);
|
||||
<% end %>
|
||||
var collection = $("#principals_for_new_member").children("#principals").children("label");
|
||||
collection.css("text-overflow", "ellipsis");
|
||||
collection.css("white-space", "nowrap");
|
||||
collection.css("width", "200px");
|
||||
collection.css("overflow", "hidden");
|
||||
for(i = 0; i < collection.length; i++){ //增加悬浮显示
|
||||
var label = collection[i];
|
||||
var text = $(label).text();
|
||||
$(label).attr("title", text);
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
<% if @organization %>
|
||||
// 局部更新组织页面子模块 id = org_member_list
|
||||
$('#org_member_list').html("<%= escape_javascript(render :partial => 'organizations/org_member_list', :locals => {:members => @members}) %>");
|
||||
<% end %>
|
|
@ -1 +1,2 @@
|
|||
$("#org_member_list").html('<%= escape_javascript( render :partial=>"organizations/org_member_list",:locals=> {:members=>@org.org_members}) %>');
|
||||
// 编辑成员列表角色后,刷新成员列表
|
||||
$("#org_member_list").html('<%= escape_javascript( render :partial => "organizations/org_member_list",:locals => {:members => @members}) %>');
|
|
@ -103,22 +103,20 @@
|
|||
<%= link_to "#{field.name}", show_org_subfield_organization_path(:id => organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<!-- link_to "#{field.name}", organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" -->
|
||||
<a href = "javascript:void(0);" class = "homepageMenuText" onclick = "$('#PostDomain_<%= field.id %>').slideToggle();"><%= field.name %></a>
|
||||
<% end %>
|
||||
<% if User.current.logged? and User.current.admin_of_org?(organization) %>
|
||||
<%=link_to "", new_organization_org_document_comment_path(organization, :field_id => field.id), :method => "get", :class => "homepageMenuSetting fr", :title => "发布帖子" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="<%= (field.sub_domains.count == 0) ? 'homepageLeftMenuCourses':'homepageLeftMenuCourses borderBottomNone' %>" id="PostDomain_<%= field.id %>" style="display:none;">
|
||||
<div class="homepageLeftMenuCourses" id="PostDomain_<%= field.id %>" style="display:<%= field.sub_domains.count == 0 ? 'none' : '' %>">
|
||||
|
||||
<ul>
|
||||
<%= render :partial => 'organizations/org_subdomain',:locals=>{:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
|
||||
<%= render :partial => 'organizations/org_subdomain',:locals => {:subdomains => field.sub_domains.reorder('priority').uniq, :org_subfield_id => field.id} %>
|
||||
</ul>
|
||||
</div>
|
||||
<% unless (field.sub_domains.count == 0 || !if_hidden_subdomain(field)) %>
|
||||
<li class="homepageLeftMenuMore" id="sub_domain_jiantou_<%= field %>">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% elsif field.field_type == "Comptec" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
<% end %>
|
||||
<%= hidden_field_tag 'membership[role_ids][]', '' %>
|
||||
<div class="pt5">
|
||||
<a href="javascript:void(0)" class="org_member_btn" onclick="$('#org-member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
|
||||
<a href="javascript:void(0)" class="org_member_btn" onclick = "$('#org-member-<%= member.id%>-roles-form').submit();" style="margin-right: 10px;">
|
||||
<%= l(:button_change)%>
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="org_member_btn" onclick="$('#org-member-<%= member.id%>-roles-form').hide();$(this).parent().parent().parent().parent().height(18)">
|
||||
<a href="javascript:void(0)" class="org_member_btn" onclick = "$('#org-member-<%= member.id%>-roles-form').hide();$(this).parent().parent().parent().parent().height(18)">
|
||||
<%= l(:button_cancel)%>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -34,8 +34,15 @@
|
|||
<% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%>
|
||||
<a href="javascript:void(0);" style="color: #0781B4;margin-left: 10px;float: left" onclick="$(this).parent().height();$('#org-member-<%= member.id%>-roles-form').show();">编辑</a>
|
||||
<a href="javascript:void(0)" style = "color: #0781B4;margin-left: 10px;float: left" onclick = "ifDeleteOrgMember('<%= member.id %>','<%= username %>')" >删除</a>
|
||||
<%#= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
|
||||
<%#= link_to '删除', Setting.protocol + "://" + Setting.host_name + "/org_member/" + member.id.to_s,:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
<ul class="wlist">
|
||||
<!-- 组织配置页面,成员子页面单独分页 -->
|
||||
<%= pagination_links_full(@obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true){ |text, parameters, options|
|
||||
link_to text, org_member_paging_org_member_index_path( parameters.merge(:flag => true, :org => @organization.id, :format => 'js')), :remote => true
|
||||
} %>
|
||||
</ul>
|
|
@ -24,7 +24,7 @@
|
|||
<% end%>
|
||||
|
||||
<ul class="wlist">
|
||||
<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%>
|
||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true %>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_url_in_org(activity.author_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostDes" >
|
||||
<div class="homepagePostTo break_word">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_url_in_org(activity.author_id), :class => "newsBlue mr15" %>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<% if !@org_name.blank? %>
|
||||
<%if @check == false %>
|
||||
$checkName = false
|
||||
<% if @config_page%>
|
||||
$checkName = false;
|
||||
<% if @config_page %>
|
||||
$("#check_name_hint").html('<span class="c_red">名字不能重复<span>').show();
|
||||
<% else%>
|
||||
$("#organization_name_notice").html('<span class="c_red">名字不能重复<span>').show();
|
||||
|
@ -10,7 +10,7 @@
|
|||
|
||||
<% else %>
|
||||
$checkName = true;
|
||||
<% if @config_page%>
|
||||
<% if @config_page %>
|
||||
$("#check_name_hint").html('<span class="c_green">名字可以使用</span>').show();
|
||||
<% else%>
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
<script>
|
||||
function g(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('orgSetting_'+i).className='orgSettingOp';
|
||||
g('orgContent_'+i).className='undis';}
|
||||
g('orgContent_'+i).className='undis';
|
||||
}
|
||||
g('orgContent_'+n).className='dis ml15 mr15';
|
||||
g('orgSetting_'+n).className='orgSettingOp orgOpActive';}
|
||||
g('orgSetting_'+n).className='orgSettingOp orgOpActive';
|
||||
}
|
||||
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
|
||||
//]]>
|
||||
$checkName = true;
|
||||
|
@ -16,7 +18,7 @@
|
|||
return false ;
|
||||
}
|
||||
$.get(
|
||||
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
|
||||
'<%= check_uniq_organizations_path %>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
|
||||
)
|
||||
}
|
||||
function update_org(id, old_value, input_value){
|
||||
|
@ -94,7 +96,7 @@
|
|||
<!--<input id="allow_set_excellent_teachers" type="checkbox" style="margin-top:5px;" name="organization[allow_teacher]" <%#= @organization.allow_teacher==1 ? 'checked': ''%> class="ml3" />-->
|
||||
<!--</div>-->
|
||||
<!--<%# end %>-->
|
||||
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org('<%=@organization.id %>','<%= @organization.name %>', $('#organization_name'));">保存</a>
|
||||
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick = "update_org('<%=@organization.id %>', '<%= @organization.name %>', $('#organization_name'));">保存</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_2">
|
||||
|
@ -105,16 +107,16 @@
|
|||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div id="org_member_list">
|
||||
<%= render :partial=>"org_member_list",:locals=> {:members=>@organization.org_members} %>
|
||||
<%= render :partial => "org_member_list", :locals => {:members => @members} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fl ml10 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" />
|
||||
<%# if @organization.secdomain_name.nil? %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript "/org_member/org_member_autocomplete?" + {:org=> @organization.id}.to_query }')" %>
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript "/org_member/org_member_autocomplete?" + {:org => @organization.id}.to_query }')" %>
|
||||
<%#= javascript_tag "observeSearchfield('not_org_member_search', null, '#{url_for(:controller => 'organizations', :action => 'org_member_autocomplete', :org=> @organization.id)}')" %>
|
||||
<%# 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 }')" %>
|
||||
|
@ -143,7 +145,7 @@
|
|||
<div class="undis ml15 mr15" id="orgContent_3">
|
||||
<!--新增二级栏目-->
|
||||
<div>
|
||||
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id=> 'add_subfield_form',:remote => true do %>
|
||||
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id => 'add_subfield_form',:remote => true do %>
|
||||
<span class="fontGrey3 fb mb5 mr10" >新增一级栏目</span>
|
||||
<input type="text" id="subfield_name" name="name" placeholder="栏目名称" class="orgAddSearch mb10" />
|
||||
<div class="mb10">
|
||||
|
@ -178,6 +180,7 @@
|
|||
<%= render :partial => 'organizations/subfield_list', :locals => {:subfields => subfield_to_addmin?(@organization)} %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function add_org_subfield(){
|
||||
|
@ -246,3 +249,4 @@
|
|||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<div class="homepagePostTo break_word" style="width:620px">
|
||||
<% if user.try(:realname) == ' ' %>
|
||||
<%= link_to user, user_path(user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -25,3 +25,6 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<div class="homepagePostTo break_word" style="width:620px">
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目新闻", project_news_index_path(activity.project), :class => "newsBlue ml15" %>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="project_r_h">
|
||||
<h2 class="project_h2 fl"><%= @subPage_title%></h2>
|
||||
<h2 class="project_h2 fl"><%= @subPage_title %></h2>
|
||||
<% if is_project_manager?(User.current, @project) %>
|
||||
<span class="fr f14 fontGrey2" style="height: 40px; line-height: 40px; margin-right: 15px;">
|
||||
<%=link_to "成员管理", :controller => 'projects', :action => 'settings', :id => @project.id, :tab => 'members' %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<div class="homepagePostTo break_word" style="width:620px">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<div class="homepagePostTo break_word" style="width:620px">
|
||||
<% if activity.try(:author).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
|
|
|
@ -1,19 +1,25 @@
|
|||
<div class="syllabus_category">
|
||||
<% unless projects.empty? %>
|
||||
<% if @type.to_i == 2 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 },
|
||||
:class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortdownbtn sort_no fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 },
|
||||
:class => "sortdownbtn sort_no fr", :style => "margin-right: 5px;", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "人气", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 }, :class => "sortTxt fr", :remote => true %>
|
||||
<%= link_to "人气", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 2 },
|
||||
:class => "sortTxt fr", :remote => true %>
|
||||
<% if @type.to_i == 1 %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :remote => true %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 },
|
||||
:class => "#{@c_sort.to_i == 1 ? 'sortupbtn' : 'sortdownbtn'} fr", :remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortdownbtn sort_no fr", :remote => true %>
|
||||
<%= link_to "", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 },
|
||||
:class => "sortdownbtn sort_no fr", :remote => true %>
|
||||
<% end %>
|
||||
<%= link_to "时间", {:controller => 'users', :action => 'sort_project_list', :id =>@user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 }, :class => "sortTxt fr", :remote => true %>
|
||||
<%= link_to "时间", {:controller => 'users', :action => 'sort_project_list', :id => @user,:list_type => list_type, :type => @type, :sort => @c_sort, :order => 1 },
|
||||
:class => "sortTxt fr", :remote => true %>
|
||||
<% end %>
|
||||
<span class="grayTxt fl "><%=@user == User.current ? "我" : "他" %><%= list_type == 1 ? "创建" : "参与"%>的项目</span>
|
||||
<span class="grayTxt fl "><%= @user == User.current ? "我" : "他" %><%= list_type == 1 ? "创建" : "参与"%>的项目</span>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="syllabus_courses_box" id="project_li_<%=list_type %>">
|
||||
|
@ -21,7 +27,7 @@
|
|||
<div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
|
||||
<% if list_type == 1 %>
|
||||
<p class="sy_tab_con_p"><%=@user == User.current ? "您" : "他" %>还没有创建项目~~<br />
|
||||
<%= link_to "创建项目", new_project_path(:host=> Setting.host_name), :target => "_blank", :class => "sy_btn_green ml5 mt5" if @user == User.current %>
|
||||
<%= link_to "创建项目", new_project_path(:host => Setting.host_name), :target => "_blank", :class => "sy_btn_green ml5 mt5" if @user == User.current %>
|
||||
</p>
|
||||
<% else %>
|
||||
<p class="sy_tab_con_p"><%=@user == User.current ? "您" : "他" %>还没有加入项目~~<br />
|
||||
|
@ -31,16 +37,18 @@
|
|||
<% else %>
|
||||
<% projects.each_with_index do |project, i| %>
|
||||
<div class="syllabus_courses_list <%= i > 4 ? 'none' : ''%>" style="cursor: default;">
|
||||
<% allow_visit = User.current.member_of?(project) || User.current.admin? || project.is_public == 1 %>
|
||||
<div class="sy_courses_open">
|
||||
<span id="collect_project_icon_<%=project.id %>">
|
||||
<span id="collect_project_icon_<%= project.id %>">
|
||||
<%=render :partial => 'collect_project', :locals => {:project => project} %>
|
||||
</span>
|
||||
<h3><%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :target => '_blank', :class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%></h3>
|
||||
<h3><%= link_to project.name, allow_visit ? project_path(project.id,:host=>Setting.host_name) : 'javascript:void(0)', :target => '_blank',
|
||||
:class => "new_project_title fl",:id => "show_project_#{project.id}", :title => (allow_visit ? "#{project.name}" : "私有项目不可访问") %></h3>
|
||||
<% unless project.is_public? %>
|
||||
<span class="syllabus_class_private fl ml10 mt3 syllabus_class_property">私有</span>
|
||||
<% end %>
|
||||
<% projectUser = User.where("id=?",project.user_id).first %>
|
||||
<%=link_to "<span class='fr grayTxt'>创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}</span>".html_safe, user_path(projectUser) %>
|
||||
<%= link_to "<span class='fr grayTxt'>创建者:#{projectUser.try(:realname) != " " ? projectUser.lastname + projectUser.firstname : projectUser.try(:login)}</span>".html_safe, user_path(projectUser) %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div>
|
||||
|
@ -58,7 +66,8 @@
|
|||
<% end %>
|
||||
<% if count > 5 %>
|
||||
<div class="syllabus_courses_list">
|
||||
<p class="new_projectlist_more"><a id="project_more_<%=list_type %>" href="javascript:void(0);" data-count="<%= count %>" data-init="0" onclick="expand_projects('#project_more_<%=list_type %>', '#project_li_<%=list_type %>', <%=count%>);">共<%=count %>个项目,点击全部展开</a></p>
|
||||
<p class="new_projectlist_more"><a id="project_more_<%=list_type %>" href="javascript:void(0);" data-count="<%= count %>" data-init="0" onclick="expand_projects('#project_more_<%=list_type %>',
|
||||
'#project_li_<%=list_type %>', <%=count%>);">共<%=count %>个项目,点击全部展开</a></p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word">
|
||||
<div class="homepagePostTo break_word" style="width:620px">
|
||||
<%= link_to activity.author.show_name, user_path(activity.author_id), :class => "newsBlue mr15" %>
|
||||
TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<input type="text" id="search_course_input" value="<%= @search %>" name="search" placeholder="输入班级ID或者名称搜索" class="searchResourcePopup" />
|
||||
<script>
|
||||
observeSearchfieldOnInput('search_course_input','<%= search_user_course_user_path(user)%>','<%= send_id %>','<%= send_ids%>','news')
|
||||
observeSearchfieldOnInput('search_course_input', '<%= search_user_course_user_path(user)%>', '<%= send_id %>', '<%= send_ids%>', 'news')
|
||||
</script>
|
||||
<!--<a href="javascript:void(0);" class="searchIconPopup"></a>-->
|
||||
<%= submit_tag '',:class=>'searchIcon2',:onfocus=>"this.blur();",:style=>'border-style:none' %>
|
||||
|
|
|
@ -31,6 +31,6 @@ button:
|
|||
name: "联系我们"
|
||||
key: "FEEDBACK"
|
||||
-
|
||||
type: "click"
|
||||
name: "解除绑定"
|
||||
key: "UNBIND"
|
||||
type: "view"
|
||||
name: "个人资料"
|
||||
url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx8e1ab05163a28e37&redirect_uri=https://www.trustie.net/wechat/user_activities&response_type=code&scope=snsapi_base&state=edit_userinfo#wechat_redirect"
|
||||
|
|
|
@ -116,6 +116,7 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
collection do
|
||||
get 'org_member_autocomplete'
|
||||
get 'org_member_paging'
|
||||
get 'deleteOrgMember'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160905084821) do
|
||||
ActiveRecord::Schema.define(:version => 20160907080621) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -56,8 +56,8 @@ ActiveRecord::Schema.define(:version => 20160905084821) do
|
|||
t.integer "user_id"
|
||||
t.integer "applied_id"
|
||||
t.string "applied_type"
|
||||
t.integer "viewed", :default => 0
|
||||
t.integer "status", :default => 0
|
||||
t.integer "viewed"
|
||||
t.integer "status"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "name"
|
||||
|
@ -173,6 +173,7 @@ ActiveRecord::Schema.define(:version => 20160905084821) do
|
|||
t.integer "quotes"
|
||||
t.integer "is_publish", :default => 1
|
||||
t.date "publish_time"
|
||||
t.boolean "init_file", :default => false
|
||||
end
|
||||
|
||||
add_index "attachments", ["author_id"], :name => "index_attachments_on_author_id"
|
||||
|
@ -318,6 +319,8 @@ ActiveRecord::Schema.define(:version => 20160905084821) do
|
|||
t.date "commit_date"
|
||||
t.string "scmid"
|
||||
t.integer "user_id"
|
||||
t.integer "project_id"
|
||||
t.integer "type", :default => 0
|
||||
end
|
||||
|
||||
add_index "changesets", ["committed_on"], :name => "index_changesets_on_committed_on"
|
||||
|
|
|
@ -550,8 +550,8 @@ function observeSearchfield(fieldId, targetId, url) {
|
|||
dataType: 'jsonp',
|
||||
data: {q: $this.val()},
|
||||
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||
complete: function(){ $this.removeClass('ajax-loading'); }
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); }, // 添加成员加载完成前,显示载入中
|
||||
complete: function(){ $this.removeClass('ajax-loading'); } // 完成后,移除
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
//<2F><><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD><D6AF>Ա<EFBFBD><D4B1><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>
|
||||
// 组织:新增成员
|
||||
function submit_add_org_members(){
|
||||
$("#org_member_add_form").submit();
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ app.controller('EditUserInfoController', ['$scope', 'config','$http', 'auth','$l
|
|||
vm.lastname = vm.user.lastname;
|
||||
vm.mail = vm.user.mail;
|
||||
vm.sex = vm.user.gender;
|
||||
vm.user.img_url = vm.user.img_url +"?t="+Math.random();
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue