Merge branch 'develop' into szzh
This commit is contained in:
commit
4eb113f2c4
|
@ -55,6 +55,7 @@ class IssuesController < ApplicationController
|
|||
helper :timelog
|
||||
include Redmine::Export::PDF
|
||||
helper :project_score
|
||||
include ApplicationHelper
|
||||
|
||||
def index
|
||||
retrieve_query
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
class OrgSubfieldsController < ApplicationController
|
||||
helper :attachments
|
||||
include FilesHelper
|
||||
layout 'base_org'
|
||||
def create
|
||||
if OrgSubfield.where("organization_id=#{params[:organization_id]} and name=?",params[:name]).count == 0
|
||||
|
|
|
@ -311,6 +311,7 @@ class OrganizationsController < ApplicationController
|
|||
|
||||
def agree_apply_subdomain
|
||||
@organization = Organization.find(params[:organization_id])
|
||||
OrgMessage.find(params[:act_id]).update_attribute(:viewed, 1)
|
||||
@organization.update_attribute(:domain, params[:org_domain])
|
||||
if OrgMessage.where("message_type='AgreeApplySubdomain' and organization_id=#{@organization.id} and content=?",params[:org_domain]).count == 0
|
||||
OrgMessage.create(:user_id => params[:user_id], :organization_id => @organization.id, :message_type => 'AgreeApplySubdomain', :message_id => @organization.id, :sender_id => User.current.id, :viewed => 0, :content => params[:org_domain])
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class StudentWorkController < ApplicationController
|
||||
layout "base_courses"
|
||||
include StudentWorkHelper
|
||||
include ApplicationHelper
|
||||
require 'bigdecimal'
|
||||
require "base64"
|
||||
before_filter :find_homework, :only => [:new, :index, :create, :student_work_absence_penalty, :absence_penalty_list, :evaluation_list, :program_test,:set_score_rule,:forbidden_anonymous_comment,:delete_work,:new_student_work_project,:student_work_project,:cancel_relate_project,:search_course_students]
|
||||
|
|
|
@ -643,7 +643,7 @@ class Attachment < ActiveRecord::Base
|
|||
|
||||
def decrease_attchments_count
|
||||
if self.container_type == "Project" && !self.project.project_score.nil?
|
||||
aatach_count = self.container.project_score.attach_num - 1+
|
||||
aatach_count = self.container.project_score.attach_num - 1
|
||||
self.container.project_score.update_attribute(:attach_num, aatach_count)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,8 +6,8 @@ $("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@atta
|
|||
:remote => true, :class => "postOptionLink", :method => :post) %>");
|
||||
|
||||
<% else %>
|
||||
$("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@attachment.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>@attachment.id,:newtype=>(@attachment.is_public? ? 0:1)),
|
||||
:remote=>true,:class=>"f_l re_open",:method => :post) %>");
|
||||
$("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@attachment.is_public? ? "设为私有":"设为公开"), update_file_dense_attachments_path(:attachmentid=>@attachment.id,:newtype=>(@attachment.is_public? ? 0:1)),
|
||||
:remote=>true,:class=>"postOptionLink",:method => :post) %>");
|
||||
<% end %>
|
||||
<% if @attachment.is_public? %>
|
||||
$("#image_private_<%= @attachment.id%>").html('')
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<% else %>
|
||||
<% if @course.is_public? %>
|
||||
$("#set_course_public_<%= @course.id %>").text("设为私有");
|
||||
$("#show_course_<%= @course.id %>").attr("title","公开课程:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
||||
<% else %>
|
||||
$("#set_course_public_<%= @course.id %>").text("设为公开");
|
||||
$("#show_course_<%= @course.id %>").attr("title","私有课程:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -1,31 +1,31 @@
|
|||
<% courses.each do |course|%>
|
||||
<%# pro = Project.find course.course_id %>
|
||||
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
|
||||
<%= link_to course.name, course_path(course.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => course.name%>
|
||||
<!--<div class="homepagePostSetting mt5 mr10">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="menuSetting">-->
|
||||
<!--<ul class="homepagePostSettiongText boxShadow">-->
|
||||
<!--<li><%#= link_to "发布作业", homework_common_index_path(:course => course.id,:is_new => 1), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "发布通知", new_course_news_path(course), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "上传资源",upload_files_menu_path(:course_id => course.id), :remote => true, :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "发布新帖",course_boards_path( course, :flag => true, :is_new => 1), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# if ShieldActivity.where("container_type='Organization' and container_id=#{org_id} and shield_type='Course' and shield_id=#{course.id}").count == 0 %>-->
|
||||
<!--<%#= link_to "屏蔽动态", shield_activities_path(:org_id => org_id, :course_id => course.id), :method => 'post',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# else %>-->
|
||||
<!--<#%= link_to "显示动态", show_acts_shield_activities_path(:org_id => org_id, :course_id => course.id), :method => 'delete',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% if courses.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="show_more_org_course">
|
||||
<input type="hidden" value="<%= page%>" id="org_course_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_course('<%= more_org_courses_organization_path(org_id)%>');"></a>
|
||||
</li>
|
||||
<% courses.each do |course|%>
|
||||
<%# pro = Project.find course.course_id %>
|
||||
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
|
||||
<%= link_to course.name, course_path(course.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => course.name%>
|
||||
<!--<div class="homepagePostSetting mt5 mr10">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="menuSetting">-->
|
||||
<!--<ul class="homepagePostSettiongText boxShadow">-->
|
||||
<!--<li><%#= link_to "发布作业", homework_common_index_path(:course => course.id,:is_new => 1), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "发布通知", new_course_news_path(course), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "上传资源",upload_files_menu_path(:course_id => course.id), :remote => true, :class => 'postOptionLink' %></li>-->
|
||||
<!--<li><%#= link_to "发布新帖",course_boards_path( course, :flag => true, :is_new => 1), :class => 'postOptionLink' %></li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# if ShieldActivity.where("container_type='Organization' and container_id=#{org_id} and shield_type='Course' and shield_id=#{course.id}").count == 0 %>-->
|
||||
<!--<%#= link_to "屏蔽动态", shield_activities_path(:org_id => org_id, :course_id => course.id), :method => 'post',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# else %>-->
|
||||
<!--<#%= link_to "显示动态", show_acts_shield_activities_path(:org_id => org_id, :course_id => course.id), :method => 'delete',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% if courses.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="show_more_org_course">
|
||||
<input type="hidden" value="<%= page%>" id="org_course_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_course('<%= more_org_courses_organization_path(org_id)%>');"></a>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,30 +1,30 @@
|
|||
<% projects.each do |project|%>
|
||||
<%# pro = Project.find project.project_id %>
|
||||
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%>
|
||||
<!--<div class="homepagePostSetting mt5 mr10">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="menuSetting">-->
|
||||
<!--<ul class="homepagePostSettiongText boxShadow">-->
|
||||
<!--<li><%#=link_to "发布问题", new_project_issue_path(project), :class => 'postOptionLink', :target => '_blank' %></li>-->
|
||||
<!--<li><%#=link_to "发布新帖",project_boards_path(project, :flag => true), :class => 'postOptionLink',:target => '_blank' %></li>-->
|
||||
<!--<li><%#= link_to "上传资源",upload_files_menu_path(:project_id => project.id), :remote => true, :class => 'postOptionLink' %></li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# if ShieldActivity.where("container_type='Organization' and container_id=#{org_id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>-->
|
||||
<!--<#%= link_to "屏蔽动态", shield_activities_path(:org_id => org_id, :project_id => project.id), :method => 'post',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# else %>-->
|
||||
<!--<%#= link_to "显示动态", show_acts_shield_activities_path(:org_id => org_id, :project_id => project.id),:method => 'delete',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% if projects.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="show_more_org_project">
|
||||
<input type="hidden" value="<%= page%>" id="org_project_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%= more_org_projects_organization_path(org_id)%>');"></a>
|
||||
</li>
|
||||
<% projects.each do |project|%>
|
||||
<%# pro = Project.find project.project_id %>
|
||||
<li class="homepageLeftMenuCoursesLine" style="position:relative;">
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => project.name%>
|
||||
<!--<div class="homepagePostSetting mt5 mr10">-->
|
||||
<!--<ul>-->
|
||||
<!--<li class="menuSetting">-->
|
||||
<!--<ul class="homepagePostSettiongText boxShadow">-->
|
||||
<!--<li><%#=link_to "发布问题", new_project_issue_path(project), :class => 'postOptionLink', :target => '_blank' %></li>-->
|
||||
<!--<li><%#=link_to "发布新帖",project_boards_path(project, :flag => true), :class => 'postOptionLink',:target => '_blank' %></li>-->
|
||||
<!--<li><%#= link_to "上传资源",upload_files_menu_path(:project_id => project.id), :remote => true, :class => 'postOptionLink' %></li>-->
|
||||
<!--<li>-->
|
||||
<!--<%# if ShieldActivity.where("container_type='Organization' and container_id=#{org_id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>-->
|
||||
<!--<#%= link_to "屏蔽动态", shield_activities_path(:org_id => org_id, :project_id => project.id), :method => 'post',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# else %>-->
|
||||
<!--<%#= link_to "显示动态", show_acts_shield_activities_path(:org_id => org_id, :project_id => project.id),:method => 'delete',:class => 'postOptionLink',:remote => true %>-->
|
||||
<!--<%# end %>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</li>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</li>
|
||||
<% end %>
|
||||
<% if projects.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="show_more_org_project">
|
||||
<input type="hidden" value="<%= page%>" id="org_project_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_org_project('<%= more_org_projects_organization_path(org_id)%>');"></a>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,75 +1,75 @@
|
|||
<% courses.each do |course|%>
|
||||
<li class="homepageLeftMenuCoursesLine pr">
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
|
||||
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
|
||||
:title => (course.is_public? ? "公开课程:":"私有课程:")+course.name+"("+course.time.to_s+course.term+")"%>
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %>
|
||||
<ul class="<%= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
<li>
|
||||
<ul class="subNavMenu boxShadow">
|
||||
<% if is_teacher %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :class => 'fl fontGrey2 w48', :target => '_blank' %>
|
||||
<%= link_to '+',homework_common_index_path(:course => course.id,:is_new => 1), :class => 'fr fb', :title => '发布作业',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+", new_course_news_path(course,:is_new=>1), :class => 'fr fb', :title => '发布通知',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if is_teacher || (course.publish_resource == 1 && User.current.member_of_course?(course)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",upload_files_menu_path(:course_id => course.id), :class => 'fr fb',:remote => true, :title => '上传资源' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "论坛",course_boards_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",course_boards_path(course, :flag => true, :is_new => 1), :class => 'fr fb', :title => '发布帖子',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if User.current == @user %>
|
||||
<li class="subNavRow">
|
||||
<% if count == 0 %>
|
||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post',:remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "显示动态", show_acts_shield_activities_path(:user_id => user.id, :course_id => course.id),:remote => true,:method => 'delete' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => course,:user_page => true},
|
||||
:id => "set_course_public_#{course.id.to_s}",:remote=>true,:confirm=>"您确定要设置为"+(course.is_public == 0 ? "公开" : "私有")+"吗"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if courses.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="user_show_more_course">
|
||||
<input type="hidden" value="<%= page%>" id="course_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= user_courses4show_user_path(user.id)%>');"></a>
|
||||
</li>
|
||||
<% courses.each do |course|%>
|
||||
<li class="homepageLeftMenuCoursesLine pr">
|
||||
<% is_teacher = User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
|
||||
<%= link_to course.name, course_path(course.id,:host=>Setting.host_course), :class => "coursesLineGrey hidden #{course_endTime_timeout?(course) ? 'c_dark_grey' : ''}",
|
||||
:id => "show_course_#{course.id}",:title => (course.is_public? ? "公开课程:":"私有课程:")+course.name+"("+course.time.to_s+course.term+")"%>
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Course' and shield_id=#{course.id}").count %>
|
||||
<ul class="<%= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
<li>
|
||||
<ul class="subNavMenu boxShadow">
|
||||
<% if is_teacher %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :class => 'fl fontGrey2 w48', :target => '_blank' %>
|
||||
<%= link_to '+',homework_common_index_path(:course => course.id,:is_new => 1), :class => 'fr fb', :title => '发布作业',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+", new_course_news_path(course,:is_new=>1), :class => 'fr fb', :title => '发布通知',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "作业",homework_common_index_path(:course => course.id), :target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "通知", course_news_index_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if is_teacher || (course.publish_resource == 1 && User.current.member_of_course?(course)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",upload_files_menu_path(:course_id => course.id), :class => 'fr fb',:remote => true, :title => '上传资源' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "资源",course_files_path(course),:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to "论坛",course_boards_path(course), :class => 'fl w48',:target => '_blank' %>
|
||||
<%= link_to "+",course_boards_path(course, :flag => true, :is_new => 1), :class => 'fr fb', :title => '发布帖子',:target => '_blank' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if User.current == @user %>
|
||||
<li class="subNavRow">
|
||||
<% if count == 0 %>
|
||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :course_id => course.id), :method => 'post',:remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "显示动态", show_acts_shield_activities_path(:user_id => user.id, :course_id => course.id),:remote => true,:method => 'delete' %>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current.logged? && (User.current.admin? || User.current.allowed_to?(:as_teacher,course)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to course.is_public == 0 ? "设为公开" : "设为私有", {:controller => 'courses', :action => 'private_or_public', :id => course,:user_page => true},
|
||||
:id => "set_course_public_#{course.id.to_s}",:remote=>true,:confirm=>"您确定要设置为"+(course.is_public == 0 ? "公开" : "私有")+"吗"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<% if courses.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="user_show_more_course">
|
||||
<input type="hidden" value="<%= page%>" id="course_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_course('<%= user_courses4show_user_path(user.id)%>');"></a>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,56 +1,56 @@
|
|||
<% projects.each do |project|%>
|
||||
<li class="homepageLeftMenuCoursesLine pr">
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count %>
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
||||
<ul class="<%= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
<li>
|
||||
<ul class="subNavMenu boxShadow">
|
||||
<li class="subNavRow">
|
||||
<%=link_to "问题跟踪", project_issues_path(project), :class => 'fl fontGrey2', :target => '_blank',:style => "width:48px;" %>
|
||||
<%=link_to "+", new_project_issue_path(project), :class => 'fr fb', :target => '_blank',:style => "width:48px;", :title => '发布问题',:style =>'width:10px;' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "资源", project_files_path(project),:class => 'fl fontGrey2 w48' %>
|
||||
<%=link_to "+", upload_files_menu_path(:project_id => project.id),:remote => true,:class => 'fr fb',:title => '上传资源'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "论坛", project_boards_path(project),:class => 'fl fontGrey2 w48', :target => '_blank'%>
|
||||
<%=link_to "+", project_boards_path(project, :flag => true),:class => 'fr fb', :target => '_blank',:title => '发布帖子'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, project)) && rep_is_gitlab?(project) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to '版本库', url_for(:controller => 'projects', :action => 'settings', :id => project.id, :tab=>'repositories') , :target => '_blank',:class => "fl w48",:title => '版本库' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current == @user %>
|
||||
<li class="subNavRow">
|
||||
<% if ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>
|
||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :project_id => project.id), :method => 'post',:remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "显示动态", show_acts_shield_activities_path(:user_id => user.id, :project_id => project.id),:method => 'delete',:remote => true %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current.logged? && (User.current.admin? || is_project_manager?(User.current,project)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to project.is_public? ? "设为私有" : "设为公开", {:controller => 'projects', :action => 'set_public_or_private', :id => project.id,:user_page => true},
|
||||
:id => 'set_project_public_'+ project.id.to_s,:method => 'post',:remote=>true,:confirm=>"您确定要设置为"+(project.is_public? ? "私有" : "公开")+"吗"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if projects.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="user_show_more_project">
|
||||
<input type="hidden" value="<%= page%>" id="project_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_project('<%= user_projects4show_user_path(user.id)%>');"></a>
|
||||
</li>
|
||||
<% projects.each do |project|%>
|
||||
<li class="homepageLeftMenuCoursesLine pr">
|
||||
<% count = ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count %>
|
||||
<%= link_to project.name, project_path(project.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => (project.is_public? ? "公开项目:":"私有项目:") + project.name%>
|
||||
<ul class="<%= count > 0 ? 'shild shildP':'subNavArrow'%>">
|
||||
<li>
|
||||
<ul class="subNavMenu boxShadow">
|
||||
<li class="subNavRow">
|
||||
<%=link_to "问题跟踪", project_issues_path(project), :class => 'fl fontGrey2', :target => '_blank',:style => "width:48px;" %>
|
||||
<%=link_to "+", new_project_issue_path(project), :class => 'fr fb', :target => '_blank',:style => "width:48px;", :title => '发布问题',:style =>'width:10px;' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "资源", project_files_path(project),:class => 'fl fontGrey2 w48' %>
|
||||
<%=link_to "+", upload_files_menu_path(:project_id => project.id),:remote => true,:class => 'fr fb',:title => '上传资源'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li class="subNavRow">
|
||||
<%=link_to "论坛", project_boards_path(project),:class => 'fl fontGrey2 w48', :target => '_blank'%>
|
||||
<%=link_to "+", project_boards_path(project, :flag => true),:class => 'fr fb', :target => '_blank',:title => '发布帖子'%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, project)) && rep_is_gitlab?(project) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to '版本库', url_for(:controller => 'projects', :action => 'settings', :id => project.id, :tab=>'repositories') , :target => '_blank',:class => "fl w48",:title => '版本库' %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current == @user %>
|
||||
<li class="subNavRow">
|
||||
<% if ShieldActivity.where("container_type='User' and container_id=#{user.id} and shield_type='Project' and shield_id=#{project.id}").count == 0 %>
|
||||
<%= link_to "屏蔽动态", shield_activities_path(:user_id => user.id, :project_id => project.id), :method => 'post',:remote => true %>
|
||||
<% else %>
|
||||
<%= link_to "显示动态", show_acts_shield_activities_path(:user_id => user.id, :project_id => project.id),:method => 'delete',:remote => true %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if User.current.logged? && (User.current.admin? || is_project_manager?(User.current,project)) %>
|
||||
<li class="subNavRow">
|
||||
<%= link_to project.is_public? ? "设为私有" : "设为公开", {:controller => 'projects', :action => 'set_public_or_private', :id => project.id,:user_page => true},
|
||||
:id => 'set_project_public_'+ project.id.to_s,:method => 'post',:remote=>true,:confirm=>"您确定要设置为"+(project.is_public? ? "私有" : "公开")+"吗"%>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if projects.size == 5%>
|
||||
<li class="homepageLeftMenuMore" id="user_show_more_project">
|
||||
<input type="hidden" value="<%= page%>" id="project_page_num">
|
||||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="show_more_project('<%= user_projects4show_user_path(user.id)%>');"></a>
|
||||
</li>
|
||||
<% end%>
|
|
@ -1,297 +1,297 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><%= h html_title %></title>
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'share','new_user', 'user_leftside','prettify','users',:media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<!-- MathJax的配置 -->
|
||||
<script type="text/javascript"
|
||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
|
||||
showMathMenu: false,
|
||||
showMathMenuMSIE: false,
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
$(this).children(".userCard").css("display","none");
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
$(this).css("display","none");
|
||||
})
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
});
|
||||
|
||||
//侧导航栏配置设置
|
||||
$(".homepageLeftMenuCoursesLine").mouseover(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".homepageLeftMenuCoursesLine").mouseout(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat");
|
||||
$(this).children().css("color","#808080");
|
||||
});
|
||||
$(".subNavRow").mouseover(function(){
|
||||
$(this).css("background-color","#269ac9");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".subNavRow").mouseout(function(){
|
||||
$(this).css("background-color","#ffffff");
|
||||
$(this).children().css("color","#888888");
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<!--div class="homepageRightBannerImg"></div-->
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContent">
|
||||
<div class="homepageLeft" id="LSide">
|
||||
<div class="homepagePortraitContainer">
|
||||
<div class="homepagePortraitImage fl" id="homepage_portrait_image">
|
||||
<%= image_tag(url_to_avatar(@user),width:"78", height: "78", :id=>'nh_user_tx') %>
|
||||
<% if User.current.logged?%>
|
||||
<% if is_current_user%>
|
||||
<div id="edit_user_file_btn" class="none">
|
||||
<div class="homepageEditProfile">
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="fl ml10">
|
||||
<p class="homepageImageName hidden db mb5" style="margin-left:0px;margin-right:0px;">
|
||||
<%= @user.realname.blank? ? @user.login : @user.realname %>
|
||||
</p>
|
||||
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||
<span class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<p class="mb8 c_dark f14">
|
||||
<%= get_user_roll @user %>
|
||||
</p>
|
||||
<% end%>
|
||||
<div id="watch_user_btn_div">
|
||||
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepageSignature break_word">
|
||||
<p id="user_brief_introduction_show">
|
||||
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
|
||||
</p>
|
||||
</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>
|
||||
</div>
|
||||
<div>
|
||||
<div class="homepageImageBlock">
|
||||
<div>
|
||||
<%= link_to(@user.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count,
|
||||
{:controller => 'blogs', :action => 'index', :user_id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
|
||||
<%= link_to('博客',
|
||||
{:controller => 'blogs', :action => 'index', :user_id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageVerDiv"></div>
|
||||
<div class="homepageImageBlock">
|
||||
<div id="watch_user_number_div">
|
||||
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
<%= link_to '关注', {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageVerDiv"></div>
|
||||
<div class="homepageImageBlock">
|
||||
<div id="fans_user_number_div">
|
||||
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
|
||||
<%= link_to '粉丝', {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageLeftMenuContainer">
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
|
||||
<% if is_current_user%>
|
||||
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||
<div class="courseMenu" id="courseMenu">
|
||||
<ul>
|
||||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||
<ul class="topnav_course_menu" id="topnav_course_menu">
|
||||
<li>
|
||||
<%= link_to "新建课程", new_course_path(:host=> Setting.host_course), :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "加入课程",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else%>
|
||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入课程"%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
</div>
|
||||
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5) %>
|
||||
<div class="homepageLeftMenuCourses <%= courses.empty? ? 'none' : ''%>" id="homepageLeftMenuCourses">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuForge').slideToggle();">项目</a>
|
||||
|
||||
<% if is_current_user%>
|
||||
<%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :style => "margin-right:10px;", :title => "新建项目"%>
|
||||
<% end%>
|
||||
</div>
|
||||
<% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%>
|
||||
<div class="homepageLeftMenuCourses <%= projects.empty? ? 'none' : ''%>" id="homepageLeftMenuForge">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<!--<a href="javascript:void(0);" class="homepageMenuText">留言</a>-->
|
||||
<%= link_to '留言',feedback_path(@user, :host=> Setting.host_user),:class=>'homepageMenuText'%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageLeftLabelContainer">
|
||||
<div class="project_Label_New">
|
||||
<span class="homepageLabelText">标签</span>
|
||||
<div class="tag_h ml10" >
|
||||
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<div>
|
||||
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="pro_new">
|
||||
<h3 class="box_h3 mb10">头像设置</h3>
|
||||
<div class="uppicBox">
|
||||
<input type="button" class="uppic_btn" onclick="$('#upload_user_image').click();" value="浏览.."/>
|
||||
<%= file_field_tag 'avatar[image]',
|
||||
:id => "upload_user_image",
|
||||
:style => 'display:none;',#added by young
|
||||
:size => "1",
|
||||
:multiple => false,
|
||||
:onchange => 'addInputAvatar(this);',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:file_type => Redmine::Configuration['pic_types'].to_s,
|
||||
:type_support_message => l(:error_pic_type),
|
||||
:upload_path => upload_avatar_path(:format => 'js'),
|
||||
:description_placeholder => nil ,# l(:label_optional_description)
|
||||
:source_type => @user.class.to_s,
|
||||
:source_id => @user.id.to_s
|
||||
} %>
|
||||
<!--<br/>-->
|
||||
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
|
||||
</div>
|
||||
<div class="showpicBox">
|
||||
<p>预览</p>
|
||||
<%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
|
||||
<span >96px*96px</span> <br />
|
||||
<div class="mb20"></div>
|
||||
<%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
|
||||
<br />
|
||||
<span>48px*48px</span> <br />
|
||||
</div>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="javascript:hideModal();" class=" fr grey_btn mr15 f14"> 取 消</a>
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar') %>" data-remote="true" class="blue_btn fr mr10 f14">确 定</a>
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
||||
</div><!--floatbox end-->
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
$("#topnav_course_menu").show();
|
||||
});
|
||||
$("#courseMenu").mouseleave(function(){
|
||||
$("#topnav_course_menu").hide();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title><%= h html_title %></title>
|
||||
<meta name="description" content="<%= Redmine::Info.app_name %>" />
|
||||
<meta name="keywords" content="issue,bug,tracker" />
|
||||
<%= csrf_meta_tag %>
|
||||
<%= favicon %>
|
||||
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'share','new_user', 'user_leftside','prettify','users',:media => 'all' %>
|
||||
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
|
||||
<%= javascript_heads %>
|
||||
<%= javascript_include_tag "bootstrap","avatars","new_user",'attachments','prettify'%>
|
||||
<%= heads_for_theme %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<!-- MathJax的配置 -->
|
||||
<script type="text/javascript"
|
||||
src="/javascripts/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
<!-- 配置 : 在生成的公式图片上去掉Math定义的右键菜单,$$ $$ \( \) \[ \] 中的公式给予显示-->
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
|
||||
showMathMenu: false,
|
||||
showMathMenuMSIE: false,
|
||||
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
$(this).children(".userCard").css("display","none");
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
$(this).css("display","none");
|
||||
})
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
});
|
||||
|
||||
//侧导航栏配置设置
|
||||
$(".homepageLeftMenuCoursesLine").mouseover(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -82px -399px no-repeat");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".homepageLeftMenuCoursesLine").mouseout(function(){
|
||||
$(this).children(".shild").css("background","url(/images/hwork_icon.png) -6px -354px no-repeat");
|
||||
$(this).children().css("color","#808080");
|
||||
});
|
||||
$(".subNavRow").mouseover(function(){
|
||||
$(this).css("background-color","#269ac9");
|
||||
$(this).children().css("color","#ffffff");
|
||||
});
|
||||
$(".subNavRow").mouseout(function(){
|
||||
$(this).css("background-color","#ffffff");
|
||||
$(this).children().css("color","#888888");
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="prettyPrint();">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
<%= render :partial => 'layouts/logined_header' %>
|
||||
<% else%>
|
||||
<%= render :partial => 'layouts/unlogin_header' %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContentContainer">
|
||||
<!--div class="homepageRightBannerImg"></div-->
|
||||
<div class="cl"></div>
|
||||
<div class="homepageContent">
|
||||
<div class="homepageLeft" id="LSide">
|
||||
<div class="homepagePortraitContainer">
|
||||
<div class="homepagePortraitImage fl" id="homepage_portrait_image">
|
||||
<%= image_tag(url_to_avatar(@user),width:"78", height: "78", :id=>'nh_user_tx') %>
|
||||
<% if User.current.logged?%>
|
||||
<% if is_current_user%>
|
||||
<div id="edit_user_file_btn" class="none">
|
||||
<div class="homepageEditProfile">
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'clear_user_avatar_temp') %>" data-remote="true" class="homepageEditProfileIcon"></a>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="fl ml10">
|
||||
<p class="homepageImageName hidden db mb5" style="margin-left:0px;margin-right:0px;">
|
||||
<%= @user.realname.blank? ? @user.login : @user.realname %>
|
||||
</p>
|
||||
<% if (@user.user_extensions && (@user.user_extensions.identity != 2) ) %>
|
||||
<span class="<%= @user.user_extensions.gender == 1 ? 'homepageImageSexWomen' : 'homepageImageSexMan' %> "></span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if @user.user_extensions && @user.user_extensions.identity %>
|
||||
<p class="mb8 c_dark f14">
|
||||
<%= get_user_roll @user %>
|
||||
</p>
|
||||
<% end%>
|
||||
<div id="watch_user_btn_div">
|
||||
<%= render :partial => 'layouts/user_watch_btn', :locals => {:target => @user} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepageSignature break_word">
|
||||
<p id="user_brief_introduction_show">
|
||||
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
|
||||
</p>
|
||||
</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>
|
||||
</div>
|
||||
<div>
|
||||
<div class="homepageImageBlock">
|
||||
<div>
|
||||
<%= link_to(@user.blog.blog_comments.where("#{BlogComment.table_name}.parent_id is null").count,
|
||||
{:controller => 'blogs', :action => 'index', :user_id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
|
||||
<%= link_to('博客',
|
||||
{:controller => 'blogs', :action => 'index', :user_id => @user.id }, :class => 'homepageImageNumber',:id => 'user_score') %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageVerDiv"></div>
|
||||
<div class="homepageImageBlock">
|
||||
<div id="watch_user_number_div">
|
||||
<%= link_to User.watched_by(@user.id).count.to_s, {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
<%= link_to '关注', {:controller=>"users", :action=>"user_watchlist",:id=>@user.id},:class=>"homepageImageNumber" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageVerDiv"></div>
|
||||
<div class="homepageImageBlock">
|
||||
<div id="fans_user_number_div">
|
||||
<%= link_to @user.watcher_users.count.to_s, {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
|
||||
</div>
|
||||
<div class="homepageImageText">
|
||||
|
||||
<%= link_to '粉丝', {:controller=>"users", :action=>"user_fanslist",:id=>@user.id},:class=>"homepageImageNumber", :id => "user_fans_number"%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageLeftMenuContainer">
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "动态",user_activities_path(@user.id),:class => "homepageMenuText"%>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuCourses').slideToggle();">课程</a>
|
||||
<% if is_current_user%>
|
||||
<% if User.current.user_extensions && User.current.user_extensions.identity == 0 && User.current.allowed_to?(:add_course, nil, :global => true)%>
|
||||
<div class="courseMenu" id="courseMenu">
|
||||
<ul>
|
||||
<li class="courseMenuIcon fr" style="margin-right:10px;" id="courseMenuIcon">
|
||||
<ul class="topnav_course_menu" id="topnav_course_menu">
|
||||
<li>
|
||||
<%= link_to "新建课程", new_course_path(:host=> Setting.host_course), :class => "menuGrey"%>
|
||||
</li>
|
||||
<!--<li><a href="javascript:void(0);" class="menuGrey">账号设置</a> </li>-->
|
||||
<li>
|
||||
<%= link_to "加入课程",join_private_courses_courses_path,:remote => true,:class => "menuGrey",:method => "post"%>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% else%>
|
||||
<%=link_to "", join_private_courses_courses_path, :class => "homepageMenuSetting fr",:style => "margin-right:10px;", :remote => true, :title => "加入课程"%>
|
||||
<% end%>
|
||||
<% end%>
|
||||
</div>
|
||||
<% courses = @user.courses.visible.where("is_delete =?", 0).select("courses.*,(SELECT MAX(created_at) FROM `course_activities` WHERE course_activities.course_id = courses.id) AS a").order("a desc").limit(5) %>
|
||||
<div class="homepageLeftMenuCourses <%= courses.empty? ? 'none' : ''%>" id="homepageLeftMenuCourses">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_courses', :locals => {:courses => courses,:user => @user, :page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<a href="javascript:void(0);" class="homepageMenuText" onclick="$('#homepageLeftMenuForge').slideToggle();">项目</a>
|
||||
|
||||
<% if is_current_user%>
|
||||
<%=link_to "", new_project_path(:host=> Setting.host_name), :class => "homepageMenuSetting fr", :style => "margin-right:10px;", :title => "新建项目"%>
|
||||
<% end%>
|
||||
</div>
|
||||
<% projects = @user.projects.visible.select("projects.*,(SELECT MAX(created_at) FROM `forge_activities` WHERE forge_activities.project_id = projects.id) AS a").order("a desc").limit(5)%>
|
||||
<div class="homepageLeftMenuCourses <%= projects.empty? ? 'none' : ''%>" id="homepageLeftMenuForge">
|
||||
<ul>
|
||||
<%= render :partial => 'layouts/user_projects', :locals => {:projects => projects,:user => @user, :page => 0} %>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<!--<a href="javascript:void(0);" class="homepageMenuText">留言</a>-->
|
||||
<%= link_to '留言',feedback_path(@user, :host=> Setting.host_user),:class=>'homepageMenuText'%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageLeftLabelContainer">
|
||||
<div class="project_Label_New">
|
||||
<span class="homepageLabelText">标签</span>
|
||||
<div class="tag_h ml10" >
|
||||
<%= render :partial => 'tags/user_tag', :locals => {:obj => @user,:object_flag => "1"}%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
<%= yield %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => 'layouts/new_feedback' %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= render :partial => 'layouts/footer' %>
|
||||
<div class="cl"></div>
|
||||
|
||||
<div id="ajax-modal" style="display:none;"></div>
|
||||
<div id="ajax-indicator" style="display:none;">
|
||||
<span><%= l(:label_loading) %></span>
|
||||
</div>
|
||||
<div id="nh_tx_dialog_html" class="white_content" style="display:none;">
|
||||
<div>
|
||||
<div><a href="javascript:hideModal();" class="box_close"></a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="pro_new">
|
||||
<h3 class="box_h3 mb10">头像设置</h3>
|
||||
<div class="uppicBox">
|
||||
<input type="button" class="uppic_btn" onclick="$('#upload_user_image').click();" value="浏览.."/>
|
||||
<%= file_field_tag 'avatar[image]',
|
||||
:id => "upload_user_image",
|
||||
:style => 'display:none;',#added by young
|
||||
:size => "1",
|
||||
:multiple => false,
|
||||
:onchange => 'addInputAvatar(this);',
|
||||
:data => {
|
||||
:max_file_size => Setting.attachment_max_size.to_i.kilobytes,
|
||||
:max_file_size_message => l(:error_attachment_too_big, :max_size => number_to_human_size(Setting.attachment_max_size.to_i.kilobytes)),
|
||||
:max_concurrent_uploads => Redmine::Configuration['max_concurrent_ajax_uploads'].to_i,
|
||||
:file_type => Redmine::Configuration['pic_types'].to_s,
|
||||
:type_support_message => l(:error_pic_type),
|
||||
:upload_path => upload_avatar_path(:format => 'js'),
|
||||
:description_placeholder => nil ,# l(:label_optional_description)
|
||||
:source_type => @user.class.to_s,
|
||||
:source_id => @user.id.to_s
|
||||
} %>
|
||||
<!--<br/>-->
|
||||
<!--<span>只支持jpg,png,gif,大小不超过5M</span>-->
|
||||
</div>
|
||||
<div class="showpicBox">
|
||||
<p>预览</p>
|
||||
<%= image_tag(url_to_avatar(@user), :style=>"width:96px;height:96px;",:class=>"mb5 mt10",:nhname=>'avatar_image') %>
|
||||
<span >96px*96px</span> <br />
|
||||
<div class="mb20"></div>
|
||||
<%= image_tag(url_to_avatar(@user), :style=>"width:48px;height:48px;",:class=>"mb5",:nhname=>'avatar_image') %>
|
||||
<br />
|
||||
<span>48px*48px</span> <br />
|
||||
</div>
|
||||
<div class="cl mb10"></div>
|
||||
<a href="javascript:hideModal();" class=" fr grey_btn mr15 f14"> 取 消</a>
|
||||
<a href="<%= url_for(:controller => 'my', :action => 'save_user_avatar') %>" data-remote="true" class="blue_btn fr mr10 f14">确 定</a>
|
||||
</div><!--talknew end-->
|
||||
<div class="cl"></div>
|
||||
</div><!--floatbox end-->
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
$("#topnav_course_menu").show();
|
||||
});
|
||||
$("#courseMenu").mouseleave(function(){
|
||||
$("#topnav_course_menu").hide();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,80 +1,80 @@
|
|||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
$(this).children(".userCard").css("display","none");
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
$(this).css("display","none");
|
||||
})
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
})
|
||||
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
||||
$(this).prev().css("color","#ffffff");
|
||||
$(this).css("z-index", "9999");
|
||||
})
|
||||
$(".homepagePostSetting").mouseout(function(){
|
||||
$(this).prev().css("color","#808080");
|
||||
$(this).css("z-index", "1");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<% unless org_activities.nil? %>
|
||||
<% org_activities.each do |act| %>
|
||||
<script>
|
||||
$(function() {
|
||||
init_activity_KindEditor_data(<%= act.id%>, null, "87%", "<%=act.class.to_s%>");
|
||||
});
|
||||
</script>
|
||||
<% if act.container_type == 'Organization' %>
|
||||
<% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %>
|
||||
<%= render :partial => 'organizations/show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'Project' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'Course' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'Message'%>
|
||||
<%= render :partial => 'organizations/org_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'OrgSubfield' %>
|
||||
<% if act.org_act_type == 'Message' and act.org_act_id and Message.where("id=#{act.org_act_id}").count > 0 %>
|
||||
<% message = Message.find(act.org_act_id) %>
|
||||
<% if !message.board.course_id.nil? %>
|
||||
<%= render :partial => 'organizations/org_course_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<% elsif message.board.project_id != -1 %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<% elsif message.board.org_subfield_id %>
|
||||
<%= render :partial => 'organizations/org_subfield_message', :locals => {:activity => message, :user_activity_id => act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if org_act_count == 10 %>
|
||||
<%= link_to "点击展开更多",show_org_subfield_organization_path(:id => @organization.id,:page => @page.to_i + 1,:sub_dir_name => params[:sub_dir_name]),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
||||
<% end%>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#relateProject,.relatePInfo").mouseover(function(){
|
||||
$(".relatePInfo").css("display","block");
|
||||
})
|
||||
$("#relateProject,.relatePInfo").mouseout(function(){
|
||||
$(".relatePInfo").css("display","none");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseover(function(){
|
||||
$(this).children(".userCard").css("display","block");
|
||||
})
|
||||
$(".homepagePostPortrait").mouseout(function(){
|
||||
$(this).children(".userCard").css("display","none");
|
||||
})
|
||||
$(".userCard").mouseover(function(){
|
||||
$(this).css("display","block");
|
||||
})
|
||||
$(".userCard").mouseout(function(){
|
||||
$(this).css("display","none");
|
||||
})
|
||||
$(".coursesLineGrey").mouseover(function(){
|
||||
$(this).css("color","#ffffff");
|
||||
})
|
||||
$(".coursesLineGrey").mouseout(function(){
|
||||
$(this).css("color","#808080");
|
||||
})
|
||||
$(".homepagePostSetting,.coursesLineGrey").mouseover(function(){
|
||||
$(this).prev().css("color","#ffffff");
|
||||
$(this).css("z-index", "9999");
|
||||
})
|
||||
$(".homepagePostSetting").mouseout(function(){
|
||||
$(this).prev().css("color","#808080");
|
||||
$(this).css("z-index", "1");
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<% unless org_activities.nil? %>
|
||||
<% org_activities.each do |act| %>
|
||||
<script>
|
||||
$(function() {
|
||||
init_activity_KindEditor_data(<%= act.id%>, null, "87%", "<%=act.class.to_s%>");
|
||||
});
|
||||
</script>
|
||||
<% if act.container_type == 'Organization' %>
|
||||
<% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %>
|
||||
<%= render :partial => 'organizations/show_org_document', :locals => {:document => act.org_act, :act => act, :flag => 2, :org_subfield_id => params[:org_subfield_id]} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'Project' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'Course' %>
|
||||
<% case act.org_act_type.to_s %>
|
||||
<% when 'Message'%>
|
||||
<%= render :partial => 'organizations/org_course_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'OrgSubfield' %>
|
||||
<% if act.org_act_type == 'Message' and act.org_act_id and Message.where("id=#{act.org_act_id}").count > 0 %>
|
||||
<% message = Message.find(act.org_act_id) %>
|
||||
<% if !message.board.course_id.nil? %>
|
||||
<%= render :partial => 'organizations/org_course_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<% elsif message.board.project_id != -1 %>
|
||||
<%= render :partial => 'organizations/project_message', :locals => {:activity => message,:user_activity_id =>act.id} %>
|
||||
<% elsif message.board.org_subfield_id %>
|
||||
<%= render :partial => 'organizations/org_subfield_message', :locals => {:activity => message, :user_activity_id => act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% if org_act_count == 10 %>
|
||||
<%= link_to "点击展开更多",show_org_subfield_organization_path(:id => @organization.id,:page => @page.to_i + 1,:sub_dir_name => params[:sub_dir_name]),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%>
|
||||
<% end%>
|
||||
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}
|
||||
.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}
|
||||
.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-outline {border: none;}
|
||||
.homepagePostReplyInputContainer .ke-inline-block {display: none;}
|
||||
.homepagePostReplyInputContainer .ke-container {float: left;}
|
||||
</style>
|
||||
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName"><%= @org_subfield.name %></div>
|
||||
</div>
|
||||
|
||||
<% if @org_activities %>
|
||||
<%= render :partial => 'org_subfields/show_details',
|
||||
:locals => {:org_activities => @org_activities,
|
||||
:page=> @page,
|
||||
:org => @organization,
|
||||
:org_act_count=> @org_activities.count} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<style type="text/css">
|
||||
/*回复框*/
|
||||
.homepagePostReplyInputContainer .ke-toolbar {display: none; width: 400px; border: none; background: none; padding: 0px 0px;}
|
||||
.homepagePostReplyInputContainer .ke-toolbar-icon {line-height: 26px; font-size: 14px; padding-left: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-toolbar-icon-url {background-image: url(/images/public_icon.png)}
|
||||
.homepagePostReplyInputContainer .ke-outline {padding: 0px 0px; line-height: 26px; font-size: 14px;}
|
||||
.homepagePostReplyInputContainer .ke-icon-emoticons {background-position: 0px -671px; width: 50px; height: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-icon-emoticons:hover {background-position: -79px -671px; width: 50px; height: 26px;}
|
||||
.homepagePostReplyInputContainer .ke-outline {border: none;}
|
||||
.homepagePostReplyInputContainer .ke-inline-block {display: none;}
|
||||
.homepagePostReplyInputContainer .ke-container {float: left;}
|
||||
</style>
|
||||
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName"><%= @org_subfield.name %></div>
|
||||
</div>
|
||||
|
||||
<% if @org_activities %>
|
||||
<%= render :partial => 'org_subfields/show_details',
|
||||
:locals => {:org_activities => @org_activities,
|
||||
:page=> @page,
|
||||
:org => @organization,
|
||||
:org_act_count=> @org_activities.count} %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<% if @res %>
|
||||
$("#org_subfield_list").html("");
|
||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
|
||||
:locals => {:default_fields => @organization.org_subfields.where("field_type='default'"),
|
||||
:subfields => @organization.org_subfields.where("field_type != 'default'") }) %>");
|
||||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||
$("#subfield_name").val("");
|
||||
<% else %>
|
||||
$("#subfield_name").val("");
|
||||
<% if @res %>
|
||||
$("#org_subfield_list").html("");
|
||||
$("#org_subfield_list").html("<%= escape_javascript(render :partial => 'organizations/subfield_list',
|
||||
:locals => {:default_fields => @organization.org_subfields.where("field_type='default'"),
|
||||
:subfields => @organization.org_subfields.where("field_type != 'default'") }) %>");
|
||||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||
$("#subfield_name").val("");
|
||||
<% else %>
|
||||
$("#subfield_name").val("");
|
||||
<% end %>
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'org_subfields/show_details',
|
||||
:locals => {:org_activities =>@org_activities,
|
||||
:page=>@page,
|
||||
:org => @organization,
|
||||
$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'org_subfields/show_details',
|
||||
:locals => {:org_activities =>@org_activities,
|
||||
:page=>@page,
|
||||
:org => @organization,
|
||||
:org_act_count=>@org_activities.count} )%>");
|
|
@ -1,11 +1,11 @@
|
|||
<% if @exist == false %>
|
||||
$('#sub_dir_show_<%= @org_subfield.id %>').html('<%= @sub_dir.name %>');
|
||||
$('#sub_dir_edit_<%= @org_subfield.id %>').find('input').val('<%= @sub_dir.name %>');
|
||||
// $('#sub_dir_show_<%= @org_subfield.id %>').show();
|
||||
// $('#sub_dir_edit_<%= @org_subfield.id %>').hide();
|
||||
<% else %>
|
||||
$('#sub_dir_edit_<%= @org_subfield.id %>').find('input').val('<%= @org_subfield.subfield_subdomain_dir.nil? ? '': @org_subfield.subfield_subdomain_dir.name %>');
|
||||
// alert("该目录已存在,请重新输入");
|
||||
// $('#sub_dir_edit_<%#= @org_subfield.id %>').find('input').val('<%#= @org_subfield.subfield_subdomain_dir.nil? ? "未设置":@org_subfield.subfield_subdomain_dir.name %>');
|
||||
// $('#sub_dir_edit_<%#= @org_subfield.id %>').focus();
|
||||
<% if @exist == false %>
|
||||
$('#sub_dir_show_<%= @org_subfield.id %>').html('<%= @sub_dir.name %>');
|
||||
$('#sub_dir_edit_<%= @org_subfield.id %>').find('input').val('<%= @sub_dir.name %>');
|
||||
// $('#sub_dir_show_<%= @org_subfield.id %>').show();
|
||||
// $('#sub_dir_edit_<%= @org_subfield.id %>').hide();
|
||||
<% else %>
|
||||
$('#sub_dir_edit_<%= @org_subfield.id %>').find('input').val('<%= @org_subfield.subfield_subdomain_dir.nil? ? '': @org_subfield.subfield_subdomain_dir.name %>');
|
||||
// alert("该目录已存在,请重新输入");
|
||||
// $('#sub_dir_edit_<%#= @org_subfield.id %>').find('input').val('<%#= @org_subfield.subfield_subdomain_dir.nil? ? "未设置":@org_subfield.subfield_subdomain_dir.name %>');
|
||||
// $('#sub_dir_edit_<%#= @org_subfield.id %>').focus();
|
||||
<% end %>
|
|
@ -1,297 +1,297 @@
|
|||
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
</div>
|
||||
<% if activity.homework_detail_manual%>
|
||||
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 3%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>
|
||||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
<% elsif activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 0%>
|
||||
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if activity.homework_type == 3 && !is_teacher && activity.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(activity.course)%>
|
||||
<% projects = cur_user_projects_for_homework activity %>
|
||||
<% works = cur_user_works_for_homework activity %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
||||
<%#= relate_project(activity,is_teacher,-1,user_activity_id,course_activity) %>
|
||||
</div>
|
||||
<% elsif works.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmit">
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||
<%= user_for_homework_common activity,is_teacher %>
|
||||
</div>
|
||||
|
||||
<% if activity.homework_type == 2 && is_teacher%>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_type == 2%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
语言:
|
||||
<%= activity.language_name%>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
分组人数:<%=activity.homework_detail_group.min_num %>-<%=activity.homework_detail_group.max_num %> 人
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 %>
|
||||
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="activity_description_<%= user_activity_id%>">
|
||||
<div id="intro_content_<%= user_activity_id%>">
|
||||
<%= activity.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="homepagePostDeadline">
|
||||
迟交扣分:<%= activity.late_penalty%>分
|
||||
</div>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=user_activity_id %>">
|
||||
匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepagePostDeadline">
|
||||
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
||||
</div>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
||||
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if activity.student_works.count != 0 %>
|
||||
<% sw = activity.student_works.reorder("created_at desc").first %>
|
||||
<div class="mt10 homepagePostDeadline">
|
||||
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if activity.student_works.count != 0 %>
|
||||
<% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
|
||||
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
|
||||
<% unless student_work_scores.empty? %>
|
||||
<% last_score = student_work_scores.first %>
|
||||
<div class="mt5 homepagePostDeadline">
|
||||
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = activity.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr20 fontGrey3">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% projects.each do |pro| %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>_<%=activity.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=activity.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=activity.id %>").css("display","none");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p><%=time_from_now time %> <%= project.commits_count %>提交</p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher%>
|
||||
<% comment_status = activity.homework_detail_manual.comment_status %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity), :class => "postOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => 0),:class => "postOptionLink", :remote => true) %>
|
||||
</li>
|
||||
<% if activity.anonymous_comment == 0 %>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id,:course_activity=>course_activity),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% count=activity.journals_for_messages.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
回复(<%= count %>)
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(description_show_hide(<%=user_activity_id %>));
|
||||
</script>
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||
<div class="resources mt10" id="user_activity_<%= user_activity_id%>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
<% if activity.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to activity.try(:user), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% else %>
|
||||
<%= link_to activity.try(:user).try(:realname), user_path(activity.user_id,:host=>Setting.host_user), :class => "newsBlue mr15" %>
|
||||
<% end %> TO <!--+"(课程名称)" -->
|
||||
<%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostTitle hidden m_w505 fl"> <!--+"(作业名称)"-->
|
||||
<%= link_to activity.name.to_s, student_work_index_path(:homework => activity.id,:host=> Setting.host_course), :class => "postGrey"%>
|
||||
</div>
|
||||
<% if activity.homework_detail_manual%>
|
||||
<% if activity.homework_detail_manual.comment_status == 1%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(activity.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 2%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif activity.homework_detail_manual.comment_status == 3%>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1%>
|
||||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
<% elsif activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 0%>
|
||||
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if activity.homework_type == 3 && !is_teacher && activity.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(activity.course)%>
|
||||
<% projects = cur_user_projects_for_homework activity %>
|
||||
<% works = cur_user_works_for_homework activity %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
||||
<%#= relate_project(activity,is_teacher,-1,user_activity_id,course_activity) %>
|
||||
</div>
|
||||
<% elsif works.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => activity.id,:is_in_course=>-1,:user_activity_id=>user_activity_id,:course_activity=>course_activity), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmit">
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %>
|
||||
<%= user_for_homework_common activity,is_teacher %>
|
||||
</div>
|
||||
|
||||
<% if activity.homework_type == 2 && is_teacher%>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_type == 2%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
语言:
|
||||
<%= activity.language_name%>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
分组人数:<%=activity.homework_detail_group.min_num %>-<%=activity.homework_detail_group.max_num %> 人
|
||||
</div>
|
||||
<% end %>
|
||||
<% if activity.homework_detail_manual && activity.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= activity.end_time.to_s %> 23:59</div>
|
||||
<% elsif activity.homework_detail_manual && activity.homework_detail_manual.comment_status >= 2 %>
|
||||
<div class="homepagePostDeadline">匿评截止时间:<%= activity.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="activity_description_<%= user_activity_id%>">
|
||||
<div id="intro_content_<%= user_activity_id%>">
|
||||
<%= activity.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= user_activity_id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="homepagePostDeadline">
|
||||
迟交扣分:<%= activity.late_penalty%>分
|
||||
</div>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=user_activity_id %>">
|
||||
匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepagePostDeadline">
|
||||
缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
|
||||
</div>
|
||||
<% if activity.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=user_activity_id %>">
|
||||
匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if activity.student_works.count != 0 %>
|
||||
<% sw = activity.student_works.reorder("created_at desc").first %>
|
||||
<div class="mt10 homepagePostDeadline">
|
||||
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if activity.student_works.count != 0 %>
|
||||
<% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
|
||||
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
|
||||
<% unless student_work_scores.empty? %>
|
||||
<% last_score = student_work_scores.first %>
|
||||
<div class="mt5 homepagePostDeadline">
|
||||
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = activity.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr20 fontGrey3">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% projects.each do |pro| %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>_<%=activity.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=activity.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=activity.id %>").css("display","none");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p><%=time_from_now time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher%>
|
||||
<% comment_status = activity.homework_detail_manual.comment_status %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity), :class => "postOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => 0),:class => "postOptionLink", :remote => true) %>
|
||||
</li>
|
||||
<% if activity.anonymous_comment == 0 %>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(activity),:class => "postOptionLink", :remote => true) if activity.homework_detail_manual.comment_status == 1%>
|
||||
</li>
|
||||
<li>
|
||||
<%= homework_anonymous_comment activity,-1,user_activity_id,course_activity %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if activity.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(activity,:user_activity_id => user_activity_id,:course_activity=>course_activity),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% count=activity.journals_for_messages.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
回复(<%= count %>)
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=user_activity_id%>" onclick="expand_reply('#reply_div_<%= user_activity_id %> li','#reply_btn_<%=user_activity_id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= user_activity_id %>">
|
||||
<ul>
|
||||
<% activity.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= user_activity_id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'course_activity',params[:course_activity],:value =>course_activity %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(description_show_hide(<%=user_activity_id %>));
|
||||
</script>
|
||||
|
|
|
@ -1,103 +1,105 @@
|
|||
<ul class="orgListRow">
|
||||
<li class="orgListUser fb">已有栏目</li>
|
||||
<li class="orgListStatus fb">状态</li>
|
||||
<li class="orgListStatus fb">类型</li>
|
||||
<li class="orgListUser fb">域名目录</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
||||
<% default_fields.each do |field| %>
|
||||
<% name = get_default_name(field) %>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser"><%= name %></li>
|
||||
<li class="orgListStatus">默认</li>
|
||||
<li class="orgListStatus">默认</li>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% subfields.each do |field| %>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser">
|
||||
<div id="subfield_show_<%= field.id %>"><%= field.name %></div>
|
||||
<div id="subfield_edit_<%= field.id %>" style="display:none;">
|
||||
<input type="text" name="name" onblur="update_subfield('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.name %>" style="width:70px;"/>
|
||||
</div>
|
||||
</li>
|
||||
<li class="orgListStatus">新增</li>
|
||||
<li class="orgListStatus"><%= field.field_type == "Post" ? "帖子" : "资源" %></li>
|
||||
<li class="orgListUser hidden">
|
||||
<div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');"><%= field.subfield_subdomain_dir.nil? ? '未设置': field.subfield_subdomain_dir.name %></div>
|
||||
<div id="sub_dir_edit_<%= field.id %>" style="display:none;">
|
||||
<input type="text" name="name" onblur="update_sub_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.subfield_subdomain_dir.nil? ? '': field.subfield_subdomain_dir.name %>" style="width:70px;"/>
|
||||
</div>
|
||||
</li>
|
||||
<%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
|
||||
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr10" %>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function edit(show_id, edit_id) {
|
||||
$(show_id).toggle();
|
||||
$(edit_id).toggle();
|
||||
$(edit_id).find('input').focus();
|
||||
$(edit_id).find('input').on('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
this.blur();
|
||||
}
|
||||
})
|
||||
}
|
||||
function update_subfield(show_id, edit_id, field_id, input_value) {
|
||||
if ($(show_id).html().trim() != input_value.trim()) {
|
||||
if (confirm('确定修改为' + input_value + "?"))
|
||||
$.ajax({
|
||||
url: "/org_subfields/" + field_id + "?name=" + input_value,
|
||||
type: 'put'
|
||||
});
|
||||
}
|
||||
$(show_id).show();
|
||||
$(edit_id).hide();
|
||||
// $(edit_id).focus();
|
||||
}
|
||||
|
||||
function edit_dir(show_id, edit_id){
|
||||
$(show_id).toggle();
|
||||
$(edit_id).toggle();
|
||||
$(edit_id).find('input').focus();
|
||||
$(edit_id).find('input').on('keypress', function(e){
|
||||
if (e.keyCode == 13){
|
||||
this.blur();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function update_sub_dir(show_id, edit_id, field_id, input_value) {
|
||||
if ($(show_id).html().trim() != input_value.trim() && input_value.trim() != '') {
|
||||
if (confirm('确定修改为' + input_value + "?"))
|
||||
$.ajax({
|
||||
url: "/org_subfields/" + field_id + "/update_sub_dir?sub_dir_name=" + input_value,
|
||||
type: 'put'
|
||||
});
|
||||
}
|
||||
$(show_id).show();
|
||||
$(edit_id).hide();
|
||||
}
|
||||
function hide(content, id){
|
||||
if (content.text() == '设为隐藏')
|
||||
$.ajax({
|
||||
url: "/organizations/hide_org_subfield?org_subfield_id=" + id,
|
||||
type: "post"
|
||||
});
|
||||
else
|
||||
$.ajax({
|
||||
url: "/organizations/show_org_subfield?org_subfield_id=" + id,
|
||||
type: "post"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser fb">已有栏目</li>
|
||||
<li class="orgListStatus fb">状态</li>
|
||||
<li class="orgListStatus fb">类型</li>
|
||||
<li class="orgListUser fb">域名目录</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
||||
<% default_fields.each do |field| %>
|
||||
<% name = get_default_name(field) %>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser"><%= name %></li>
|
||||
<li class="orgListStatus">默认</li>
|
||||
<li class="orgListStatus">默认</li>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% subfields.each do |field| %>
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser">
|
||||
<div id="subfield_show_<%= field.id %>"><%= field.name %></div>
|
||||
<div id="subfield_edit_<%= field.id %>" style="display:none;">
|
||||
<input type="text" name="name" onblur="update_subfield('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.name %>" style="width:70px;"/>
|
||||
</div>
|
||||
</li>
|
||||
<li class="orgListStatus">新增</li>
|
||||
<li class="orgListStatus"><%= field.field_type == "Post" ? "帖子" : "资源" %></li>
|
||||
<li class="orgListUser hidden">
|
||||
<div id="sub_dir_show_<%= field.id %>" ondblclick="edit_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>');" style="cursor:pointer;background-color:#fffce6;color: #0d90c3;" title="双击可编辑">
|
||||
<%= field.subfield_subdomain_dir.nil? ? '未设置': field.subfield_subdomain_dir.name %>
|
||||
</div>
|
||||
<div id="sub_dir_edit_<%= field.id %>" style="display:none;">
|
||||
<input type="text" name="name" onblur="update_sub_dir('#sub_dir_show_<%= field.id %>','#sub_dir_edit_<%= field.id %>','<%= field.id %>',$(this).val());" value="<%= field.subfield_subdomain_dir.nil? ? '': field.subfield_subdomain_dir.name %>" style="width:70px;"/>
|
||||
</div>
|
||||
</li>
|
||||
<%#= link_to "隐藏", hide_org_subfield_organizations_path(field), :method => 'post', :remote => true, :id => "hide_#{field.id}", :class => "linkBlue fr mr5" %>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"设为隐藏":"设为可见" %></a>
|
||||
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkBlue fr mr10" %>
|
||||
<a href="javascript:void(0);" class="linkBlue fr mr10" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
||||
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
function edit(show_id, edit_id) {
|
||||
$(show_id).toggle();
|
||||
$(edit_id).toggle();
|
||||
$(edit_id).find('input').focus();
|
||||
$(edit_id).find('input').on('keypress', function (e) {
|
||||
if (e.keyCode == 13) {
|
||||
this.blur();
|
||||
}
|
||||
})
|
||||
}
|
||||
function update_subfield(show_id, edit_id, field_id, input_value) {
|
||||
if ($(show_id).html().trim() != input_value.trim()) {
|
||||
if (confirm('确定修改为' + input_value + "?"))
|
||||
$.ajax({
|
||||
url: "/org_subfields/" + field_id + "?name=" + input_value,
|
||||
type: 'put'
|
||||
});
|
||||
}
|
||||
$(show_id).show();
|
||||
$(edit_id).hide();
|
||||
// $(edit_id).focus();
|
||||
}
|
||||
|
||||
function edit_dir(show_id, edit_id){
|
||||
$(show_id).toggle();
|
||||
$(edit_id).toggle();
|
||||
$(edit_id).find('input').focus();
|
||||
$(edit_id).find('input').on('keypress', function(e){
|
||||
if (e.keyCode == 13){
|
||||
this.blur();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function update_sub_dir(show_id, edit_id, field_id, input_value) {
|
||||
if ($(show_id).html().trim() != input_value.trim() && input_value.trim() != '') {
|
||||
if (confirm('确定修改为' + input_value + "?"))
|
||||
$.ajax({
|
||||
url: "/org_subfields/" + field_id + "/update_sub_dir?sub_dir_name=" + input_value,
|
||||
type: 'put'
|
||||
});
|
||||
}
|
||||
$(show_id).show();
|
||||
$(edit_id).hide();
|
||||
}
|
||||
function hide(content, id){
|
||||
if (content.text() == '设为隐藏')
|
||||
$.ajax({
|
||||
url: "/organizations/hide_org_subfield?org_subfield_id=" + id,
|
||||
type: "post"
|
||||
});
|
||||
else
|
||||
$.ajax({
|
||||
url: "/organizations/show_org_subfield?org_subfield_id=" + id,
|
||||
type: "post"
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,171 +1,171 @@
|
|||
<script>
|
||||
function g(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('orgSetting_'+i).className='orgSettingOp';
|
||||
g('orgContent_'+i).className='undis';}
|
||||
g('orgContent_'+n).className='dis ml15 mr15';
|
||||
g('orgSetting_'+n).className='orgSettingOp orgOpActive';}
|
||||
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
|
||||
//]]>
|
||||
$checkName = true;
|
||||
function check_uniq(id){
|
||||
if($("#organization_name").val().trim() == ""){
|
||||
$("#check_name_hint").html('<span class="c_red">名字不能为空<span>').show();
|
||||
return false ;
|
||||
}
|
||||
$.get(
|
||||
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
|
||||
)
|
||||
}
|
||||
function update_org(id){
|
||||
check_uniq(id);
|
||||
if( $checkName){
|
||||
$("#edit_organization_"+id).submit();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">配置</div>
|
||||
</div>
|
||||
<div class="resources mt10">
|
||||
<ul class="mb10">
|
||||
<li class="orgSettingOp orgOpActive" id="orgSetting_1" onclick="HoverLi(1);">信息</li>
|
||||
<li class="orgSettingOp" id="orgSetting_2" onclick="HoverLi(2);">成员</li>
|
||||
<li class="orgSettingOp" id="orgSetting_3" onclick="HoverLi(3);">栏目</li>
|
||||
<li class="orgBorder"></li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="ml15 mr15" id="orgContent_1">
|
||||
<!--<div class="orgLogo mb10"><a href="javascript:void(0);"><img src="images/0" width="55" height="55" alt="组织logo" class="mr10 logoBorder fl ml10" /></a>-->
|
||||
<!--<a href="javascript:void(0);" class="logoEnter fl linkGrey4">上传图片</a>-->
|
||||
<%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %>
|
||||
<%= labelled_form_for @organization do |f|%>
|
||||
<%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<div class="orgRow mb10"><span class="c_red">* </span>组织名称:<input type="text" name="organization[name]" id="organization_name" maxlength="100" onblur="check_uniq(<%=@organization.id %>);" onfocus="$('#check_name_hint').hide()" class="orgNameInput" value="<%= @organization.name%>" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="margin-left: 80px " id="check_name_hint"></div>
|
||||
<div class="orgRow mb10"><span class="ml10">组织描述:</span><textarea type="text" name="organization[description]" class="orgDes" id="org_desc" placeholder="最多3000个汉字(或6000个英文字符)"><%= @organization.description%></textarea>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="margin-left: 80px " id="check_desc_hint"></div>
|
||||
<div class="orgRow mb10"><span class="ml10">组织URL:</span>
|
||||
<div class="w607 fr">http://
|
||||
<input type="text" name="organization[domain]" id="domain" value="<%= @organization.domain%>" class="orgUrlInput" />
|
||||
.trustie.net<a href="javascript:void(0);" class="linkBlue ml15" style="text-decoration:underline;" onclick="apply_subdomain(<%= @organization.id %>,$('#domain').val());">申请</a>
|
||||
<p class="c_green f12" id="apply_hint" ></p></div>
|
||||
<!--class="c_green f12" 您的申请已提交,系统会以消息的形式通知您结果 -->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开 : </span>
|
||||
<input type="checkbox" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org(<%=@organization.id %>);">保存</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_2">
|
||||
<div class="orgMemberList">
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser fb">用户</li>
|
||||
<li class="orgListRole fb">角色</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div id="org_member_list">
|
||||
<%= render :partial=>"org_member_list",:locals=> {:members=>@organization.org_members} %>
|
||||
</div>
|
||||
</div>
|
||||
<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|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、昵称搜索" class="orgAddSearch mb20" />
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript org_member_autocomplete_org_member_index_path(:org=>@organization, :format => 'js') }')" %>
|
||||
<div id="principals_for_new_member">
|
||||
<%= find_user_not_in_current_org_by_name(@project) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<ul class="orgAddRole">
|
||||
<li class="fontGrey3 fb mb10">角色</li>
|
||||
<li>
|
||||
<input type="radio" id="orgMng" name="orgRole" value="11" />
|
||||
<label for="orgMng">管理人员</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="orgMeb" name="orgRole" checked value="12" />
|
||||
<label for="orgMeb">组织成员</label>
|
||||
</li>
|
||||
</ul><a href="javascript:void(0);" onclick="submit_add_org_members();" class="saveBtn db fl mt10">新增成员</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_3">
|
||||
<div class="orgMemberList" id="org_subfield_list">
|
||||
<%= render :partial => 'organizations/subfield_list', :locals => {:default_fields => @organization.org_subfields.where("field_type='default'"),
|
||||
:subfields => @organization.org_subfields.where("field_type != 'default'") } %>
|
||||
</div>
|
||||
<div class="fr orgMemContainer">
|
||||
<div class="fr">
|
||||
<p class="fontBlue fb mb5">新增栏目</p>
|
||||
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id=> 'add_subfield_form',:remote => true do %>
|
||||
<input type="text" id="subfield_name" name="name" placeholder="栏目名称" class="orgAddSearch mb10" />
|
||||
<div class="mb5">
|
||||
<p class="fontGrey3"><span class="fb">域名目录</span>(用户自定义url,可选)</p>
|
||||
<% if @organization.domain %>
|
||||
<span class="fl"><%= @organization.domain %>.trustie.net/</span><input class="fl personalUrl ml3" type="text" name="sub_dir">
|
||||
<% else %>
|
||||
<span class="fl">您还没有子域名,请先在左侧信息栏申请子域名</span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<ul class="orgAddRole">
|
||||
<li class="fontGrey3 fb mb10">栏目类型</li>
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgMng" value="Post" name="field_type" checked="checked"/>
|
||||
<label for="orgMng">帖子</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" id="orgMeb" value="Resource" name="field_type" />
|
||||
<label for="orgMeb">资源</label>
|
||||
</li>
|
||||
<li class="cl"></li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class="saveBtn db fl mt10" onclick="add_org_subfield();">确定</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function add_org_subfield(){
|
||||
if ($("#subfield_name").val().trim() != "")
|
||||
$("#add_subfield_form").submit();
|
||||
}
|
||||
function apply_subdomain(id, domain){
|
||||
var reg = new RegExp("^[a-zA-Z0-9_]{1,}$");
|
||||
if (reg.exec(domain)){
|
||||
$.ajax({
|
||||
url:"<%= apply_subdomain_organization_path %>",
|
||||
type:'post',
|
||||
data:{
|
||||
id:id,
|
||||
domain:domain
|
||||
},
|
||||
success:function(){
|
||||
$("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
$("#apply_hint").text("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
|
||||
}
|
||||
}
|
||||
<script>
|
||||
function g(o){return document.getElementById(o);}
|
||||
function HoverLi(n){
|
||||
//如果有N个标签,就将i<=N;
|
||||
for(var i=1;i<=3;i++){
|
||||
g('orgSetting_'+i).className='orgSettingOp';
|
||||
g('orgContent_'+i).className='undis';}
|
||||
g('orgContent_'+n).className='dis ml15 mr15';
|
||||
g('orgSetting_'+n).className='orgSettingOp orgOpActive';}
|
||||
//如果要做成点击后再转到请将<li>中的onmouseover 改成 onclick;
|
||||
//]]>
|
||||
$checkName = true;
|
||||
function check_uniq(id){
|
||||
if($("#organization_name").val().trim() == ""){
|
||||
$("#check_name_hint").html('<span class="c_red">名字不能为空<span>').show();
|
||||
return false ;
|
||||
}
|
||||
$.get(
|
||||
'<%= check_uniq_organizations_path%>'+'?org_name='+$("#organization_name").val().trim()+"&config_page=Y" + "&org_id="+id
|
||||
)
|
||||
}
|
||||
function update_org(id){
|
||||
check_uniq(id);
|
||||
if( $checkName){
|
||||
$("#edit_organization_"+id).submit();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="homepageRightBanner">
|
||||
<div class="NewsBannerName">配置</div>
|
||||
</div>
|
||||
<div class="resources mt10">
|
||||
<ul class="mb10">
|
||||
<li class="orgSettingOp orgOpActive" id="orgSetting_1" onclick="HoverLi(1);">信息</li>
|
||||
<li class="orgSettingOp" id="orgSetting_2" onclick="HoverLi(2);">成员</li>
|
||||
<li class="orgSettingOp" id="orgSetting_3" onclick="HoverLi(3);">栏目</li>
|
||||
<li class="orgBorder"></li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div class="ml15 mr15" id="orgContent_1">
|
||||
<!--<div class="orgLogo mb10"><a href="javascript:void(0);"><img src="images/0" width="55" height="55" alt="组织logo" class="mr10 logoBorder fl ml10" /></a>-->
|
||||
<!--<a href="javascript:void(0);" class="logoEnter fl linkGrey4">上传图片</a>-->
|
||||
<%#= form_for( @organization,{:controller => 'organizations',:action => 'update',:id=>@organization,:html=>{:id=>'update_org_form',:method=>'put'}}) do %>
|
||||
<%= labelled_form_for @organization do |f|%>
|
||||
<%= render :partial=>"new_org_avatar_form",:locals=> {source:@organization} %>
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</div>-->
|
||||
<div class="orgRow mb10"><span class="c_red">* </span>组织名称:<input type="text" name="organization[name]" id="organization_name" maxlength="100" onblur="check_uniq(<%=@organization.id %>);" onfocus="$('#check_name_hint').hide()" class="orgNameInput" value="<%= @organization.name%>" />
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="margin-left: 80px " id="check_name_hint"></div>
|
||||
<div class="orgRow mb10"><span class="ml10">组织描述:</span><textarea type="text" name="organization[description]" class="orgDes" id="org_desc" placeholder="最多3000个汉字(或6000个英文字符)"><%= @organization.description%></textarea>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div style="margin-left: 80px " id="check_desc_hint"></div>
|
||||
<div class="orgRow mb10"><span class="ml10">组织URL:</span>
|
||||
<div class="w607 fr">http://
|
||||
<input type="text" name="organization[domain]" id="domain" value="<%= @organization.domain%>" class="orgUrlInput" />
|
||||
.trustie.net<a href="javascript:void(0);" class="linkBlue ml15" style="text-decoration:underline;" onclick="apply_subdomain(<%= @organization.id %>,$('#domain').val());">申请</a>
|
||||
<p class="c_green f12" id="apply_hint" ></p></div>
|
||||
<!--class="c_green f12" 您的申请已提交,系统会以消息的形式通知您结果 -->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开 : </span>
|
||||
<input type="checkbox" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="saveBtn ml80 db fl" onclick="update_org(<%=@organization.id %>);">保存</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_2">
|
||||
<div class="orgMemberList">
|
||||
<ul class="orgListRow">
|
||||
<li class="orgListUser fb">用户</li>
|
||||
<li class="orgListRole fb">角色</li>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<div id="org_member_list">
|
||||
<%= render :partial=>"org_member_list",:locals=> {:members=>@organization.org_members} %>
|
||||
</div>
|
||||
</div>
|
||||
<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|%>
|
||||
<input type="text" id="not_org_member_search" name="orgAddSearch" placeholder="支持姓名、邮箱、昵称搜索" class="orgAddSearch mb20" />
|
||||
<%= javascript_tag "observeSearchfield('not_org_member_search', null, '#{ escape_javascript org_member_autocomplete_org_member_index_path(:org=>@organization, :format => 'js') }')" %>
|
||||
<div id="principals_for_new_member">
|
||||
<%= find_user_not_in_current_org_by_name(@project) %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<ul class="orgAddRole">
|
||||
<li class="fontGrey3 fb mb10">角色</li>
|
||||
<li>
|
||||
<input type="radio" id="orgMng" name="orgRole" value="11" />
|
||||
<label for="orgMng">管理人员</label>
|
||||
</li>
|
||||
<li>
|
||||
<input type="radio" id="orgMeb" name="orgRole" checked value="12" />
|
||||
<label for="orgMeb">组织成员</label>
|
||||
</li>
|
||||
</ul><a href="javascript:void(0);" onclick="submit_add_org_members();" class="saveBtn db fl mt10">新增成员</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="undis ml15 mr15" id="orgContent_3">
|
||||
<div class="orgMemberList" id="org_subfield_list">
|
||||
<%= render :partial => 'organizations/subfield_list', :locals => {:default_fields => @organization.org_subfields.where("field_type='default'"),
|
||||
:subfields => @organization.org_subfields.where("field_type != 'default'") } %>
|
||||
</div>
|
||||
<div class="fr orgMemContainer">
|
||||
<div class="fr">
|
||||
<p class="fontBlue fb mb5">新增栏目</p>
|
||||
<%= form_tag url_for(:controller => 'org_subfields', :action => 'create', :organization_id => @organization.id), :id=> 'add_subfield_form',:remote => true do %>
|
||||
<input type="text" id="subfield_name" name="name" placeholder="栏目名称" class="orgAddSearch mb10" />
|
||||
<div class="mb5">
|
||||
<p class="fontGrey3"><span class="fb">域名目录</span>(用户自定义url,可选)</p>
|
||||
<% if @organization.domain %>
|
||||
<span class="fl"><%= @organization.domain %>.trustie.net/</span><input class="fl personalUrl ml3" type="text" name="sub_dir">
|
||||
<% else %>
|
||||
<span class="fl">您还没有子域名,请先在左侧信息栏申请子域名</span>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<ul class="orgAddRole">
|
||||
<li class="fontGrey3 fb mb10">栏目类型</li>
|
||||
<li class="fl mr15">
|
||||
<input type="radio" id="orgMng" value="Post" name="field_type" checked="checked"/>
|
||||
<label for="orgMng">帖子</label>
|
||||
</li>
|
||||
<li class="fl">
|
||||
<input type="radio" id="orgMeb" value="Resource" name="field_type" />
|
||||
<label for="orgMeb">资源</label>
|
||||
</li>
|
||||
<li class="cl"></li>
|
||||
</ul>
|
||||
<div class="cl"></div>
|
||||
<a href="javascript:void(0);" class="saveBtn db fl mt10" onclick="add_org_subfield();">确定</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function add_org_subfield(){
|
||||
if ($("#subfield_name").val().trim() != "")
|
||||
$("#add_subfield_form").submit();
|
||||
}
|
||||
function apply_subdomain(id, domain){
|
||||
var reg = new RegExp("^[a-zA-Z0-9_]{1,}$");
|
||||
if (reg.exec(domain)){
|
||||
$.ajax({
|
||||
url:"<%= apply_subdomain_organization_path %>",
|
||||
type:'post',
|
||||
data:{
|
||||
id:id,
|
||||
domain:domain
|
||||
},
|
||||
success:function(){
|
||||
$("#apply_hint").text("您的申请已提交,系统会以消息的形式通知您结果");
|
||||
}
|
||||
});
|
||||
}
|
||||
else{
|
||||
$("#apply_hint").text("子域名命名不规范,只能包含字母、数字和下划线,请重新输入");
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -2,6 +2,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %>
|
||||
<% if @project.project_score.issue_num > 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.issue_num %>)</a>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%#= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<a class="subnav_green m195" href="javascript:void(0);" onclick="project_files_upload();">+上传资源</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
||||
<% if visible_repository?(@project) %>
|
||||
<div class="subNav">
|
||||
<% if rep_is_gitlab?(@project) %>
|
||||
<%= link_to l(:project_module_repository), {:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories'}, :class => "f14 c_blue02" %>
|
||||
<% else %>
|
||||
<%= link_to l(:project_module_repository),({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).identifier}), :class => "f14 c_blue02" %>
|
||||
<% end %>
|
||||
<!--<a class="subnav_num">(<%= @project.repositories.count %>)</a>-->
|
||||
<% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) && rep_is_gitlab?(@project) %>
|
||||
<%= link_to "+"+l(:project_gitlab_create_repository), url_for(:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories') , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- more -->
|
||||
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project, :remote => true), :class => "f14 c_blue02" %>
|
||||
<% if @project.project_score.issue_num > 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.issue_num %>)</a>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%#= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<a class="subnav_green m195" href="javascript:void(0);" onclick="project_files_upload();">+上传资源</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# --版本库被设置成私有、module中设置不显示、没有创建版本库 三种情况不显示-- %>
|
||||
<% if visible_repository?(@project) %>
|
||||
<div class="subNav">
|
||||
<% if rep_is_gitlab?(@project) %>
|
||||
<%= link_to l(:project_module_repository), {:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories'}, :class => "f14 c_blue02" %>
|
||||
<% else %>
|
||||
<%= link_to l(:project_module_repository),({:controller => 'repositories', :action => 'show', :id => @project, :repository_id => gitlab_repository(@project).identifier}), :class => "f14 c_blue02" %>
|
||||
<% end %>
|
||||
<!--<a class="subnav_num">(<%= @project.repositories.count %>)</a>-->
|
||||
<% if (User.current.admin? || User.current.allowed_to?({:controller => 'projects', :action => 'settings'}, @project)) && rep_is_gitlab?(@project) %>
|
||||
<%= link_to "+"+l(:project_gitlab_create_repository), url_for(:controller => 'projects', :action => 'settings', :id => @project.id, :tab=>'repositories') , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<!-- more -->
|
||||
<div class="subNav subNav_jiantou" id="expand_tools_expand" nhtype="toggle4cookie" data-id="expand_tool_more" data-target="#navContent" data-val="retract"><%= l(:label_project_more) %></div>
|
||||
<ul class="navContent" id="navContent">
|
||||
<%= render 'projects/tools_expand' %>
|
||||
</ul>
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -4,6 +4,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!-- added by bai -->
|
||||
<div><%= l(:label_topic_number) %> * 2 = <%= project.project_score.board_num %> * 2 = <%= project.project_score.board_num * 2 %></div>
|
||||
<div><%= l(:label_topic_score) %> = <%= project.project_score.board_num * 2 %></div>
|
||||
<!-- end -->
|
||||
<div><%= l(:label_topic_reply_score) %> * 1 = <%= project.project_score.board_message_num %> * 1 = <%= project.project_score.board_message_num * 1 %></div>
|
||||
<div><%= l(:label_topic_score) %> = <%= project.project_score.board_num * 2 %> + <%= project.project_score.board_message_num * 1 %>
|
||||
= <%= project.project_score.board_num * 2 + project.project_score.board_message_num * 1 %></div>
|
|
@ -1,39 +1,39 @@
|
|||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% if @project.project_score.issue_num > 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.issue_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_activity), {:controller => 'projects', :action => 'show', :id => @project.id}, :class => "f14 c_blue02" %>
|
||||
<% unless ForgeActivity.where("project_id = ?", @project.id).count == 0 %>
|
||||
<a class="subnav_num">(<%= ForgeActivity.where("project_id = ?", @project.id).count %>)</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:label_issue_tracking), project_issues_path(@project), :class => "f14 c_blue02" %>
|
||||
<% if @project.project_score.issue_num > 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.issue_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_release_issue), new_project_issue_path(@project) , :class => "subnav_green" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% unless @project.enabled_modules.where("name = 'boards'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_boards), project_boards_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.board_num == 0 %>
|
||||
<a class="subnav_num">(<%= @project.project_score.board_num %>)</a>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:project_module_boards_post), project_boards_path(@project, :flag => true), :layout => 'base_projects', :class => "subnav_green ml105" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
<% unless @project.enabled_modules.where("name = 'files'").empty? %>
|
||||
<div class="subNav">
|
||||
<%= link_to l(:project_module_files), project_files_path(@project), :class => "f14 c_blue02" %>
|
||||
<% unless @project.project_score.attach_num == 0 %>
|
||||
<%= link_to "(#{@project.project_score.attach_num})", project_files_path(@project), :class => "subnav_num c_orange",:id=>'project_files_count_nav' %>
|
||||
<% end %>
|
||||
<% if User.current.member_of?(@project) %>
|
||||
<%= link_to "+"+l(:label_upload_source), project_files_path(@project,:flag => true), :class => "subnav_green ml95" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end%>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<% if @project.is_public? %>
|
||||
$("#set_project_public_<%= @project.id %>").text("设为私有");
|
||||
<% else %>
|
||||
$("#set_project_public_<%= @project.id %>").text("设为公开");
|
||||
<% if @project.is_public? %>
|
||||
$("#set_project_public_<%= @project.id %>").text("设为私有");
|
||||
<% else %>
|
||||
$("#set_project_public_<%= @project.id %>").text("设为公开");
|
||||
<% end %>
|
|
@ -2,6 +2,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.author} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p><%=time_from_now time %> <%= project.commits_count %>提交</p>
|
||||
<p><%=time_from_now time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=activity.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(activity.user), :width => "50", :height => "50"), user_path(activity.user_id), :alt => "用户头像" %>
|
||||
<%= render :partial => 'users/show_detail_info', :locals => {:user => activity.user} %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo break_word mt-4">
|
||||
|
|
|
@ -1,58 +1,59 @@
|
|||
<div >
|
||||
<div class="relateText fl mb10 mr5">发送到</div>
|
||||
<div class="resourcesSendTo mr15">
|
||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>');">
|
||||
<option value="1">课程</option>
|
||||
<option value="2">项目</option>
|
||||
<option value="3" selected>组织</option>
|
||||
</select>
|
||||
</div>
|
||||
<%= form_tag search_user_org_user_path(user),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_org_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<input type="text" name="serach" id="search_org_input" value="<%=@search %>" placeholder="输入名称搜索" class="orgSendSearch mt15" />
|
||||
<script>
|
||||
observeSearchfieldOnInput('search_org_input','<%= search_user_org_user_path(user)%>','<%= send_id %>','<%= send_ids%>')
|
||||
</script>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<%= form_tag add_exist_file_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
<ul class="fontGrey3">
|
||||
<% unless @orgs.empty? %>
|
||||
<% @orgs.each do |org|%>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id)%>')" class="mt3 fl mr5" />
|
||||
<span><%= org.name%></span></label>
|
||||
</li>
|
||||
<%end%>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="columnWrap">
|
||||
<ul class="columnContent">
|
||||
<!--<span class="fontBlue pl10">请在左侧选择要转发的位置</span>-->
|
||||
<!--<li style="background-color:#f1f1f1; color:#555555; padding-top:2px; padding-bottom:2px;">请选择栏目:</li>-->
|
||||
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
|
||||
<!--<li>-->
|
||||
<!--<label>-->
|
||||
<!--<input type="radio" name="sendColumn" class="mt3 fl mr5" />-->
|
||||
<!--<span>动态</span></label>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
|
||||
<div class="courseSendSubmit mr15">
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div >
|
||||
<div class="relateText fl mb10 mr5">发送到</div>
|
||||
<div class="resourcesSendTo mr15">
|
||||
<select class="resourcesSendType" onclick="chooseSendType('<%= send_id%>','<%= send_ids%>');">
|
||||
<option value="1">课程</option>
|
||||
<option value="2">项目</option>
|
||||
<option value="3" selected>组织</option>
|
||||
</select>
|
||||
</div>
|
||||
<%= form_tag search_user_org_user_path(user),:method => 'get',
|
||||
:remote=>true,:id=>'search_user_org_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<input type="text" name="serach" id="search_org_input" value="<%=@search %>" placeholder="输入名称搜索" class="orgSendSearch mt15" />
|
||||
<script>
|
||||
observeSearchfieldOnInput('search_org_input','<%= search_user_org_user_path(user)%>','<%= send_id %>','<%= send_ids%>')
|
||||
</script>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<%= form_tag add_exist_file_to_org_user_path(user),:remote=>true,:id=>'orgs_list_form' do %>
|
||||
<%= hidden_field_tag(:send_id, send_id) %>
|
||||
<%= hidden_field_tag(:send_ids, send_ids) %>
|
||||
<div class="sectionWrap fl mr15">
|
||||
|
||||
<ul class="fontGrey3 sectionContent">
|
||||
<% unless @orgs.empty? %>
|
||||
<% @orgs.each do |org|%>
|
||||
<li>
|
||||
<label>
|
||||
<input type="radio" name="org_id" value="<%= org.id%>" onchange="change_org_subfield('<%= org_resources_subfield_organization_path(:id=>org.id)%>')" class="mt3 fl mr5" />
|
||||
<span><%= org.name%></span></label>
|
||||
</li>
|
||||
<%end%>
|
||||
<%end%>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="columnWrap">
|
||||
<ul class="columnContent">
|
||||
<!--<span class="fontBlue pl10">请在左侧选择要转发的位置</span>-->
|
||||
<!--<li style="background-color:#f1f1f1; color:#555555; padding-top:2px; padding-bottom:2px;">请选择栏目:</li>-->
|
||||
<%= render :partial => 'users/org_resources_subfield',:locals => {:subfield=>nil}%>
|
||||
<!--<li>-->
|
||||
<!--<label>-->
|
||||
<!--<input type="radio" name="sendColumn" class="mt3 fl mr5" />-->
|
||||
<!--<span>动态</span></label>-->
|
||||
<!--</li>-->
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="orgDirection mb10 break_word" style="white-space: nowrap;-o-text-overflow:ellipsis;text-overflow: ellipsis;overflow: hidden">目标地址:</div>
|
||||
<div class="courseSendSubmit mr15">
|
||||
<%= submit_tag '确定',:class=>'sendSourceText',:onfocus=>'this.blur();',:onclick=>"check_des(event);" %>
|
||||
</div>
|
||||
<div class="courseSendCancel">
|
||||
<a href="javascript:void(0);" onclick="hideModal();" class="sendSourceText">取消</a>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%end %>
|
|
@ -5,7 +5,7 @@
|
|||
<!--<img src="images/homepageImage.jpg" width="50" height="50" alt="个人头像" />-->
|
||||
</div>
|
||||
<div class="fl">
|
||||
<p class="homepageImageName mb5" style="max-width:88px;font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;"><%= user %></p>
|
||||
<p class="homepageImageName mb5 hidden" style="max-width:88px;font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;"><%= user %></p>
|
||||
<span class="homepageImageSex"></span>
|
||||
<div class="cl"></div>
|
||||
<p class="mb8 c_dark f14">
|
||||
|
|
|
@ -1,306 +1,306 @@
|
|||
<% is_teacher = User.current.allowed_to?(:as_teacher,homework_common.course) %>
|
||||
<div class="HomeWork mb10" id="homework_common_<%= homework_common.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mt-4">
|
||||
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
|
||||
TO
|
||||
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<span class="homepagePostTitle hidden fl m_w505">
|
||||
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1%>
|
||||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
<% elsif homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 0%>
|
||||
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if homework_common.homework_type == 3 && !is_teacher && homework_common.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(homework_common.course) %>
|
||||
<% projects = cur_user_projects_for_homework homework_common %>
|
||||
<% works = cur_user_works_for_homework homework_common %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => homework_common.id,:is_in_course=>is_in_course,:user_activity_id=>-1,:course_activity=>-1),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
||||
<%#= relate_project(activity,is_teacher,-1,user_activity_id,course_activity) %>
|
||||
</div>
|
||||
<% elsif works.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => homework_common.id,:is_in_course=>is_in_course,:user_activity_id=>-1,:course_activity=>-1), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= user_for_homework_common homework_common,is_teacher %>
|
||||
</div>
|
||||
<% if homework_common.homework_type == 2 && is_teacher%>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_type == 2%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
语言:
|
||||
<%= homework_common.language_name%>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
分组人数:<%=homework_common.homework_detail_group.min_num %>-<%=homework_common.homework_detail_group.max_num %> 人
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= homework_common.end_time.to_s %> 23:59</div>
|
||||
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 %>
|
||||
<div class="homepagePostDeadline">匿评截止时间:<%= homework_common.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="homepagePostDeadline ml15">
|
||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="homework_description_<%= homework_common.id%>">
|
||||
<div id="intro_content_<%= homework_common.id%>">
|
||||
<%= homework_common.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => homework_common} %>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="homepagePostDeadline">
|
||||
迟交扣分:<%= homework_common.late_penalty%>分
|
||||
</div>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=homework_common.id %>">
|
||||
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepagePostDeadline">
|
||||
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
||||
</div>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
||||
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.student_works.count != 0 %>
|
||||
<% sw = homework_common.student_works.reorder("created_at desc").first %>
|
||||
<div class="mt10 homepagePostDeadline">
|
||||
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.student_works.count != 0 %>
|
||||
<% sw_id = "("+homework_common.student_works.map{|sw| sw.id}.join(",")+")" %>
|
||||
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
|
||||
<% unless student_work_scores.empty? %>
|
||||
<% last_score = student_work_scores.first %>
|
||||
<div class="mt5 homepagePostDeadline">
|
||||
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr20 fontGrey3">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% projects.each do |pro| %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>_<%=homework_common.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=homework_common.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=homework_common.id %>").css("display","none");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p><%=time_from_now time %> <%= project.commits_count %>提交</p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=homework_common.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher%>
|
||||
<% comment_status = homework_common.homework_detail_manual.comment_status%>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1), :class => "postOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(homework_common, :is_in_course => is_in_course,:course_activity=>-1),:class => "postOptionLink", :remote => true) %>
|
||||
</li>
|
||||
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common, :is_in_course => is_in_course,:course_activity=>-1),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<li>
|
||||
<%= homework_anonymous_comment(homework_common, is_in_course) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(homework_common,:is_in_course => is_in_course),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% count=homework_common.journals_for_messages.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
回复(<%= count %>)
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=homework_common.id%>" onclick="expand_reply('#reply_div_<%= homework_common.id %> li','#reply_btn_<%=homework_common.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= homework_common.id %>">
|
||||
<ul>
|
||||
<% homework_common.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
<div class="fr" id="message_edit_<%=comment.id %>" style="display: none">
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course,:course_activity=>-1},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= homework_common.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= homework_common.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => homework_common.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'homework_common_id',params[:homework_common_id],:value =>homework_common.id %>
|
||||
<%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea>
|
||||
<div nhname='toolbar_container_<%= homework_common.id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= homework_common.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!----HomeWork end-->
|
||||
<script type="text/javascript">
|
||||
$(homework_description_show_hide(<%=homework_common.id %>));
|
||||
<% is_teacher = User.current.allowed_to?(:as_teacher,homework_common.course) %>
|
||||
<div class="HomeWork mb10" id="homework_common_<%= homework_common.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%=link_to image_tag(url_to_avatar(homework_common.user),width:"50px", height: "50px"), user_activities_path(homework_common.user.id)%>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo mt-4">
|
||||
<%= link_to homework_common.user.show_name, user_activities_path(homework_common.user_id), :class => "newsBlue mr15"%>
|
||||
TO
|
||||
<%= link_to homework_common.course.name, course_path(homework_common.course_id), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<span class="homepagePostTitle hidden fl m_w505">
|
||||
<%= link_to homework_common.name,student_work_index_path(:homework => homework_common.id),:class => "postGrey"%>
|
||||
</span>
|
||||
|
||||
<% if homework_common.homework_detail_manual%>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<span class="grey_homework_btn_cir ml5">未发布</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 1%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">未开启匿评</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<% if Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")%>
|
||||
<span class="green_homework_btn_cir ml5">作品提交中</span>
|
||||
<% elsif Time.parse(homework_common.end_time.to_s).strftime("%Y-%m-%d") < Time.now.strftime("%Y-%m-%d") %>
|
||||
<span class="red_homework_btn_cir ml5">作品补交中</span>
|
||||
<% end %>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 2%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="green_homework_btn_cir ml5">匿评中</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% elsif homework_common.homework_detail_manual.comment_status == 3%>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已结束</span>
|
||||
<% else %>
|
||||
<span class="grey_homework_btn_cir ml5">匿评已禁用</span>
|
||||
<% end %>
|
||||
<span class="green_homework_btn_cir ml5" title="目前教师和教辅正在评阅">教师评阅中</span>
|
||||
<% end%>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1%>
|
||||
<span class="c_red">系统提示:该作业要求各组长<%=link_to "创建项目", new_project_path(:host=>Setting.host_name),:class=>"c_red",:title=>"新建项目",:style=>"text-decoration:underline;"%>,组成员加入项目,然后由组长关联项目。谢谢配合!</span>
|
||||
<% elsif homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 0%>
|
||||
<span class="c_red">系统提示:该作业要求各组长提交作品,提交作品时请添加组成员。谢谢配合!</span>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmitContainer">
|
||||
<% if homework_common.homework_type == 3 && !is_teacher && homework_common.homework_detail_group.base_on_project == 1 && User.current.member_of_course?(homework_common.course) %>
|
||||
<% projects = cur_user_projects_for_homework homework_common %>
|
||||
<% works = cur_user_works_for_homework homework_common %>
|
||||
<% if works.nil? && projects.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "关联项目",new_student_work_project_student_work_index_path(:homework => homework_common.id,:is_in_course=>is_in_course,:user_activity_id=>-1,:course_activity=>-1),remote: true,:class=> 'c_blue', :title=> '请各组长关联作业项目' %>
|
||||
<%#= relate_project(activity,is_teacher,-1,user_activity_id,course_activity) %>
|
||||
</div>
|
||||
<% elsif works.nil? %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%=link_to "取消关联",cancel_relate_project_student_work_index_path(:homework => homework_common.id,:is_in_course=>is_in_course,:user_activity_id=>-1,:course_activity=>-1), :confirm => "您确定要取消关联吗?", remote: true,:class => "c_blue", :title=> '取消关联项目' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= user_for_homework_common homework_common,is_teacher %>
|
||||
</div>
|
||||
<% if homework_common.homework_type == 2 && is_teacher%>
|
||||
<div class="homepagePostSubmit">
|
||||
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_type == 2%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
语言:
|
||||
<%= homework_common.language_name%>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group%>
|
||||
<div class="homepagePostDeadline mr15">
|
||||
分组人数:<%=homework_common.homework_detail_group.min_num %>-<%=homework_common.homework_detail_group.max_num %> 人
|
||||
</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status < 2 %>
|
||||
<div class="homepagePostDeadline">提交截止时间:<%= homework_common.end_time.to_s %> 23:59</div>
|
||||
<% elsif homework_common.homework_detail_manual && homework_common.homework_detail_manual.comment_status >= 2 %>
|
||||
<div class="homepagePostDeadline">匿评截止时间:<%= homework_common.homework_detail_manual.evaluation_end.to_s %> 23:59</div>
|
||||
<% end %>
|
||||
<% if homework_common.homework_detail_manual.comment_status == 0 %>
|
||||
<div class="homepagePostDeadline ml15">
|
||||
<%= l(:label_publish_time)%>:<%= homework_common.publish_time%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth" id="homework_description_<%= homework_common.id%>">
|
||||
<div id="intro_content_<%= homework_common.id%>">
|
||||
<%= homework_common.description.html_safe %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div id="intro_content_show_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[展开]</a></div>
|
||||
<div id="intro_content_hide_<%= homework_common.id%>" class="fr" style="display:none;"><a href="javascript:void(0);" class="linkBlue">[收起]</a></div>
|
||||
<div class="cl"></div>
|
||||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => homework_common} %>
|
||||
</div>
|
||||
<div class="mt10">
|
||||
<div class="homepagePostDeadline">
|
||||
迟交扣分:<%= homework_common.late_penalty%>分
|
||||
</div>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_start_time_<%=homework_common.id %>">
|
||||
匿评开启时间:<%= homework_common.homework_detail_manual.evaluation_start%> 00:00
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div>
|
||||
<div class="homepagePostDeadline">
|
||||
缺评扣分:<%= homework_common.homework_detail_manual.absence_penalty%>分/作品
|
||||
</div>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<div class="homepagePostDeadline" style="float: right; margin-right: 220px;" id="evaluation_end_time_<%=homework_common.id %>">
|
||||
匿评关闭时间:<%= homework_common.homework_detail_manual.evaluation_end%> 23:59
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.student_works.count != 0 %>
|
||||
<% sw = homework_common.student_works.reorder("created_at desc").first %>
|
||||
<div class="mt10 homepagePostDeadline">
|
||||
<%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.student_works.count != 0 %>
|
||||
<% sw_id = "("+homework_common.student_works.map{|sw| sw.id}.join(",")+")" %>
|
||||
<% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
|
||||
<% unless student_work_scores.empty? %>
|
||||
<% last_score = student_work_scores.first %>
|
||||
<div class="mt5 homepagePostDeadline">
|
||||
<%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if homework_common.homework_type == 3 && homework_common.homework_detail_group.base_on_project == 1 %>
|
||||
<div class="mt10">
|
||||
<% projects = homework_common.student_work_projects.where("is_leader = 1") %>
|
||||
<div class="fl mr20 fontGrey3">
|
||||
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% projects.each do |pro| %>
|
||||
<% project = Project.find pro.project_id %>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("#project_img_<%=project.id %>_<%=homework_common.id %>").mouseover(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=homework_common.id %>").css("display","block");
|
||||
}).mouseout(function(){
|
||||
$("#relatePInfo_<%=project.id %>_<%=homework_common.id %>").css("display","none");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div class="mr20 mb10 mt10 fl w110 fontGrey3" style="text-align: center;">
|
||||
<% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
|
||||
<%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像" %>
|
||||
<% else %>
|
||||
<%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+homework_common.id.to_s,:alt =>"项目头像") %>
|
||||
<% end %>
|
||||
<% time=project.updated_on %>
|
||||
<% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
|
||||
<p><span class="captainName" title="<%=(User.find project.user_id).show_name %>"><%=(User.find project.user_id).show_name %></span><span style="vertical-align: top;">(组长)</span></p>
|
||||
<p><%=time_from_now time %> <%= project.project_score.changeset_num %>提交</p>
|
||||
<div class="relatePInfo" id="relatePInfo_<%=project.id %>_<%=homework_common.id %>">
|
||||
项目名称:<%=project.name %><br />
|
||||
创建者:<%=(User.find project.user_id).show_name %>(组长)<br />
|
||||
更新时间:<%=time_from_now time %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% if is_teacher%>
|
||||
<% comment_status = homework_common.homework_detail_manual.comment_status%>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit),edit_homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1), :class => "postOptionLink"%>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(homework_common,:is_in_course => is_in_course,:course_activity=>-1),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to("评分设置", score_rule_set_homework_common_path(homework_common, :is_in_course => is_in_course,:course_activity=>-1),:class => "postOptionLink", :remote => true) %>
|
||||
</li>
|
||||
<% if homework_common.anonymous_comment == 0 &&(comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("匿评设置", start_evaluation_set_homework_common_path(homework_common, :is_in_course => is_in_course,:course_activity=>-1),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0%>
|
||||
<li>
|
||||
<%= homework_anonymous_comment(homework_common, is_in_course) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if homework_common.anonymous_comment == 0 && (comment_status == 0 || comment_status == 1)%>
|
||||
<li>
|
||||
<%= link_to("禁用匿评", alert_forbidden_anonymous_comment_homework_common_path(homework_common,:is_in_course => is_in_course),:class => "postOptionLink", :remote => true)%>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<% count=homework_common.journals_for_messages.count %>
|
||||
<div class="homepagePostReply">
|
||||
<div class="topBorder" style="display: <%= count>0 ? 'none': '' %>"></div>
|
||||
<div class="homepagePostReplyBanner" style="display: <%= count>0 ? '': 'none' %>">
|
||||
<div class="homepagePostReplyBannerCount">
|
||||
回复(<%= count %>)
|
||||
</div>
|
||||
<div class="homepagePostReplyBannerTime"></div>
|
||||
<%if count>3 %>
|
||||
<div class="homepagePostReplyBannerMore">
|
||||
<a id="reply_btn_<%=homework_common.id%>" onclick="expand_reply('#reply_div_<%= homework_common.id %> li','#reply_btn_<%=homework_common.id%>')" data-count="<%= count %>" data-init="0" class=" replyGrey" href="javascript:void(0)" value="show_help" >
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% replies_all_i = 0 %>
|
||||
<% if count > 0 %>
|
||||
<div class="" id="reply_div_<%= homework_common.id %>">
|
||||
<ul>
|
||||
<% homework_common.journals_for_messages.reorder("created_on desc").each do |comment| %>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
showNormalImage('reply_content_<%= comment.id %>');
|
||||
});
|
||||
</script>
|
||||
<% replies_all_i = replies_all_i + 1 %>
|
||||
<li class="homepagePostReplyContainer" nhname="reply_rec" onmouseover="$('#message_edit_<%= comment.id%>').show();" onmouseout="$('#message_edit_<%= comment.id%>').hide();" style="display:<%= replies_all_i > 3 ? 'none' : '' %>">
|
||||
<div class="homepagePostReplyPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(comment.user), :width => "33", :height => "33", :class =>"mt8"), user_path(comment.user_id), :alt => "用户头像" %>
|
||||
</div>
|
||||
<div class="homepagePostReplyDes">
|
||||
<div class="homepagePostReplyPublisher">
|
||||
<% if comment.try(:user).try(:realname) == ' ' %>
|
||||
<%= link_to comment.try(:user), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% else %>
|
||||
<%= link_to comment.try(:user).try(:realname), user_path(comment.user_id), :class => "newsBlue mr10 f14" %>
|
||||
<% end %>
|
||||
<%= format_time(comment.created_on) %>
|
||||
<div class="fr" id="message_edit_<%=comment.id %>" style="display: none">
|
||||
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
||||
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => is_in_course,:course_activity=>-1},
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
||||
<%= comment.notes.html_safe %></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= homework_common.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= homework_common.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'leave_homework_message', :id => homework_common.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'homework_common_id',params[:homework_common_id],:value =>homework_common.id %>
|
||||
<%= hidden_field_tag 'is_in_course',params[:is_in_course],:value =>is_in_course %>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea>
|
||||
<div nhname='toolbar_container_<%= homework_common.id%>' style="float:left;padding-top:3px; margin-left: 5px;"></div>
|
||||
<a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= homework_common.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!----HomeWork end-->
|
||||
<script type="text/javascript">
|
||||
$(homework_description_show_hide(<%=homework_common.id %>));
|
||||
</script>
|
|
@ -440,6 +440,7 @@ zh:
|
|||
label_code_submit_number: 代码提交频率
|
||||
|
||||
label_topic_score: 讨论区得分
|
||||
label_topic_reply_score: 讨论区回复数量
|
||||
label_topic_number: 讨论区帖子数量
|
||||
label_add_news: 添加了新闻
|
||||
|
||||
|
|
|
@ -37,6 +37,14 @@ RedmineApp::Application.routes.draw do
|
|||
end
|
||||
end
|
||||
resources :organizations do
|
||||
resources :org_document_comments do
|
||||
member do
|
||||
|
||||
end
|
||||
collection do
|
||||
|
||||
end
|
||||
end
|
||||
member do
|
||||
get 'setting'#, :action => 'settings', :as => 'settings'
|
||||
get 'clear_org_avatar_temp'
|
||||
|
@ -63,14 +71,6 @@ RedmineApp::Application.routes.draw do
|
|||
post 'show_org_subfield'
|
||||
post 'agree_apply_subdomain'
|
||||
end
|
||||
resources :org_document_comments do
|
||||
member do
|
||||
|
||||
end
|
||||
collection do
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Organization.where("domain is not null").each do |org|
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class AddStatusToOrgMessages < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :org_messages, :status, :integer, :default => 0
|
||||
end
|
||||
end
|
||||
class AddStatusToOrgMessages < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :org_messages, :status, :integer, :default => 0
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
class CreateSubfieldSubdomainDirs < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :subfield_subdomain_dirs do |t|
|
||||
t.integer :org_subfield_id
|
||||
t.string :name
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
class CreateSubfieldSubdomainDirs < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :subfield_subdomain_dirs do |t|
|
||||
t.integer :org_subfield_id
|
||||
t.string :name
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class AddBoardNumToProjectScore < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :project_scores, :board_num, :integer, :default => false
|
||||
add_column :project_scores, :attach_num, :integer, :default => false
|
||||
end
|
||||
end
|
||||
class AddBoardNumToProjectScore < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :project_scores, :board_num, :integer, :default => false
|
||||
add_column :project_scores, :attach_num, :integer, :default => false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,61 +1,61 @@
|
|||
class UpdateProjectScore < ActiveRecord::Migration
|
||||
def up
|
||||
project_count = Project.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... project_count do i
|
||||
Project.page(i).per(30).each do |project|
|
||||
puts project.id
|
||||
if ProjectScore.where("project_id=?", project.id).first.nil?
|
||||
puts "create project ==>#{project.id}"
|
||||
ProjectScore.create(:project_id => project.id, :score => false)
|
||||
end
|
||||
unless project.project_score.nil?
|
||||
# update boards
|
||||
unless project.boards.first.nil?
|
||||
boards_count = project.boards.first.topics.count
|
||||
project.project_score.update_attribute(:board_num, boards_count)
|
||||
end
|
||||
# update boards reply
|
||||
unless project.boards.first.nil?
|
||||
messages_count = Message.where("board_id =? and parent_id is not ?", project.boards.first.id, nil).count
|
||||
project.project_score.update_attribute(:board_message_num, messages_count)
|
||||
end
|
||||
# update issues
|
||||
unless project.issues.nil?
|
||||
issues_count = project.issues.count
|
||||
project.project_score.update_attribute(:issue_num, issues_count)
|
||||
end
|
||||
# update issue's journal
|
||||
# if !project.project_score.nil? && !project.project_score.issue_journal_num.nil?
|
||||
# project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num)
|
||||
# end
|
||||
# update news
|
||||
unless project.news.nil?
|
||||
news_count = project.news.count
|
||||
project.project_score.update_attribute(:news_num, news_count)
|
||||
end
|
||||
# update attach
|
||||
unless project.attachments.nil?
|
||||
attachments_count = project.attachments.count
|
||||
project.project_score.update_attribute(:attach_num, attachments_count)
|
||||
end
|
||||
# update commits
|
||||
unless project.gpid.nil?
|
||||
g = Gitlab.client
|
||||
begin
|
||||
puts project.id
|
||||
count = g.project(project.gpid).commit_count
|
||||
rescue
|
||||
logger.error("The project's rep is not exit!")
|
||||
end
|
||||
project.project_score.update_attribute(:changeset_num, count)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
class UpdateProjectScore < ActiveRecord::Migration
|
||||
def up
|
||||
project_count = Project.all.count / 30 + 2
|
||||
transaction do
|
||||
for i in 1 ... project_count do i
|
||||
Project.page(i).per(30).each do |project|
|
||||
puts project.id
|
||||
if ProjectScore.where("project_id=?", project.id).first.nil?
|
||||
puts "create project ==>#{project.id}"
|
||||
ProjectScore.create(:project_id => project.id, :score => false)
|
||||
end
|
||||
unless project.project_score.nil?
|
||||
# update boards
|
||||
unless project.boards.first.nil?
|
||||
boards_count = project.boards.first.topics.count
|
||||
project.project_score.update_attribute(:board_num, boards_count)
|
||||
end
|
||||
# update boards reply
|
||||
unless project.boards.first.nil?
|
||||
messages_count = Message.where("board_id =? and parent_id is not ?", project.boards.first.id, nil).count
|
||||
project.project_score.update_attribute(:board_message_num, messages_count)
|
||||
end
|
||||
# update issues
|
||||
unless project.issues.nil?
|
||||
issues_count = project.issues.count
|
||||
project.project_score.update_attribute(:issue_num, issues_count)
|
||||
end
|
||||
# update issue's journal
|
||||
# if !project.project_score.nil? && !project.project_score.issue_journal_num.nil?
|
||||
# project.project_score.update_attribute(:issue_journal_num, project.project_score.issue_journal_num)
|
||||
# end
|
||||
# update news
|
||||
unless project.news.nil?
|
||||
news_count = project.news.count
|
||||
project.project_score.update_attribute(:news_num, news_count)
|
||||
end
|
||||
# update attach
|
||||
unless project.attachments.nil?
|
||||
attachments_count = project.attachments.count
|
||||
project.project_score.update_attribute(:attach_num, attachments_count)
|
||||
end
|
||||
# update commits
|
||||
unless project.gpid.nil?
|
||||
g = Gitlab.client
|
||||
begin
|
||||
puts project.id
|
||||
count = g.project(project.gpid).commit_count
|
||||
rescue
|
||||
logger.error("The project's rep is not exit!")
|
||||
end
|
||||
project.project_score.update_attribute(:changeset_num, count)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
||||
|
|
2016
db/schema.rb
2016
db/schema.rb
File diff suppressed because it is too large
Load Diff
|
@ -1,63 +1,63 @@
|
|||
var enableAt = function(_editor) {
|
||||
var editor = _editor;
|
||||
if(editor.edit == undefined || editor.edit.iframe == undefined){
|
||||
return;
|
||||
}
|
||||
|
||||
var id = arguments[1] ? arguments[1] : undefined;
|
||||
var type = arguments[2] ? arguments[2] : 'Activity';
|
||||
|
||||
var ifr = editor.edit.iframe[0];
|
||||
var doc = ifr.contentDocument || iframe.contentWindow.document;
|
||||
var ifrBody = doc.body;
|
||||
//ifrBody.contentEditable = false;
|
||||
$(ifrBody).attr('enable_at', 'true');
|
||||
console.log("enable at");
|
||||
|
||||
//$.fn.atwho.debug = true;
|
||||
|
||||
|
||||
var names = [];
|
||||
if("undefined" !== (typeof atPersonLists)){
|
||||
names = atPersonLists;
|
||||
}
|
||||
|
||||
if('undefined' != (typeof id)){
|
||||
names = '/at/' + id + '.json?type='+type;
|
||||
}
|
||||
|
||||
//var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你", "가"];
|
||||
//
|
||||
//var names = $.map(names,function(value,i) {
|
||||
// return {'id':i,'name':value,'email':value+"@email.com"};
|
||||
//});
|
||||
|
||||
var at_config = {
|
||||
at: "@",
|
||||
data: names,
|
||||
insertTpl: '<span class="at" data-user-id="${userid}"><a href="/users/${userid}">@${name}(${login})</a></span>',
|
||||
displayTpl: "<li>${name} <small>${login}</small></li>",
|
||||
searchKey: 'searchKey',
|
||||
limit: 200
|
||||
};
|
||||
|
||||
console.log(_editor.options);
|
||||
|
||||
var input = $(ifrBody);
|
||||
|
||||
_editor.options.enable_at = (function(){
|
||||
var first = true;
|
||||
return function(){
|
||||
if(first){
|
||||
input.atwho(at_config);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
//$(ifrBody).atwho(at_config);
|
||||
|
||||
|
||||
//$inputor.caret('pos', 47);
|
||||
//$inputor.focus().atwho('run');
|
||||
};
|
||||
var enableAt = function(_editor) {
|
||||
var editor = _editor;
|
||||
if(editor.edit == undefined || editor.edit.iframe == undefined){
|
||||
return;
|
||||
}
|
||||
|
||||
var id = arguments[1] ? arguments[1] : undefined;
|
||||
var type = arguments[2] ? arguments[2] : 'Activity';
|
||||
|
||||
var ifr = editor.edit.iframe[0];
|
||||
var doc = ifr.contentDocument || iframe.contentWindow.document;
|
||||
var ifrBody = doc.body;
|
||||
//ifrBody.contentEditable = false;
|
||||
$(ifrBody).attr('enable_at', 'true');
|
||||
console.log("enable at");
|
||||
|
||||
//$.fn.atwho.debug = true;
|
||||
|
||||
|
||||
var names = [];
|
||||
if("undefined" !== (typeof atPersonLists)){
|
||||
names = atPersonLists;
|
||||
}
|
||||
|
||||
if('undefined' != (typeof id)){
|
||||
names = '/at/' + id + '.json?type='+type;
|
||||
}
|
||||
|
||||
//var names = ["Jacob","Isabella","Ethan","Emma","Michael","Olivia","Alexander","Sophia","William","Ava","Joshua","Emily","Daniel","Madison","Jayden","Abigail","Noah","Chloe","你好","你你你", "가"];
|
||||
//
|
||||
//var names = $.map(names,function(value,i) {
|
||||
// return {'id':i,'name':value,'email':value+"@email.com"};
|
||||
//});
|
||||
|
||||
var at_config = {
|
||||
at: "@",
|
||||
data: names,
|
||||
insertTpl: '<span class="at" data-user-id="${userid}"><a href="/users/${userid}">@${name}(${login})</a></span>',
|
||||
displayTpl: "<li>${name} <small>${login}</small></li>",
|
||||
searchKey: 'searchKey',
|
||||
limit: 200
|
||||
};
|
||||
|
||||
console.log(_editor.options);
|
||||
|
||||
var input = $(ifrBody);
|
||||
|
||||
_editor.options.enable_at = (function(){
|
||||
var first = true;
|
||||
return function(){
|
||||
if(first){
|
||||
input.atwho(at_config);
|
||||
first = false;
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
//$(ifrBody).atwho(at_config);
|
||||
|
||||
|
||||
//$inputor.caret('pos', 47);
|
||||
//$inputor.focus().atwho('run');
|
||||
};
|
||||
|
|
|
@ -1,77 +1,77 @@
|
|||
//<2F><><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD><D6AF>Ա<EFBFBD><D4B1><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>
|
||||
function submit_add_org_members(){
|
||||
$("#org_member_add_form").submit();
|
||||
}
|
||||
|
||||
function observeSearchfield(fieldId, targetId, url) {
|
||||
$('#'+fieldId).each(function() {
|
||||
var $this = $(this);
|
||||
$this.addClass('autocomplete');
|
||||
$this.attr('data-value-was', $this.val());
|
||||
var check = function() {
|
||||
var val = $this.val();
|
||||
if ($this.attr('data-value-was') != val){
|
||||
$this.attr('data-value-was', val);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
data: {q: $this.val()},
|
||||
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||
complete: function(){ $this.removeClass('ajax-loading'); }
|
||||
});
|
||||
}
|
||||
};
|
||||
var reset = function() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = setInterval(check, 300);
|
||||
}
|
||||
};
|
||||
var timer = setInterval(check, 300);
|
||||
$this.bind('keyup click mousemove', reset);
|
||||
});
|
||||
}
|
||||
|
||||
//显示更多的项目
|
||||
function show_more_org_project(url){
|
||||
$.get(
|
||||
url,
|
||||
{ page: $("#org_project_page_num").val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function show_more_org_course(url){
|
||||
$.get(
|
||||
url,
|
||||
{page: $("#org_course_page_num").val()},
|
||||
function (data){}
|
||||
);
|
||||
}
|
||||
|
||||
function search_tag_attachment(url,tag_name,q,course_id,sort)
|
||||
{
|
||||
//alert("111");
|
||||
//clearTimeout(clickFunction);
|
||||
clickFunction = setTimeout(function() {
|
||||
search_func()
|
||||
}, 500);
|
||||
function search_func(){
|
||||
if(isdb!= false ) return;
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
tag_name: tag_name,
|
||||
q: q,
|
||||
org_subfield_id:course_id
|
||||
},
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>֯<EFBFBD><D6AF>Ա<EFBFBD><D4B1><EFBFBD>ύ<EFBFBD><E1BDBB><EFBFBD><EFBFBD>
|
||||
function submit_add_org_members(){
|
||||
$("#org_member_add_form").submit();
|
||||
}
|
||||
|
||||
function observeSearchfield(fieldId, targetId, url) {
|
||||
$('#'+fieldId).each(function() {
|
||||
var $this = $(this);
|
||||
$this.addClass('autocomplete');
|
||||
$this.attr('data-value-was', $this.val());
|
||||
var check = function() {
|
||||
var val = $this.val();
|
||||
if ($this.attr('data-value-was') != val){
|
||||
$this.attr('data-value-was', val);
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'get',
|
||||
data: {q: $this.val()},
|
||||
success: function(data){ if(targetId) $('#'+targetId).html(data); },
|
||||
beforeSend: function(){ $this.addClass('ajax-loading'); },
|
||||
complete: function(){ $this.removeClass('ajax-loading'); }
|
||||
});
|
||||
}
|
||||
};
|
||||
var reset = function() {
|
||||
if (timer) {
|
||||
clearInterval(timer);
|
||||
timer = setInterval(check, 300);
|
||||
}
|
||||
};
|
||||
var timer = setInterval(check, 300);
|
||||
$this.bind('keyup click mousemove', reset);
|
||||
});
|
||||
}
|
||||
|
||||
//显示更多的项目
|
||||
function show_more_org_project(url){
|
||||
$.get(
|
||||
url,
|
||||
{ page: $("#org_project_page_num").val() },
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function show_more_org_course(url){
|
||||
$.get(
|
||||
url,
|
||||
{page: $("#org_course_page_num").val()},
|
||||
function (data){}
|
||||
);
|
||||
}
|
||||
|
||||
function search_tag_attachment(url,tag_name,q,course_id,sort)
|
||||
{
|
||||
//alert("111");
|
||||
//clearTimeout(clickFunction);
|
||||
clickFunction = setTimeout(function() {
|
||||
search_func()
|
||||
}, 500);
|
||||
function search_func(){
|
||||
if(isdb!= false ) return;
|
||||
$.get(
|
||||
url,
|
||||
{
|
||||
tag_name: tag_name,
|
||||
q: q,
|
||||
org_subfield_id:course_id
|
||||
},
|
||||
function (data) {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -93,16 +93,15 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
|
|||
/*转发样式*/
|
||||
.shareDP {width:415px; height:auto; border:3px solid #269ac9; padding-left:16px; padding-bottom:16px; background-color:#ffffff; position:absolute; z-index:1000;}
|
||||
.shareArrow {background:url(../images/arrowList.png) -90px -108px no-repeat; display:inline-block; width:5px; height:10px; margin-right:3px;}
|
||||
.sectionWrap {float:left; max-height:150px; margin-bottom:10px; overflow:auto; overflow-x:hidden; width:220px; background-color:#f1f1f1; min-height:150px; padding-top:5px;}
|
||||
.sectionWrap {float:left; max-height:150px; margin-bottom:10px; overflow:auto; overflow-x:hidden; width:220px; min-height:150px; padding-top:5px;}
|
||||
.columnWrap {float:left; max-height:148px; margin-bottom:10px; overflow:auto; overflow-x:hidden; width:178px; background-color:#fffff; min-height:148px; padding-top:5px; border:1px solid #f1f1f1;}
|
||||
.columnWrap li {padding-left:10px; color:#585858;}
|
||||
.columnWrap span {width:150px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; display:inline-block;}
|
||||
.sectionRow:hover {background-color:#cccccc; cursor:pointer;}
|
||||
.sectionContent {display:none;}
|
||||
.sectionContent li {padding-left:30px;}
|
||||
.sectionContent li:hover {background-color:#cccccc; cursor:pointer;}
|
||||
.sectionContent span {width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:18px; vertical-align:middle;}.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px;
|
||||
background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
|
||||
.sectionContent {}
|
||||
.sectionContent li {padding-left:10px; line-height:20px;}
|
||||
.sectionContent li:hover {background-color:#cccccc;}
|
||||
.sectionContent span {width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:20px; vertical-align:top;}
|
||||
.org_login_list a {color:#269ac9;}
|
||||
div.flash {margin-top :0px !important}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,53 +1,53 @@
|
|||
/*151228样式更新*/
|
||||
.menuSetting {background:url(../images/hwork_icon.png) -5px -303px no-repeat; display:inline-block; width:20px; height:20px;}
|
||||
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
a.greyBtn{ display:inline-block; background:#f2f3f3; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#888888; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.greyBtn{border:1px solid #888888; }
|
||||
a.blueBtn{ display:inline-block; background:#269ac9; padding:0px 5px; height:20px; border:1px solid #269ac9; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a.blueBtn:hover {background-color:#298fbd;}
|
||||
a.cancelBtn{ display:inline-block; background:#c1c1c1; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a.cancelBtn:hover {background:#888888;}
|
||||
a.userFollow{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.userFollow{border:1px solid #888888; }
|
||||
a.userCancel{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.userCancel{border:1px solid #888888; }
|
||||
.pAbsolute {position:absolute; z-index:999;}
|
||||
.userAvatarWrap {width:50px; height:50px; position:relative; border:1px solid #cbcbcb; padding: 2px;}
|
||||
.userAvatarWrap:hover {border:1px solid #269ac9;}
|
||||
.mr27 {margin-right:27px;}
|
||||
.userCard {width:208px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px; padding:15px; top:-176px; left:-95px; position:absolute; z-index:999; display:none;}
|
||||
.userCard font {display:block; border-width:8px; position:absolute; bottom:-16px; left:110px; border-style:solid dashed dashed dashed; border-color:#FFF transparent transparent transparent; font-size:0; line-height:0;}
|
||||
.userCard em {display:block; border-width:8px; position:absolute; bottom:-17px; left:110px; border-style:solid dashed dashed dashed; border-color:#eaeaea transparent transparent transparent; font-size:0; line-height:0;}
|
||||
.userCardM {width:201px; height:20px; border:1px solid #dddddd; resize:none;}
|
||||
.praviteC {background:url(../images/hwork_icon.png) -79px -255px no-repeat;}
|
||||
.praviteCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;}
|
||||
.publicC {background:url(../images/hwork_icon.png) -79px -125px no-repeat;}
|
||||
.publicCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;}
|
||||
.shild {background:url(../images/hwork_icon.png) -6px -354px no-repeat;}
|
||||
.shildP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;}
|
||||
ul.shild:hover li ul {display:block;}
|
||||
.subNavArrow {background:url(../images/hwork_icon.png) -82px -399px no-repeat; display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;}
|
||||
ul.subNavArrow:hover li ul {display:block;}
|
||||
.subNavMenu {line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:20px; top:-10px; padding:5px 0px; display:none; z-index:999;}
|
||||
.subNavRow {padding:0px 15px; width:70px;}
|
||||
.w48 {width:48px;}
|
||||
|
||||
a.mesIcon {background:url(../images/mes_icon.png) -5px -73px no-repeat; padding-left:23px;}
|
||||
a.personalIcon {background:url(../images/mes_icon.png) -6px -16px no-repeat; padding-left:23px;}
|
||||
.mesType {background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 15px; left:-50px; font-size:12px; color:#888888; display:none; line-height:2; z-index:999; white-space:nowrap;}
|
||||
a.greyBtn2 {float:right; text-align:center; font-size:12px; color:#ffffff; background-color:#cecece; padding:3px 10px;}
|
||||
.PMTag {padding:0px 5px; background-color:#555555; border-radius:3px; color:#ffffff;}
|
||||
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
|
||||
.upload_box{ width:430px; margin:15px auto;}
|
||||
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
|
||||
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
|
||||
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
|
||||
|
||||
a.resourcesTypeAll {background:url(images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;}
|
||||
|
||||
.mediaIcon {background:url(../images/hwork_icon.png) -5px -160px no-repeat; padding-left:23px;}
|
||||
.codeIcon {background:url(../images/hwork_icon.png) -78px -160px no-repeat; padding-left:23px;}
|
||||
.othersIcon {background:url(../images/hwork_icon.png) -3px -210px no-repeat; padding-left:23px;}
|
||||
.thesisIcon {background:url(../images/hwork_icon.png) -78px -212px no-repeat; padding-left:23px;}
|
||||
/*151228样式更新*/
|
||||
.menuSetting {background:url(../images/hwork_icon.png) -5px -303px no-repeat; display:inline-block; width:20px; height:20px;}
|
||||
.boxShadow {box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5);}
|
||||
a.greyBtn{ display:inline-block; background:#f2f3f3; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#888888; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.greyBtn{border:1px solid #888888; }
|
||||
a.blueBtn{ display:inline-block; background:#269ac9; padding:0px 5px; height:20px; border:1px solid #269ac9; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a.blueBtn:hover {background-color:#298fbd;}
|
||||
a.cancelBtn{ display:inline-block; background:#c1c1c1; padding:0px 5px; height:20px; border:1px solid #d3d3d3; color:#ffffff; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a.cancelBtn:hover {background:#888888;}
|
||||
a.userFollow{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -9px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.userFollow{border:1px solid #888888; }
|
||||
a.userCancel{ display:inline-block; width:55px; height:20px; border:1px solid #d3d3d3; color:#888888; background:#f2f3f3 url(../images/homepage_icon2.png) -177px -6px no-repeat; padding-left:25px; line-height:1.9;-moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px;}
|
||||
a:hover.userCancel{border:1px solid #888888; }
|
||||
.pAbsolute {position:absolute; z-index:999;}
|
||||
.userAvatarWrap {width:50px; height:50px; position:relative; border:1px solid #cbcbcb; padding: 2px;}
|
||||
.userAvatarWrap:hover {border:1px solid #269ac9;}
|
||||
.mr27 {margin-right:27px;}
|
||||
.userCard {width:208px; border:1px solid #dddddd; background-color:#ffffff; margin-top:10px; padding:15px; top:-176px; left:-95px; position:absolute; z-index:999; display:none;}
|
||||
.userCard font {display:block; border-width:8px; position:absolute; bottom:-16px; left:110px; border-style:solid dashed dashed dashed; border-color:#FFF transparent transparent transparent; font-size:0; line-height:0;}
|
||||
.userCard em {display:block; border-width:8px; position:absolute; bottom:-17px; left:110px; border-style:solid dashed dashed dashed; border-color:#eaeaea transparent transparent transparent; font-size:0; line-height:0;}
|
||||
.userCardM {width:201px; height:20px; border:1px solid #dddddd; resize:none;}
|
||||
.praviteC {background:url(../images/hwork_icon.png) -79px -255px no-repeat;}
|
||||
.praviteCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;}
|
||||
.publicC {background:url(../images/hwork_icon.png) -79px -125px no-repeat;}
|
||||
.publicCP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; left:25px;}
|
||||
.shild {background:url(../images/hwork_icon.png) -6px -354px no-repeat;}
|
||||
.shildP {display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;}
|
||||
ul.shild:hover li ul {display:block;}
|
||||
.subNavArrow {background:url(../images/hwork_icon.png) -82px -399px no-repeat; display:inline-block; width:20px; height:20px; position:absolute; top:10px; right:0px;}
|
||||
ul.subNavArrow:hover li ul {display:block;}
|
||||
.subNavMenu {line-height:2; font-size:12px; color:#616060; background-color:#ffffff; border:1px solid #eaeaea; border-radius:3px; position:absolute; left:20px; top:-10px; padding:5px 0px; display:none; z-index:999;}
|
||||
.subNavRow {padding:0px 15px; width:70px;}
|
||||
.w48 {width:48px;}
|
||||
|
||||
a.mesIcon {background:url(../images/mes_icon.png) -5px -73px no-repeat; padding-left:23px;}
|
||||
a.personalIcon {background:url(../images/mes_icon.png) -6px -16px no-repeat; padding-left:23px;}
|
||||
.mesType {background-color:#ffffff; float:left; list-style:none; position:absolute; border:1px solid #eaeaea; border-radius:5px; top:15px; padding:10px 15px; left:-50px; font-size:12px; color:#888888; display:none; line-height:2; z-index:999; white-space:nowrap;}
|
||||
a.greyBtn2 {float:right; text-align:center; font-size:12px; color:#ffffff; background-color:#cecece; padding:3px 10px;}
|
||||
.PMTag {padding:0px 5px; background-color:#555555; border-radius:3px; color:#ffffff;}
|
||||
.upload_con h2{ display:block; background:#eaeaea; font-size:14px; color:#343333; height:31px; width: auto; margin-top:25px; padding-left:20px; padding-top:5px;}
|
||||
.upload_box{ width:430px; margin:15px auto;}
|
||||
a.grey_btn{ background:#d9d9d9; color:#656565;font-size:14px; font-weight:normal; text-align:center; margin-left:10px; margin-bottom:10px; padding:2px 10px;}
|
||||
a.blue_btn{background:#64bdd9;color:#fff;font-size:14px; font-weight:normal; padding:2px 8px; text-align:center;cursor: pointer;}
|
||||
.homepageImageSex {top:116px; left:5px; width:20px; height:20px; background:url(../images/homepage_icon.png) -10px -112px no-repeat; float:left;}
|
||||
.homepageImageName {font-size:16px; color:#484848; margin-left:15px; margin-right:8px; height:21px; float:left;}
|
||||
|
||||
a.resourcesTypeAll {background:url(images/homepage_icon.png) -180px -89px no-repeat; padding-left:23px;}
|
||||
|
||||
.mediaIcon {background:url(../images/hwork_icon.png) -5px -160px no-repeat; padding-left:23px;}
|
||||
.codeIcon {background:url(../images/hwork_icon.png) -78px -160px no-repeat; padding-left:23px;}
|
||||
.othersIcon {background:url(../images/hwork_icon.png) -3px -210px no-repeat; padding-left:23px;}
|
||||
.thesisIcon {background:url(../images/hwork_icon.png) -78px -212px no-repeat; padding-left:23px;}
|
||||
.softwareIcon {background:url(../images/hwork_icon.png) -5px -254px no-repeat; padding-left:23px;}
|
|
@ -1,5 +1,5 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubfieldSubdomainDirsController, :type => :controller do
|
||||
|
||||
end
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubfieldSubdomainDirsController, :type => :controller do
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :subfield_subdomain_dir do
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
FactoryGirl.define do
|
||||
factory :subfield_subdomain_dir do
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubfieldSubdomainDir, :type => :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe SubfieldSubdomainDir, :type => :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue