Merge branch 'develop' into cxt_course
This commit is contained in:
commit
2685e263d0
|
@ -33,3 +33,4 @@ vendor/cache
|
|||
/tags
|
||||
/config/initializers/gitlab_config.rb
|
||||
1234567
|
||||
public/javascripts/wechat/node_modules/
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#coding=utf-8
|
||||
|
||||
module Mobile
|
||||
require_relative 'middleware/error_handler'
|
||||
require_relative 'apis/auth'
|
||||
|
@ -29,16 +31,22 @@ module Mobile
|
|||
end
|
||||
|
||||
def authenticate!
|
||||
raise('Unauthorized. Invalid or expired token.') unless current_user
|
||||
raise('Unauthorized. 用户认证失败.') unless current_user
|
||||
end
|
||||
|
||||
def current_user
|
||||
openid = params[:openid]
|
||||
if openid
|
||||
uw = UserWechat.find_by_openid(params[:openid])
|
||||
return uw.user if uw
|
||||
end
|
||||
|
||||
token = ApiKey.where(access_token: params[:token]).first
|
||||
if token && !token.expired?
|
||||
@current_user = User.find(token.user_id)
|
||||
else
|
||||
nil
|
||||
return User.find(token.user_id)
|
||||
end
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ module Mobile
|
|||
requires :openid, type: String
|
||||
end
|
||||
post do
|
||||
user = UserWechat.find_by_openid(params[:openid]).user
|
||||
authenticate!
|
||||
|
||||
user = current_user
|
||||
|
||||
shield_project_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.select("shield_id").where("container_type='User' and container_id=#{user.id} and shield_type='Course'").map(&:shield_id)
|
||||
|
|
|
@ -97,7 +97,6 @@ module Mobile
|
|||
|
||||
desc "加入课程"
|
||||
params do
|
||||
requires :token, type: String
|
||||
requires :course_password, type: String
|
||||
end
|
||||
post ":id" do
|
||||
|
|
|
@ -916,4 +916,11 @@ class ApplicationController < ActionController::Base
|
|||
call_hook(:controller_account_success_authentication_after, {:user => user })
|
||||
end
|
||||
|
||||
def user_unlogged_check
|
||||
if !User.current.logged?
|
||||
render(:partial => 'organizations/unlogged_tip')
|
||||
return false
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -265,6 +265,10 @@ class AttachmentsController < ApplicationController
|
|||
@history.save #历史记录保存完毕
|
||||
#将最新保存的记录 数据替换到 需要修改的文件记录
|
||||
@old_attachment.attributes = @attachment.attributes.dup.except("id","container_id","container_type","is_public","downloads", "quotes")
|
||||
# 如果附件描述被修改,则保存附件
|
||||
unless params[:description] == @attachment.description
|
||||
@old_attachment.description = params[:description]
|
||||
end
|
||||
@old_attachment.save
|
||||
#删除当前记录
|
||||
@attachment.delete
|
||||
|
|
|
@ -49,6 +49,11 @@ class ExerciseController < ApplicationController
|
|||
return
|
||||
end
|
||||
@exercise = Exercise.find params[:id]
|
||||
@exercise.course_messages.each do |message|
|
||||
if User.current.id == message.user_id && message.viewed == 0
|
||||
message.update_attributes(:viewed => true) if message.viewed == 0
|
||||
end
|
||||
end
|
||||
@is_teacher = User.current.allowed_to?(:as_teacher,@course) || User.current.admin?
|
||||
exercise_end = @exercise.end_time > Time.now
|
||||
if @exercise.time == -1
|
||||
|
|
|
@ -26,7 +26,7 @@ class FilesController < ApplicationController
|
|||
before_filter :authorize, :except => [:create,:getattachtype,:quote_resource_show,:search,:searchone4reload,:search_project,:quote_resource_show_project,
|
||||
:search_tag_attachment,:subfield_upload_file,:search_org_subfield_tag_attachment,
|
||||
:search_tag_attachment,:quote_resource_show_org_subfield,:find_org_subfield_attache,
|
||||
:search_files_in_subfield,:upload_files_menu,:file_hidden,:republish_file]
|
||||
:search_files_in_subfield,:upload_files_menu,:file_hidden,:republish_file,:update_file_description]
|
||||
|
||||
helper :sort
|
||||
include SortHelper
|
||||
|
@ -483,6 +483,7 @@ class FilesController < ApplicationController
|
|||
if !attachments.empty? && attachments[:files] && tag_name != ""
|
||||
attachments[:files].each do |attachment|
|
||||
attachment.tag_list.add(tag_name)
|
||||
attachment.description = params[:description]
|
||||
attachment.save
|
||||
end
|
||||
end
|
||||
|
@ -493,6 +494,7 @@ class FilesController < ApplicationController
|
|||
if !attachments.empty? && attachments[:files] && tag_name != ""
|
||||
attachments[:files].each do |attachment|
|
||||
attachment.tag_list.add(tag_name)
|
||||
attachment.description = params[:description]
|
||||
attachment.save
|
||||
end
|
||||
end
|
||||
|
@ -600,6 +602,7 @@ class FilesController < ApplicationController
|
|||
if !attachments.empty? && attachments[:files] && tag_name != ""
|
||||
attachments[:files].each do |attachment|
|
||||
attachment.tag_list.add(tag_name)
|
||||
attachment.description = params[:description]
|
||||
attachment.save
|
||||
end
|
||||
end
|
||||
|
@ -610,6 +613,7 @@ class FilesController < ApplicationController
|
|||
if !attachments.empty? && attachments[:files] && tag_name != ""
|
||||
attachments[:files].each do |attachment|
|
||||
attachment.tag_list.add(tag_name)
|
||||
attachment.description = params[:description]
|
||||
attachment.save
|
||||
end
|
||||
end
|
||||
|
@ -911,5 +915,10 @@ class FilesController < ApplicationController
|
|||
|
||||
def upload_files_menu
|
||||
|
||||
end
|
||||
end
|
||||
def update_file_description
|
||||
@attachment = Attachment.find(params[:id])
|
||||
@attachment.description = params[:description]
|
||||
@attachment.save
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class OrgDocumentCommentsController < ApplicationController
|
||||
before_filter :find_organization, :only => [:new, :create, :show, :index]
|
||||
before_filter :authorize_allowed, :only => [:create]
|
||||
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
||||
helper :attachments,:organizations
|
||||
layout 'base_org'
|
||||
|
||||
|
@ -38,6 +38,11 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
|
||||
def show
|
||||
@document = OrgDocumentComment.find(params[:id])
|
||||
@org_subfield = OrgSubfield.where(:id => @document.org_subfield_id).first
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
respond_to do |format|
|
||||
format.html {render :layout => (@organization.switch_type && @document && !@document.org_subfield_id.blank?) ? 'base_org_custom' : 'base_org'}
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
@ -91,7 +96,12 @@ class OrgDocumentCommentsController < ApplicationController
|
|||
def add_reply_in_doc
|
||||
@document = OrgDocumentComment.find(params[:id]).root
|
||||
@comment = OrgDocumentComment.new(:organization_id => @document.organization_id, :creator_id => User.current.id, :reply_id => params[:id])
|
||||
@comment.content = params[:org_comment][:org_content]
|
||||
if params[:org_comment].blank?
|
||||
@comment.content = params[:org_content]
|
||||
else
|
||||
@comment.content = params[:org_comment][:org_content]
|
||||
end
|
||||
|
||||
@document.children << @comment
|
||||
@document.save
|
||||
respond_to do |format|
|
||||
|
|
|
@ -9,14 +9,15 @@ class OrgSubfieldsController < ApplicationController
|
|||
@subfield = OrgSubfield.create(:name => params[:name], :organization_id => params[:organization_id], :priority => @organization.org_subfields.order("priority").last.priority + 1)
|
||||
if !params[:sub_dir].blank?
|
||||
sql = "select subfield_subdomain_dirs.* from subfield_subdomain_dirs, org_subfields where subfield_subdomain_dirs.org_subfield_id = org_subfields.id "+
|
||||
"and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'"
|
||||
"and org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir]}'"
|
||||
if SubfieldSubdomainDir.find_by_sql(sql).count == 0
|
||||
SubfieldSubdomainDir.create(:org_subfield_id => @subfield.id, :name => params[:sub_dir].downcase)
|
||||
end
|
||||
end
|
||||
@subfield.update_attributes(:field_type => params[:field_type])
|
||||
#默认类型为帖子
|
||||
@subfield.update_attributes(:field_type => params[:field_type]||"Post")
|
||||
# admin配置的类型
|
||||
update_status_by_type(@subfield, params[:field_type])
|
||||
update_status_by_type(@subfield, params[:field_type]||"Post")
|
||||
else
|
||||
@res = false
|
||||
end
|
||||
|
@ -56,6 +57,10 @@ class OrgSubfieldsController < ApplicationController
|
|||
@org_subfield = OrgSubfield.find_by_sql("select distinct org_subfields.* from org_subfields,"+
|
||||
"subfield_subdomain_dirs where org_subfields.id = subfield_subdomain_dirs.org_subfield_id and "+
|
||||
" org_subfields.organization_id=#{@organization.id} and subfield_subdomain_dirs.name='#{params[:sub_dir_name]}'").first
|
||||
if @org_subfield.nil?
|
||||
render_404
|
||||
return
|
||||
end
|
||||
if @org_subfield.field_type == 'Post'
|
||||
@org_subfield_ids = @org_subfield.org_document_comments.map(&:id) << 0
|
||||
@org_activities = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{@org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{@org_subfield.id})").order('updated_at desc').page(params[:page] || 1).per(10)
|
||||
|
|
|
@ -28,8 +28,9 @@ class OrganizationsController < ApplicationController
|
|||
helper :project_score
|
||||
helper :issues
|
||||
include UsersHelper
|
||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses]
|
||||
before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
|
||||
include OrganizationsHelper
|
||||
before_filter :find_organization, :only => [:show, :members, :apply_subdomain, :select_org_layout, :teachers, :students, :projects, :courses, :acts]
|
||||
# before_filter :allow_as_admin, :only => [:students, :teachers, :projects, :courses, :acts]
|
||||
layout 'base_org'
|
||||
def index
|
||||
|
||||
|
@ -77,8 +78,12 @@ class OrganizationsController < ApplicationController
|
|||
|
||||
def show
|
||||
# 组织新类型 show_mode:判断标准 1为新类型,0为旧
|
||||
if @organization.switch_type && params[:org_subfield_id].nil? && params[:list] .nil?
|
||||
if @organization.switch_type && params[:list] .nil?
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
unless params[:org_subfield_id].nil?
|
||||
@org_subfield = OrgSubfield.where(:id => params[:org_subfield_id]).first
|
||||
@subfield_acts = get_subfield_acts(@org_subfield)
|
||||
end
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
|
||||
|
@ -175,7 +180,7 @@ class OrganizationsController < ApplicationController
|
|||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comptec").first : OrgSubfield.find(params[:org_subfield_id])
|
||||
@type = params[:type]
|
||||
if @type == "courses" || @type.nil?
|
||||
if @type.blank?
|
||||
@org_teachers = User.find_by_sql("select u.*, ue.technical_title, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity=0 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
||||
elsif @type == "famous"
|
||||
|
@ -199,7 +204,7 @@ class OrganizationsController < ApplicationController
|
|||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
||||
@type = params[:type]
|
||||
if @type == "courses" || @type.nil?
|
||||
if @type.blank?
|
||||
@org_students = User.find_by_sql("select u.*, ue.student_id, ue.school_id,(select count(*) from courses where courses.tea_id = u.id) as course_count
|
||||
from users u, user_extensions ue where u.id = ue.user_id and ue.identity= 1 and concat(lastname,firstname,login) like '%#{q}%' order by course_count desc")
|
||||
elsif @type == "famous"
|
||||
|
@ -235,7 +240,7 @@ class OrganizationsController < ApplicationController
|
|||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Comppro").first : OrgSubfield.find(params[:org_subfield_id])
|
||||
@type = params[:type]
|
||||
if @type.nil?
|
||||
if @type.blank?
|
||||
@containers = Project.find_by_sql("select p.*, (select count(*) from forge_activities where forge_activities.project_id = p.id) as project_count
|
||||
from projects p where p.status =1 and p.is_public =1 and name like '%#{q}%' order by project_count desc;")
|
||||
elsif @type == "famous"
|
||||
|
@ -249,7 +254,7 @@ class OrganizationsController < ApplicationController
|
|||
q = params[:search].nil? ? "" : "#{params[:search].strip}"
|
||||
@field = params[:org_subfield_id].nil? ? OrgSubfield.where("organization_id =? and field_type =?", params[:id].to_i, "Compstu").first : OrgSubfield.find(params[:org_subfield_id])
|
||||
@type = params[:type]
|
||||
if @type.nil?
|
||||
if @type.blank?
|
||||
@containers = Course.find_by_sql("select c.*, (select count(*) from course_activities where course_activities.course_id = c.id) as course_count
|
||||
from courses c where c.is_delete =0 and c.is_public =1 and name like '%#{q}%' order by course_count desc;")
|
||||
elsif @type == "famous"
|
||||
|
@ -260,6 +265,19 @@ class OrganizationsController < ApplicationController
|
|||
end
|
||||
|
||||
def acts
|
||||
@subfield_content = @organization.org_subfields.order("priority")
|
||||
@org_subfield = OrgSubfield.where(:id => params[:org_subfield_id]).first
|
||||
shield_project_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Project'").map(&:shield_id)
|
||||
shield_course_ids = ShieldActivity.where("container_type='Organization' and container_id=#{@organization.id} and shield_type='Course'").map(&:shield_id)
|
||||
project_ids = (@organization.projects.map(&:id) - shield_project_ids) << 0
|
||||
course_ids = (@organization.courses.map(&:id) - shield_course_ids) << 0
|
||||
@org_acts = UserActivity.find_by_sql("SELECT * FROM `user_activities` where act_type in ('HomeworkCommon', 'News', 'Message', 'Issue') and
|
||||
((container_type = 'Course' and container_id in (#{course_ids.join(',')})) or (container_type = 'Project' and container_id in (#{project_ids.join(',')})))
|
||||
order by created_at desc limit 6;")
|
||||
respond_to do |format|
|
||||
format.html{render :layout => 'base_org_custom'}
|
||||
format.js
|
||||
end
|
||||
end
|
||||
|
||||
def searchmember_by_name members, name
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
class PraiseTreadController < ApplicationController
|
||||
|
||||
accept_api_auth :tread_plus,:praise_plus
|
||||
before_filter :require_login,:only => [:praise_plus,:tread_plus]
|
||||
# before_filter :require_login,:only => [:praise_plus,:tread_plus]
|
||||
before_filter :user_unlogged_check,:only => [:praise_plus,:tread_plus,:praise_minus]
|
||||
|
||||
def praise_plus
|
||||
@obj = nil
|
||||
@activity = false
|
||||
|
||||
if request.get?
|
||||
@obj_id = params[:obj_id]
|
||||
@obj_type = params[:obj_type]
|
||||
|
|
|
@ -325,13 +325,10 @@ update
|
|||
|
||||
def show
|
||||
## TODO: the below will move to filter, done.
|
||||
if !User.current.member_of?(@project)
|
||||
if @project.hidden_repo
|
||||
render_403
|
||||
return -1
|
||||
end
|
||||
if !User.current.member_of?(@project) && @project.hidden_repo
|
||||
render_403
|
||||
return
|
||||
end
|
||||
|
||||
@entries = @repository.entries(@path, @rev)
|
||||
@changeset = @repository.find_changeset_by_name(@rev)
|
||||
if request.xhr?
|
||||
|
@ -363,7 +360,7 @@ update
|
|||
# ip = RepositoriesHelper::REPO_IP_ADDRESS
|
||||
gitlab_address = Redmine::Configuration['gitlab_address']
|
||||
# REDO:需优化,仅测试用
|
||||
@zip_path = gitlab_address.to_s + "/api/v3/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=YTyCv4978MXmdL2B9C62"
|
||||
@zip_path = Gitlab.endpoint.to_s + "/projects/" + @project.gpid.to_s + "/repository/archive?&private_token=" + Gitlab.private_token
|
||||
if @repository.type.to_s == "Repository::Gitlab"
|
||||
@repos_url = gitlab_address.to_s+"/"+@project.owner.to_s+"/"+@repository.identifier+"."+"git"
|
||||
else
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
class SubDocumentCommentsController < ApplicationController
|
||||
before_filter :find_subdomain_and_subfield, :only => [:new, :create, :show, :index, :destroy, :edit]
|
||||
before_filter :find_subfield_content, :only => [:show, :index]
|
||||
before_filter :authorize_allowed, :only => [:create]
|
||||
before_filter :authorize_allowed, :only => [:create, :add_reply]
|
||||
helper :attachments,:organizations
|
||||
layout 'base_sub_domain'
|
||||
layout 'base_org_custom'
|
||||
|
||||
def new
|
||||
@sub_document_comment = SubDocumentComment.new
|
||||
|
@ -41,7 +41,7 @@ class SubDocumentCommentsController < ApplicationController
|
|||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
@document = SubDocumentComment.find(params[:id])
|
||||
respond_to do |format|
|
||||
format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'}
|
||||
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
|
@ -58,7 +58,7 @@ class SubDocumentCommentsController < ApplicationController
|
|||
@offset ||= @atta_pages.offset
|
||||
@documents = paginateHelper @documents,20
|
||||
respond_to do |format|
|
||||
format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'}
|
||||
format.html {render :layout => @organization.switch_type ? 'base_org_custom' : 'base_org'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
|
|
|
@ -132,7 +132,7 @@ class UsersController < ApplicationController
|
|||
# 未读的消息存放在数组
|
||||
mess = message_all.message
|
||||
if (message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)) || (message_all.message_type == "SystemMessage"&& !mess.nil? && mess.created_at > onclick_time)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
break if @message_alls.length == 5
|
||||
|
@ -166,7 +166,7 @@ class UsersController < ApplicationController
|
|||
messages = MessageAll.where("(user_id =? and message_type !=?) or message_type =?" ,@user.id, "SystemMessage", "SystemMessage").includes(:message).order("created_at desc")
|
||||
messages.each do |message_all|
|
||||
mess = message_all.message
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
|
@ -177,7 +177,7 @@ class UsersController < ApplicationController
|
|||
# 在点击或者刷新消息列表后未读的消息存放在数组
|
||||
mess = message_all.message
|
||||
if message_all.message_type != "SystemMessage"&& !mess.nil? && (mess.viewed == 0 || !mess.viewed)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course.is_delete == 1)
|
||||
unless (message_all.message_type == 'CourseMessage' && mess && mess.course && mess.course.is_delete == 1)
|
||||
@message_alls << mess
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1080,7 +1080,7 @@ module ApplicationHelper
|
|||
elsif @user
|
||||
title << @user.try(:realname)
|
||||
else
|
||||
title << User.current.try(:realname)
|
||||
title << (User.current.id == 2 ? "未登录" : User.current.try(:realname))
|
||||
end
|
||||
if first_page.nil? || first_page.web_title.nil?
|
||||
title << Setting.app_title unless Setting.app_title == title.last
|
||||
|
|
|
@ -66,52 +66,102 @@ module OrganizationsHelper
|
|||
def org_user_by_type obj
|
||||
case obj.act_type
|
||||
when "Message"
|
||||
user = obj.act.author
|
||||
obj.act.author
|
||||
when "News"
|
||||
user = obj.act.author
|
||||
obj.act.author
|
||||
when "HomeworkCommon"
|
||||
user = obj.act.user
|
||||
obj.act.user
|
||||
when "Issue"
|
||||
user = obj.act.author
|
||||
obj.act.author
|
||||
end
|
||||
end
|
||||
|
||||
def org_title_by_type obj
|
||||
case obj.act_type
|
||||
when "Message"
|
||||
user = obj.act.parent_id.nil? ? obj.act.subject : obj.act.parent.subject
|
||||
obj.act.parent_id.nil? ? obj.act.subject : obj.act.parent.subject
|
||||
when "News"
|
||||
user = obj.act.title
|
||||
obj.act.title
|
||||
when "HomeworkCommon"
|
||||
user = obj.act.name
|
||||
obj.act.name
|
||||
when "Issue"
|
||||
user = obj.act.subject
|
||||
obj.act.subject
|
||||
end
|
||||
end
|
||||
|
||||
def org_content_by_type obj
|
||||
case obj.act_type
|
||||
when "Message"
|
||||
user = obj.act.parent_id.nil? ? obj.act.content : obj.act.parent.content
|
||||
obj.act.parent_id.nil? ? obj.act.content : obj.act.parent.content
|
||||
when "News"
|
||||
user = obj.act.description
|
||||
obj.act.description
|
||||
when "HomeworkCommon"
|
||||
user = obj.act.description
|
||||
obj.act.description
|
||||
when "Issue"
|
||||
user = obj.act.description
|
||||
obj.act.description
|
||||
end
|
||||
end
|
||||
|
||||
def org_time_by_type obj
|
||||
case obj.act_type
|
||||
when "Message"
|
||||
time = obj.act.updated_on
|
||||
obj.act.created_on
|
||||
when "News"
|
||||
user = obj.act.created_on
|
||||
obj.act.created_on
|
||||
when "HomeworkCommon"
|
||||
user = obj.act.updated_at
|
||||
obj.act.created_at
|
||||
when "Issue"
|
||||
user = obj.act.updated_on
|
||||
obj.act.created_on
|
||||
end
|
||||
end
|
||||
|
||||
def org_reply_count_type obj
|
||||
case obj.act_type
|
||||
when "HomeworkCommon"
|
||||
obj.act.journals_for_messages.count
|
||||
when "Issue"
|
||||
obj.act.journals.count
|
||||
when "Message"
|
||||
obj.act.children.count
|
||||
when "News"
|
||||
obj.act.comments_count
|
||||
end
|
||||
end
|
||||
|
||||
# 组织的栏目类型标题
|
||||
def subfield_title_type obj
|
||||
case obj.org_act_type
|
||||
when "OrgDocumentComment"
|
||||
obj.org_act.title
|
||||
when "Message"
|
||||
obj.org_act.parent_id.nil? ? obj.org_act.subject : obj.org_act.parent.subject
|
||||
when "News"
|
||||
obj.org_act.title
|
||||
when "Issue"
|
||||
obj.org_act.subject
|
||||
end
|
||||
end
|
||||
|
||||
# 组织的栏目类型时间
|
||||
def subfield_time_type obj
|
||||
case obj.org_act_type
|
||||
when "OrgDocumentComment"
|
||||
obj.org_act.updated_at
|
||||
when "Message"
|
||||
obj.org_act.updated_on
|
||||
when "News"
|
||||
obj.org_act.created_on
|
||||
end
|
||||
end
|
||||
|
||||
def subfield_reply_count_type obj
|
||||
case obj.org_act_type
|
||||
when "OrgDocumentComment"
|
||||
obj.org_act.children.count
|
||||
when "Message"
|
||||
obj.org_act.children.count
|
||||
when "News"
|
||||
obj.org_act.comments_count
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -178,17 +228,19 @@ module OrganizationsHelper
|
|||
|
||||
# 系统栏目只有管理员才能看到
|
||||
def subfield_to_addmin?(org)
|
||||
if User.current.admin?
|
||||
@organization.org_subfields.order("priority")
|
||||
else
|
||||
@organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
|
||||
end
|
||||
# if User.current.admin?
|
||||
@organization.org_subfields.order("priority")
|
||||
# else
|
||||
# @organization.org_subfields.select { |os| (os.field_type != "Comptec" && os.field_type != "Compstu" && os.field_type != "Comppro" && os.field_type != "Compcou" && os.field_type != "Compact") }.sort_by {|os| os.priority}
|
||||
# end
|
||||
end
|
||||
|
||||
def get_subfield_acts field
|
||||
org_subfield = OrgSubfield.find(field.id)
|
||||
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
|
||||
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
|
||||
unless field.nil?
|
||||
org_subfield = OrgSubfield.find(field.id)
|
||||
org_subfield_ids = org_subfield.org_document_comments.map(&:id) << 0
|
||||
org_acts = OrgActivity.where("(org_act_type='OrgDocumentComment'and org_act_id in (#{org_subfield_ids.join(",")})) || (container_type='OrgSubfield' and container_id=#{org_subfield.id})").order('updated_at desc')
|
||||
end
|
||||
end
|
||||
|
||||
def allow_to_create?(org, type)
|
||||
|
|
|
@ -2,32 +2,6 @@
|
|||
<%= stylesheet_link_tag 'leftside'%>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
// $(document).ready(function(){
|
||||
// $("#loginSignButton").click(function(){
|
||||
// $("#signUpBox").css({display:"block"});
|
||||
// $("#loginInBox").css({display:"none"});
|
||||
// });
|
||||
// $("#loginInButton").click(function(){
|
||||
// $("#signUpBox").css({display:"none"});
|
||||
// $("#loginInBox").css({display:"block"});
|
||||
// });
|
||||
// });
|
||||
// $(function(){
|
||||
// $("#username").keypress(function(e){
|
||||
// alert(11);
|
||||
// if (e.keyCode == '13') {
|
||||
// $('#main_login_form').submit();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// $("#password").keypress(function(e){
|
||||
// if (e.keyCode == '13') {
|
||||
// $('#main_login_form').submit();
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
$(document).ready(function(){
|
||||
$(".homepageSearchIcon").click(function(){
|
||||
var val=$('input:radio[name="search_type"]:checked').val();
|
||||
|
@ -38,10 +12,6 @@
|
|||
$("#navSearchAlert").css({display:"none"});
|
||||
}
|
||||
});
|
||||
// $("#loginInButton").click(function(){
|
||||
// $("#signUpBox").css({display:"none"});
|
||||
// $("#loginInBox").css({display:"block"});
|
||||
// });
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
|
@ -62,42 +32,6 @@
|
|||
}
|
||||
});
|
||||
|
||||
// $('#regist_btn').bind('keyup', function(event) {
|
||||
// if (event.keyCode == "13" && $("#signUpBox").css('display') == 'block')) {
|
||||
// register();
|
||||
// }
|
||||
//});
|
||||
function clearInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == content) {
|
||||
$('#' + id).val('');
|
||||
}
|
||||
}
|
||||
|
||||
function showInfo(id, content) {
|
||||
var text = $('#' + id);
|
||||
if (text.val() == '') {
|
||||
$('#' + id).val(content);
|
||||
}
|
||||
}
|
||||
|
||||
function login(){
|
||||
$('#main_login_form').submit(); //表单提交没有任何反应的原因:js冲突
|
||||
}
|
||||
|
||||
function register(){
|
||||
if($("#loginUpButton").hasClass('loginUpDisableButton')){
|
||||
return;
|
||||
}
|
||||
if($login_correct && $mail_correct && $passwd_correct && $passwd_comfirm_correct && $("#read_and_confirm").attr("checked") == 'checked'){
|
||||
$("#main_reg_form").submit();
|
||||
}else{
|
||||
$('#user_login').blur();
|
||||
$('#user_mail').blur();
|
||||
$('#user_password').blur();
|
||||
$('#user_password_confirmation').blur();
|
||||
}
|
||||
}
|
||||
var $login_correct = false;
|
||||
var $mail_correct = false;
|
||||
var $passwd_correct = false;
|
||||
|
@ -118,7 +52,7 @@
|
|||
$('#login_req').html('<span style="color: green">'+data.message+'</span>');
|
||||
$login_correct = true;
|
||||
} else {
|
||||
$('#login_req').html( '<span style="color: red">'+data.message+'</span>');
|
||||
$('#login_req').html( '<span style="color: #c00202">'+data.message+'</span>');
|
||||
$login_correct = false;
|
||||
}
|
||||
$('#login_req').css('display','block');
|
||||
|
@ -129,7 +63,7 @@
|
|||
|
||||
$mail.blur(function (event) {
|
||||
if (/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/.test(this.value) == false){
|
||||
$('#mail_req').html( '<span style="color: red">邮件格式不对</span>').show();
|
||||
$('#mail_req').html( '<span style="color: #c00202">邮件格式不对</span>').show();
|
||||
$mail_correct = false;
|
||||
return ;
|
||||
}
|
||||
|
@ -142,7 +76,7 @@
|
|||
$('#mail_req').html( '<span style="color: green">'+data.message+'</span>' );
|
||||
$mail_correct = true;
|
||||
} else {
|
||||
$('#mail_req').html( '<span style="color: red">'+data.message+'</span>' );
|
||||
$('#mail_req').html( '<span style="color: #c00202">'+data.message+'</span>' );
|
||||
$mail_correct = false;
|
||||
}
|
||||
$('#mail_req').css('display','block');
|
||||
|
@ -158,7 +92,7 @@
|
|||
$passwd_correct = true;
|
||||
}
|
||||
else {
|
||||
$('#passwd_req').html( '<span style="color: red">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
|
||||
$('#passwd_req').html( '<span style="color: #c00202">'+'<%= l(:setting_password_min_length_limit, :count => Setting.password_min_length.to_i) %>'+'</span>');
|
||||
$passwd_correct = false;
|
||||
}
|
||||
$('#passwd_req').css('display','block');
|
||||
|
@ -174,7 +108,7 @@
|
|||
$passwd_comfirm_correct = true;
|
||||
}
|
||||
else {
|
||||
$('#confirm_req').html('<span style="color: red">'+'<%= l(:setting_password_error) %>'+'</span>');
|
||||
$('#confirm_req').html('<span style="color: #c00202">'+'<%= l(:setting_password_error) %>'+'</span>');
|
||||
$passwd_comfirm_correct = false;
|
||||
|
||||
}
|
||||
|
@ -184,121 +118,90 @@
|
|||
|
||||
});
|
||||
});
|
||||
|
||||
function user_name_keypress(e){
|
||||
if (e.keyCode == '13') {
|
||||
$('#main_login_form').submit();
|
||||
}
|
||||
}
|
||||
|
||||
function changeRegisterBtn(checkbox){
|
||||
if(checkbox.checked == true){
|
||||
$("#loginUpButton").removeClass('loginUpDisableButton');
|
||||
$("#loginUpButton").addClass('loginUpButton');
|
||||
}else{
|
||||
$("#loginUpButton").removeClass('loginUpButton')
|
||||
$("#loginUpButton").addClass('loginUpDisableButton');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="loginContentContainer">
|
||||
<div class="loginContent">
|
||||
<div class="loginLeft">
|
||||
<div class="loginLogo"><img src="images/trustie_big_log.png" width="100" height="88" alt="Trustie Logo" /></div>
|
||||
<div class="loginInro"> 欢迎加入Trustie创新实践社区!在这里,您的创新意识和创新潜力将得到充分发挥!目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。<br/><br/> Trustie社区的理想是:让创新过程变的更美好!</div>
|
||||
|
||||
<div class="new_login" id = "loginInBox">
|
||||
<div class="new_login_con">
|
||||
<div class="new_login_txt fl">
|
||||
<h3> 欢迎加入Trustie创新实践社区</h3>
|
||||
<p>在这里,您的创新意识和创新潜力将得到充分发挥!目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
|
||||
</div>
|
||||
<div class="loginRight">
|
||||
<div id="loginInBox">
|
||||
<div class="loginChooseBox">
|
||||
<div class="mb5">
|
||||
<ul class="loginChooseList">
|
||||
<li class="loginChoose fl"><span class="loginChooseTab">登录</span></li>
|
||||
<li class="loginChooseBorder fl"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="loginSignAlert" style="color: red"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></div>
|
||||
</div>
|
||||
<div class="loginIn">
|
||||
<div class="new_login_box fr mr45 mt100">
|
||||
<h2 class="new_login_h2">登录
|
||||
<a href="<%= register_url_without_domain %>" class="fr mt5">立即注册</a><div class="cl"></div>
|
||||
</h2>
|
||||
<div class="new_login_form">
|
||||
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
|
||||
<%= back_url_hidden_field_tag %>
|
||||
<ul>
|
||||
<li class="new_loggin_users">
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1', :class=>'new_loggin_input',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
|
||||
</li>
|
||||
<li class="new_login_lock">
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2', :class => 'new_loggin_input' , :placeholder => '请输入登录密码', :onkeypress => "user_name_keypress(event);"%>
|
||||
<p class="new_login_error"><%= flash.empty? || flash[:error].nil? ? "" : flash[:error].html_safe %></p>
|
||||
</li>
|
||||
|
||||
<%= form_tag(signin_path,:id=>'main_login_form',:method=>'post') do %>
|
||||
<%= back_url_hidden_field_tag %>
|
||||
<div class="mb20">
|
||||
<%= text_field_tag 'username', params[:username], :tabindex => '1' ,
|
||||
:class=>'loginSignBox',:placeholder=>'请输入邮箱地址或登录名', :onkeypress => "user_name_keypress(event);"%>
|
||||
<!--<input type="text" placeholder="请输入邮箱地址或昵称" class="loginSignBox" />-->
|
||||
</div>
|
||||
<% if Setting.openid? %>
|
||||
<div class="mb20">
|
||||
<%= text_field_tag "openid_url", nil, :tabindex => '3',:placeholder=>'请输入OpenId URL' %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div>
|
||||
<!--<input type="text" placeholder="请输密码" class="loginSignBox" />-->
|
||||
<%= password_field_tag 'password', nil, :tabindex => '2',:class=>'loginSignBox' ,:placeholder=>'请输密码', :onkeypress => "user_name_keypress(event);"%>
|
||||
</div>
|
||||
<div class="loginSignOption">
|
||||
<% if Setting.autologin? %>
|
||||
<div class="fl mt3 mr5">
|
||||
<%= check_box_tag 'autologin', 1, true, :tabindex => 4 %>
|
||||
</div>
|
||||
<%= l(:label_stay_logged_in) %>
|
||||
<% end %>
|
||||
<a href="<%= lost_password_path %>" class="newsBlue mr40 fr">
|
||||
<% if Setting.lost_password? %>
|
||||
<u>忘记密码?</u>
|
||||
<% end %>
|
||||
</a></div>
|
||||
<li>
|
||||
<% if Setting.autologin? %>
|
||||
<label><%= check_box_tag 'autologin', 1, true, :tabindex => 4, :class => "new_login_check" %><%= l(:label_stay_logged_in) %></label>
|
||||
<% end %>
|
||||
<a href="<%= lost_password_path %>" class="fr">
|
||||
<% if Setting.lost_password? %>忘记密码<% end %>
|
||||
</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<li><button type="submit" class="new_login_submit"><a href="javascript:void(0);" id="login_btn" onclick="$('#main_login_form').submit();" style="text-decoration: none;">登录</a></button></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div class="loginInButton" >
|
||||
<a href="javascript:void(0);" id="login_btn" class="c_white db" onclick="$('#main_login_form').submit();">登录</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="signUpBox">
|
||||
<div class="loginChooseBox">
|
||||
<ul class="loginChooseList">
|
||||
<li class="loginChoose fl"><span class="loginChooseTab">注册<%= link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></a></span>
|
||||
<li class="loginChooseBorder fl"></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="loginIn">
|
||||
<%= form_for :user, :url => register_path,:method=>'post',:html=>{:id=>'main_reg_form'} do |f| %>
|
||||
<%= error_messages_for 'user' %>
|
||||
<div class="loginSignRow">
|
||||
<!--<input type="text" placeholder="请输入邮箱地址" class="loginSignBox" />-->
|
||||
<%= f.text_field :mail,:size => 25, :class=>'loginSignBox' ,:placeholder=>"请输入邮箱地址"%>
|
||||
<div class="loginSignAlert" id="mail_req" style="display: none" >请输入有效邮箱地址</div>
|
||||
</div>
|
||||
<div class="loginSignRow">
|
||||
<!--<input type="text" placeholder="请输入密码" class="loginSignBox" />-->
|
||||
<%= f.password_field :password, :size => 25,:placeholder=>"请输入密码",:class=>'loginSignBox' %>
|
||||
<div class="loginSignAlert" id="passwd_req" style="display: none">至少需要 6 个字符</div>
|
||||
</div>
|
||||
<div class="loginSignRow">
|
||||
<!--<input type="text" placeholder="请再次输入密码" class="loginSignBox" />-->
|
||||
<%= f.password_field :password_confirmation, :size => 25,:placeholder=>"请再次输入密码",:class=>'loginSignBox' %>
|
||||
<div class="loginSignAlert" id="confirm_req" style="display: none">密码不一致</div>
|
||||
</div>
|
||||
<div class="loginSignRow">
|
||||
<!--<input type="text" placeholder="请输入用户昵称" class="loginSignBox" />-->
|
||||
<%= f.text_field :login, :size => 25,:placeholder=>"请输入用户登录名",:class=>'loginSignBox'%>
|
||||
<div class="loginSignAlert" id="login_req" style="display: none">用户登录名为2-18个中英文,数字或下划线</div>
|
||||
</div>
|
||||
<div class="loginSignOption">
|
||||
<div class="fl mt3 mr5">
|
||||
<input type="checkbox" id="read_and_confirm" onchange="changeRegisterBtn(this);"/>
|
||||
</div>
|
||||
我已阅读并接受<a href="<%= agreement_path %>" class="newsBlue"><u>Trustie服务协议</u></a>条款</div>
|
||||
<div class="loginUpDisableButton" id="loginUpButton">
|
||||
<a href="javascript:void(0);" class="c_white db" id="regist_btn" onclick="register();" >注册</a>
|
||||
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%# 注册 %>
|
||||
<div class="new_register" id = "signUpBox">
|
||||
<div class="new_register_con">
|
||||
<div class="new_login_txt fl new_register_left">
|
||||
<h3> 欢迎加入Trustie创新实践社区</h3>
|
||||
<p>在这里,您的创新意识和创新潜力将得到充分发挥!目前已有超过200所高校和科研机构在平台中开展在线协同开发、协同学习和协同研究。</p>
|
||||
</div>
|
||||
<div class="new_login_box fr mr45 mt50">
|
||||
<h2 class="new_login_h2">注册<a href="<%= signin_url_without_domain %>" class="fr mt5">已有账号 请登录</a><div class="cl"></div></h2>
|
||||
<div class="new_login_form">
|
||||
<%= form_for :user, :url => register_path,:method=>'post', :html => {:id=>'main_reg_form'} do |f| %>
|
||||
<%= error_messages_for 'user' %>
|
||||
<ul>
|
||||
<li class="new_register_li">
|
||||
<%= f.text_field :mail, :size => 25, :class => 'new_register_input' , :placeholder => "请输入邮箱地址"%>
|
||||
<p class="new_login_error" id="mail_req" style="display: none" >请输入正确的邮箱</p>
|
||||
</li>
|
||||
<li class="new_register_li">
|
||||
<%= f.password_field :password, :size => 25, :placeholder => "请输入密码", :class => 'new_register_input' %>
|
||||
<p class="new_login_error" id="passwd_req" style="display: none">请输入6-16位密码,区分大小写,不能使用空格!</p>
|
||||
</li>
|
||||
<li class="new_register_li">
|
||||
<%= f.password_field :password_confirmation, :size => 25, :placeholder => "请再次输入密码", :class=> 'new_register_input' %>
|
||||
<p class="new_login_error" id="confirm_req" style="display: none">两次密码不一致!</p>
|
||||
</li>
|
||||
<li class="new_register_li">
|
||||
<%= f.text_field :login, :size => 25, :placeholder => "请输入用户登录名", :class => 'new_register_input'%>
|
||||
<p class="new_login_error" id="login_req" style="display: none">用户登录名为2-18个中英文,数字或下划线</p>
|
||||
</li>
|
||||
<li>
|
||||
<label><input type="checkbox" checked id="read_and_confirm" onchange="changeRegisterBtn(this);" class=" new_login_check">我已阅读并接受<a href="<%= agreement_path %>" >Trustie服务协议条款</a></label>
|
||||
</li>
|
||||
<li>
|
||||
<div class="new_login_submit" id="loginUpButton">
|
||||
<a href="javascript:void(0);" id="regist_btn" onclick="register();" class ="db" style="text-decoration: none;">注册</a>
|
||||
</div>
|
||||
</ul>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<span class="attachment">
|
||||
<%= link_to truncate(@attachment.filename,length: 35, omission: '...'),
|
||||
download_named_attachment_path(@attachment.id, @attachment.filename),
|
||||
:title => @attachment.filename+"\n"+@attachment.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:300px;",:class => "linkBlue f14 fb link_file_a2 fl" %>
|
||||
:title => @attachment.filename+"\n"+@attachment.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis; max-width:280px;",:class => "linkBlue f14 fb link_file_a2 fl" %>
|
||||
</span>
|
||||
<span class="fr">版本号:当前</span>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -39,6 +39,15 @@
|
|||
<!--<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="closeModal();"><%#= l(:button_cancel)%></a>-->
|
||||
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5 mt5">
|
||||
<label class="fl c_dark f14" style="line-height:30px;">描述:</label>
|
||||
<div class="fl">
|
||||
<input type="text" name="description" class="InputBox fl W160" value="<%= @attachment.description %>">
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="uploadResourceIntr">
|
||||
<div class="uploadResourceName fl"><span id="upload_file_count">(未选择文件)</span></div>
|
||||
<div class="uploadResourceIntr2 fl">您可以上传小于<span class="c_red">50MB</span>的文件</div>
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<% if course_id%>
|
||||
<input type="hidden" name="course_id" id="" value="<%= course_id%>">
|
||||
<% end %>
|
||||
<input type="hidden" name="blog_comment[title]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @blog_comment, :as => :reply, :url => {:controller => 'blog_comments',:action => 'reply', :id => @blogComment.id}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<% if course_id%>
|
||||
<input type="hidden" name="course_id" id="" value="<%= course_id%>">
|
||||
<% end %>
|
||||
<input type="hidden" name="blog_comment[title]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -184,20 +184,24 @@
|
|||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @article.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(@article.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer" style="margin-top: 8px">
|
||||
<div nhname='new_message_<%= @article.id%>' style="display:none;">
|
||||
<%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
|
||||
<input type="hidden" name="course_id" value="<%= @course.id%>">
|
||||
<input type="hidden" name="blog_comment[title]" value="RE:<%= @article.title%>">
|
||||
<input type="hidden" name="blog_comment[sticky]" value="0">
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="blog_comment[locked]" value="0">
|
||||
<div nhname='toolbar_container_<%= @article.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @article.id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @article.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @article.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @article.id%>' style="display:none;">
|
||||
<%= form_for 'blog_comment',:url => {:action => 'reply',:controller => 'blog_comments',:user_id=>@article.author.id,:blog_id=>@article.blog_id, :id => @article.id},:method => "post",:html => {:multipart => true, :id => 'message_form'} do |f|%>
|
||||
<input type="hidden" name="course_id" value="<%= @course.id%>">
|
||||
<input type="hidden" name="blog_comment[title]" value="RE:<%= @article.title%>">
|
||||
<input type="hidden" name="blog_comment[sticky]" value="0">
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="blog_comment[locked]" value="0">
|
||||
<div nhname='toolbar_container_<%= @article.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @article.id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @article.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @article.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<p ondblclick=show_edit_file_description('<%= file.id %>')>
|
||||
资源描述:<% if file.description.blank? %><span style="color:#C5C5BE; cursor:pointer;" title="双击可编辑">双击添加描述</span><% else %><span style="cursor:pointer;" title="双击可编辑"><%= file.description %></span><% end %>
|
||||
<%#= file.description.blank? ? "该资源暂无描述" : file.description %>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_file_description("+file.id.to_s+");"%>
|
||||
</p>
|
|
@ -1,7 +1,7 @@
|
|||
<% delete_allowed = User.current.admin? %>
|
||||
|
||||
<% org_subfield_attachments.each do |file| %>
|
||||
<% if file.is_public == 1 or User.current.member_of_org?(file.container.organization) %>
|
||||
<% if file.is_public == 1 or User.current.member_of_org?(file.container.organization) || User.current.admin? %>
|
||||
<div class="resources mt10" id="container_files_<%= file.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
|
@ -36,6 +36,25 @@
|
|||
<p class="f_l mb5 fontGrey2">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<p class="fl ml15 fontGrey2">下载<%= file.downloads%> | 引用<span id="reference_number_<%= file.id %>"><%= file.quotes.nil? ? 0:file.quotes %></span></p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
||||
<% if User.current.logged? && ((delete_allowed || User.current.id == file.author_id) && file.container_id == org_subfield.id && file.container_type == "OrgSubfield" )%>
|
||||
<div>
|
||||
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
|
||||
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
|
||||
onblur="edit_file_description('<%= update_file_description_org_subfield_file_path(file.container.organization,file)%>','<%= file.id %>');"><%= file.description %></textarea>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="fontGrey2 mb4">
|
||||
<% unless file.description.blank? %>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="cl"></div>
|
||||
<div class="tag_h">
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<%= link_to truncate(file.filename,length: 35, omission: '...'),
|
||||
download_named_attachment_path(file.id, file.filename),
|
||||
:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
||||
<% if User.current.logged? %>
|
||||
<% if (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file) %>
|
||||
<% if User.current.logged? || User.current.admin? %>
|
||||
<% if ((manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file)) || User.current.admin? %>
|
||||
<%= link_to(l(:label_slected_to_other_project),quote_resource_show_project_project_file_path(project,file),:class => "f_l re_select",:remote => true) if has_project?(User.current,file) %>
|
||||
<% if authority_pubilic_for_files(project, file) && delete_allowed %>
|
||||
<span id="is_public_<%= file.id %>">
|
||||
|
@ -43,6 +43,22 @@
|
|||
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %> | 下载<%= file.downloads %> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if User.current.admin? || ( User.current.logged? && ( (manage_allowed || file.author_id == User.current.id) && project_contains_attachment?(project,file))) %>
|
||||
<div>
|
||||
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
|
||||
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
|
||||
onblur="edit_file_description('<%= update_file_description_project_file_path(project,file)%>','<%= file.id %>');"><%= file.description %></textarea>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="fontGrey2 mb4">
|
||||
<% unless file.description.blank? %>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="tag_h">
|
||||
<!-- container_type = 2 代表是项目里的资源 -->
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6"} %>
|
||||
|
|
|
@ -35,6 +35,22 @@
|
|||
<p class="fl ml15 fontGrey2">下载<%= file.downloads%> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if User.current.admin? || (User.current.logged? && ( (is_project_manager?(User.current, project) || file.author_id == User.current.id) && project_contains_attachment?(project, file)) && ((delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project")) %>
|
||||
<div>
|
||||
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
|
||||
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
|
||||
onblur="edit_file_description('<%= update_file_description_project_file_path(project,file)%>','<%= file.id %>');"><%= file.description %></textarea>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="fontGrey2 mb4">
|
||||
<% unless file.description.blank? %>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="tag_h">
|
||||
<!-- container_type = 1 代表是课程里的资源 -->
|
||||
<%= render :partial => 'tags/tag_new', :locals => {:obj => file, :object_flag => "6",:tag_name => @tag_name} %>
|
||||
|
|
|
@ -35,10 +35,25 @@
|
|||
<p class="f_l mb5 fontGrey2">文件大小:<%= number_to_human_size(file.filesize) %></p>
|
||||
<p class="fl ml15 fontGrey2">下载<%= file.downloads%> | 引用<%= file.quotes.nil? ? 0:file.quotes %> </p>
|
||||
</div>
|
||||
<% unless file.description.blank? %>
|
||||
<%# unless file.description.blank? %>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
||||
<% end %>
|
||||
<% if User.current.admin? || ( User.current.logged? && ((is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file)) && ((delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course")) %>
|
||||
<div>
|
||||
<div id="file_description_show_<%= file.id %>" class="fontGrey2 mb4">
|
||||
<%= render :partial => 'files/file_description', :locals => {:file => file} %>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑资源描述" id="file_description_edit_<%= file.id %>"
|
||||
onblur="edit_file_description('<%= update_file_description_course_file_path(@course,file)%>','<%= file.id %>');"><%= file.description %></textarea>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="fontGrey2 mb4">
|
||||
<% unless file.description.blank? %>
|
||||
<div class="cl"></div>
|
||||
<div class="fontGrey2 mb4">资源描述:<%= file.description %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<%# end %>
|
||||
<div class="cl"></div>
|
||||
<div class="tag_h">
|
||||
<!-- container_type = 1 代表是课程里的资源 -->
|
||||
|
@ -48,9 +63,9 @@
|
|||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
||||
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
|
||||
<% if User.current.logged? || User.current.admin? %>
|
||||
<% if User.current.admin? || ((is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file)) %>
|
||||
<% if User.current.admin? || ((delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course") %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %></li>
|
||||
<li><%= link_to '延期发布',file_hidden_course_file_path(@course,file),:class => "postOptionLink",:remote=>true %></li>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<% if (is_project_manager?(User.current, project) || file.author_id == User.current.id) && project_contains_attachment?(project, file) %>
|
||||
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project" %>
|
||||
<% if User.current.admin? || (User.current.logged? ) %>
|
||||
<% if User.current.admin? || ((is_project_manager?(User.current, project) || file.author_id == User.current.id) && project_contains_attachment?(project, file)) %>
|
||||
<% if User.current.admin? || ((delete_allowed || User.current.id == file.author_id) && file.container_id == project.id && file.container_type == "Project") %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}','#{User.current.id}','file')") %></li>
|
||||
<li><%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %></li>
|
||||
|
|
|
@ -22,6 +22,13 @@
|
|||
<%= render :partial => 'files/new_style_attachment_list',:locals => {:container => project} %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">文件描述:</label>
|
||||
<div class="fl">
|
||||
<input type="text" name="description" placeholder="文件描述" class="InputBox fl W160">
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<!--<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%#= l(:button_confirm)%></a>-->
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
<!--<input type="hidden" name="org_subfield_attachment_type" value="<%#= org_subfield_attachment_type%>">-->
|
||||
<%= render :partial => 'files/org_subfield_upload_attachment_list', :locals => {:container => org_subfield}%>
|
||||
<div class="cl"></div>
|
||||
<div class="mb5">
|
||||
<label class="fl c_dark f14" style="margin-top: 4px;">文件描述:</label>
|
||||
<div class="fl">
|
||||
<input type="text" name="description" placeholder="文件描述" class="InputBox fl W160">
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class=" fr grey_btn mr40" onclick="hideModal();"><%= l(:button_cancel)%></a>
|
||||
<a id="submit_resource" href="javascript:void(0);" class="blue_btn fr" onclick="submit_resource();"><%= l(:button_confirm)%></a>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
$("#file_description_show_<%= @attachment.id %>").html("<%= escape_javascript render(:partial => "files/file_description", :locals => {:file => @attachment}) %>");
|
||||
$("#file_description_show_<%= @attachment.id %>").show();
|
||||
$("#file_description_edit_<%= @attachment.id %>").hide();
|
|
@ -1,6 +1,7 @@
|
|||
<%if @save_flag%>
|
||||
$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
$('#reorder_time').click();
|
||||
//$('#new_forum_div').slideToggle();$('#create_btn').parent().slideToggle();
|
||||
//$('#reorder_time').click();
|
||||
window.location.href= "http://"+"<%= Setting.host_name%>"+"/forums/" + "<%= @forum.id%>"
|
||||
<%else%>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
||||
$("#error").html("<%= @forum.errors.full_messages[0]%>").show();
|
||||
<%end %>
|
||||
|
|
|
@ -62,23 +62,27 @@
|
|||
</div>
|
||||
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= @issue.id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
|
||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||
<!--<div class="cl"></div>-->
|
||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @issue.id %>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5 fl">
|
||||
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
||||
</div>
|
||||
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @issue.id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(@issue.id),:method => "post", :remote => true) do |f| %>
|
||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||
<!--<div class="cl"></div>-->
|
||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @issue.id %>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id %>' name="notes"></textarea>
|
||||
<div class="cl"></div>
|
||||
<div class="mt5 fl">
|
||||
<%= render :partial => 'attachments/issue_reply', :locals => {:container => @issue} %>
|
||||
</div>
|
||||
<span nhname='contentmsg_<%= @issue.id %>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @issue.id %>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr mt5" style="display:none;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
|
@ -5,21 +5,25 @@
|
|||
</div>
|
||||
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||
<!--<div class="cl"></div>-->
|
||||
<input type="hidden" name="quote" value=""/>
|
||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @issue.id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_reply_issue_path(@issue.id),:method => "post", :remote => true) do |f|%>
|
||||
<%#= kindeditor_tag :notes,"",:height=>"33",:minHeight=>"33",:editor_id=>"issues_reply_editor"%>
|
||||
<!--<div class="cl"></div>-->
|
||||
<input type="hidden" name="quote" value=""/>
|
||||
<input type="hidden" name="issue_id" value="<%=@issue.id%>"/>
|
||||
<div nhname='toolbar_container_<%= @issue.id%>' ></div>
|
||||
<div class="cl"></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @issue.id%>' name="notes"></textarea>
|
||||
<div class="cl"></div>
|
||||
<span nhname='contentmsg_<%= @issue.id%>' class="fl"></span>
|
||||
<a id="new_message_submit_btn_<%= @issue.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<!--<a href="javascript:void(0);" onclick="issues_reply_editor.sync();$(this).parent().submit();" class="homepagePostReplySubmit postReplySubmit fl mt5">发送</a>-->
|
||||
<div class="cl"></div>
|
||||
|
||||
|
|
|
@ -84,9 +84,9 @@
|
|||
<div ><%= link_to User.current.count_new_message , user_message_path(User.current), :class => "newsActive", :target =>"_Blank" %></div>
|
||||
<% end %>
|
||||
<%#= link_to User.current.count_new_message, user_message_path(User.current), :class => "homepageNewsIcon" %>
|
||||
<!--<div class="shadowbox_news undis" id="user_messages_list">
|
||||
<%#=render :partial => 'layouts/message_loading' %>
|
||||
</div>-->
|
||||
<div class="shadowbox_news undis" id="user_messages_list">
|
||||
<%=render :partial => 'layouts/message_loading' %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -98,15 +98,15 @@
|
|||
$("#navHomepageSearchType").hide();
|
||||
});
|
||||
|
||||
/*$("#user_messages").mouseenter(function(){
|
||||
$("#user_messages").mouseenter(function(){
|
||||
$("#user_messages_list").show();
|
||||
$.get('<%#=user_messages_unviewed_users_path %>');
|
||||
$.get('<%=user_messages_unviewed_users_path %>');
|
||||
$("#ajax-indicator").hide();
|
||||
}).mouseleave(function(){
|
||||
$("#user_messages_list").hide();
|
||||
$("#user_messages_list").html("<%#=escape_javascript(render :partial => 'layouts/message_loading') %>");
|
||||
$("#user_messages_list").html("<%=escape_javascript(render :partial => 'layouts/message_loading') %>");
|
||||
|
||||
});*/
|
||||
});
|
||||
|
||||
$("#navHomepageProfile").mouseenter(function(){
|
||||
$("#homepageProfileMenuIcon").addClass("homepageProfileMenuIconhover");
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<div class="sn-row sn-bg-grey2">
|
||||
<div class="sn-footer">
|
||||
<ul class="sn-footer-link">
|
||||
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
|
||||
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
|
||||
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
|
||||
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li>
|
||||
</ul>
|
||||
<div class="sn-contact">联系人:魏小姐 | 电 话:0731-84761282 | 传 真:0731-84761268 | 邮 箱:office@gnssopenlab.org</div>
|
||||
<div class="sn-address">地 址:湖南省长沙市开福区东风路89号观园大厦23层<br />
|
||||
卫星导航仿真与测试开放实验室</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,6 @@
|
|||
<font></font>
|
||||
<h4 class="shadowbox_news_title">未读消息</h4>
|
||||
<ul class="shadowbox_news_list">
|
||||
<%# user_messages = User.current.user_messages_unviewed %>
|
||||
<% messages.each do |ma| %>
|
||||
<% if ma.class == SystemMessage %>
|
||||
<li><a href="<%=user_system_messages_path(User.current) %>" target="_blank" title="Trustie平台 发布新消息:<%= ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject%>"><span class="shadowbox_news_user">Trustie平台 </span>发布新消息:<%= ma.subject.blank? ? (ma.content.nil? ? ma.description.html_safe : ma.content.html_safe) : ma.subject%></a></li>
|
||||
|
@ -60,15 +59,77 @@
|
|||
<% else %>
|
||||
<li><a href="<%= student_work_index_path(:homework => ma.course_message.jour.student_work.homework_common_id,:show_work_id => ma.course_message.jour.student_work_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> 回复了作品评论:<%= ma.course_message.notes%>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %><%=ma.course_message.user.allowed_to?(:as_teacher, ma.course) ? '老师' : '同学' %> </span>回复了作品评论:<%= ma.course_message.notes%></a></li>
|
||||
<% end %>
|
||||
<% elsif ma.course_message_type == "StudentWork" && !ma.course_message.homework_common.nil? && !User.current.allowed_to?(:as_teacher, ma.course_message.homework_common.course) %>
|
||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id) %>" target="_blank" title="<%=ma.course_message.homework_common.user.show_name %>老师 发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评"><span class="shadowbox_news_user"><%=ma.course_message.homework_common.user.show_name %>老师 </span>发布的作业:<%=ma.course_message.homework_common.name %>,由于迟交作业,您及您的作品都不能参与该作业的匿评</a></li>
|
||||
<% elsif ma.course_message_type == "StudentWork" && ma.status == 1 %>
|
||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 重新提交了作品:<%=ma.course_message.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>重新提交了作品:<%=ma.course_message.name %></a></li>
|
||||
<% elsif ma.course_message_type == "StudentWork" && ma.status == 2 %>
|
||||
<li><a href="<%=student_work_index_path(:homework => ma.course_message.homework_common_id, :show_work_id => ma.course_message_id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>同学 追加新附件了:作业标题:<%=ma.course_message.homework_common.name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>同学 </span>追加新附件了:作业标题:<%=ma.course_message.homework_common.name %></a></li>
|
||||
<% elsif ma.course_message_type == "Course" %>
|
||||
<li><a href="<%=course_path(ma.course_message) %>" target="_blank" title="系统提示 您成功创建了课程:课程名称:<%=ma.course_message.name %>"><span class="shadowbox_news_user">系统提示 </span>您成功创建了课程:课程名称:<%=ma.course_message.name %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourseRequest" %>
|
||||
<% content = User.find(ma.course_message_id).name+"申请成为课程\""+"#{Course.find(ma.course_id).name}"+"\"的"+"#{ma.content == '9' ? "教师" : "教辅"}" %>
|
||||
<li><a href="<%=user_path(User.find(ma.course_message_id), :course_id => ma.course_id) %>" target="_blank" title="系统提示 您有了新的课程成员申请:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>您有了新的课程成员申请:<%=content %></a></li>
|
||||
<% elsif ma.course_message_type == "CourseRequestDealResult" %>
|
||||
<% content = ma.status == 1 ? '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'申请已通过' : '您申请成为课程"'+Course.find(ma.course_id).name+'"的'+(ma.content == '9' ? '老师' : '教辅')+'的申请被拒绝' %>
|
||||
<li><a href="<%=course_path(Course.find(ma.course_id)) %>" target="_blank" title="系统提示 课程申请进度反馈:<%=content %>"><span class="shadowbox_news_user">系统提示 </span>课程申请进度反馈:<%=content %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 0 %>
|
||||
<li><a href="<%=course_member_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您加入了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您加入了课程:<%=ma.course.name %></a></li>
|
||||
<% elsif ma.course_message_type == "JoinCourse" and ma.status == 1 %>
|
||||
<li><a href="<%=user_path(ma.course_message_id) %>" target="_blank" title="系统提示 您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %>"><span class="shadowbox_news_user">系统提示 </span>您增加了新的课程成员:<%=User.find(ma.course_message_id).login+"("+User.find(ma.course_message_id).show_name+")" %></a></li>
|
||||
<% elsif ma.course_message_type == "RemoveFromCourse" %>
|
||||
<li><a href="<%=member_course_path(ma.course) %>" target="_blank" title="<%=User.find(ma.course_message_id).show_name %> 将您移出了课程:<%=ma.course.name %>"><span class="shadowbox_news_user"><%=User.find(ma.course_message_id).show_name %> </span>将您移出了课程:<%=ma.course.name %></a></li>
|
||||
<% elsif ma.course_message_type == "Exercise" && ma.status == 2 %>
|
||||
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布了课程测验:测验题目:<%=ma.course_message.exercise_name %>"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布了课程测验:测验题目:<%=ma.course_message.exercise_name %></a></li>
|
||||
<% elsif ma.course_message_type == "Exercise" && ma.status == 3 %>
|
||||
<li><a href="<%=exercise_path(:id => ma.course_message.id) %>" target="_blank" title="<%=ma.course_message.user.show_name %>老师 发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了"><span class="shadowbox_news_user"><%=ma.course_message.user.show_name %>老师 </span>发布的测验:<%=ma.course_message.exercise_name %> 截止时间快到了</a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% elsif ma.class == ForgeMessage %>
|
||||
<% if ma.forge_message_type == "AppliedProject" %>
|
||||
<li><a href="<%=settings_project_path(:id => ma.project, :tab => "members") %>" target="_blank" title="<%=ma.forge_message.user.show_name %> 申请加入项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=ma.forge_message.user.show_name %> </span>申请加入项目:<%= ma.project.name%></a></li>
|
||||
<% elsif ma.forge_message_type == "JoinProject" %>
|
||||
<li><a href="<%=project_member_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 将您加入了项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>将您加入了项目:<%= ma.project.name%></a></li>
|
||||
<% elsif ma.forge_message_type == "RemoveFromProject" %>
|
||||
<li><a href="<%=member_project_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 将您移出了项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>将您移出了项目:<%= ma.project.name%></a></li>
|
||||
<% elsif ma.forge_message_type == "RemoveFromProject" %>
|
||||
<li><a href="<%=project_path(ma.project) %>" target="_blank" title="<%=User.find(ma.forge_message_id).show_name %> 邀请你加入项目:<%= ma.project.name%>"><span class="shadowbox_news_user"><%=User.find(ma.forge_message_id).show_name %> </span>邀请你加入项目:<%= ma.project.name%></a></li>
|
||||
<% elsif ma.forge_message_type == "Issue" && ma.status == 1 %>
|
||||
<li><a href="<%=issue_path(:id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%><%= ma.forge_message.subject%> 截止时间快到了!"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.tracker_id == 5 ? "发布的周报:":"指派给你的问题:"%><%= ma.forge_message.subject%> 截止时间快到了!</a></li>
|
||||
<% elsif ma.forge_message_type == "Issue" && ma.status != 1 %>
|
||||
<li><a href="<%=issue_path(:id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%><%= ma.forge_message.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.tracker_id == 5 ? "发布了周报:":"指派了问题给你:"%><%= ma.forge_message.subject%></a></li>
|
||||
<% elsif ma.forge_message_type == "Journal" %>
|
||||
<li><a href="<%=issue_path(:id => ma.forge_message.journalized_id) %>" target="_blank" title="<%=ma.forge_message.user.show_name %> 更新了问题状态:<%= ma.forge_message.journalized.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.user.show_name %> </span>更新了问题状态:<%= ma.forge_message.journalized.subject%></a></li>
|
||||
<% elsif ma.forge_message_type == "Message" %>
|
||||
<li><a href="<%=project_boards_path(ma.forge_message.project,:parent_id => ma.forge_message.parent_id ? ma.forge_message.parent_id : ma.forge_message.id,:topic_id => ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> <%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %><%= ma.forge_message.subject%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span><%= ma.forge_message.parent_id.nil? ? "发布了项目帖子:" : "评论了项目帖子:" %><%= ma.forge_message.subject%></a></li>
|
||||
<% elsif ma.forge_message_type == "News" %>
|
||||
<li><a href="<%=news_path(ma.forge_message.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 发布了新闻:<%= ma.forge_message.title.html_safe%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>发布了新闻:<%= ma.forge_message.title.html_safe%></a></li>
|
||||
<% elsif ma.forge_message_type == "Comment" %>
|
||||
<li><a href="<%=news_path(ma.forge_message.commented.id) %>" target="_blank" title="<%=ma.forge_message.author.show_name %> 评论了新闻:<%= ma.forge_message.commented.title%>"><span class="shadowbox_news_user"><%=ma.forge_message.author.show_name %> </span>评论了新闻:<%= ma.forge_message.commented.title%></a></li>
|
||||
<% end %>
|
||||
<% elsif ma.class == MemoMessage %>
|
||||
<% if ma.memo_type == "Memo" %>
|
||||
<li><a href="<%=forum_memo_path(ma.memo.forum_id, ma.memo.parent_id ? ma.memo.parent_id: ma.memo.id) %>" target="_blank" title="<%=ma.memo.author.show_name %> <%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content.html_safe%>"><span class="shadowbox_news_user"><%=ma.memo.author.show_name %> </span><%= ma.memo.parent_id.nil? ? "在贴吧发布帖子:" : "回复了贴吧帖子:" %><%= ma.memo.parent_id.nil? ? ma.memo.subject : ma.memo.content.html_safe%></a></li>
|
||||
<% end %>
|
||||
<% elsif ma.class == UserFeedbackMessage %>
|
||||
<% if ma.journals_for_message_type == "JournalsForMessage" %>
|
||||
<li><a href="<%=feedback_path(ma.journals_for_message.jour_id) %>" target="_blank" title="<%=ma.journals_for_message.user.show_name %> <%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %><%= ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe%>"><span class="shadowbox_news_user"><%=ma.journals_for_message.user.show_name %> </span><%= ma.journals_for_message.reply_id == 0 ? "给你留言了:" : "回复了你的留言:" %><%= ma.journals_for_message.notes.gsub("<p>","").gsub("</p>","").gsub("<br />","").html_safe%></a></li>
|
||||
<% end %>
|
||||
<% elsif ma.class == OrgMessage %>
|
||||
<% if ma.message_type == 'ApplySubdomain' %>
|
||||
<li><a href="<%=feedback_path(ma.journals_for_message.jour_id) %>" target="_blank" title="<%=ma.organization.name %> 申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%>"><span class="shadowbox_news_user"><%=ma.organization.name %> </span>申请子域名:<%= (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count == 0 || (Secdomain.where("sub_type=2 and pid=?", ma.organization.id).count > 0 && Secdomain.where("sub_type=2 and pid=?", ma.organization.id).first.subname != ma.content)) ? "同意申请":"申请已批准"%></a></li>
|
||||
<% elsif ma.message_type == 'AgreeApplySubdomain' %>
|
||||
<li><a href="javascript:void(0)" target="_blank" title="系统提示 管理员同意了您的子域名申请:<%= ma.content%>"><span class="shadowbox_news_user">系统提示 </span>管理员同意了您的子域名申请:<%= ma.content%></a></li>
|
||||
<% end %>
|
||||
<% elsif AtMessage === ma && ma.at_valid? %>
|
||||
<% if ma.at_message_type == "Message" && !ma.at_message.course.nil? %>
|
||||
<% href = course_boards_path(ma.at_message.course,:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id) %>
|
||||
<% elsif ma.at_message_type == "Message" && !ma.at_message.project.nil? %>
|
||||
<% href = project_boards_path(ma.at_message.project,:parent_id => ma.at_message.parent_id ? ma.at_message.parent_id : ma.at_message.id, :topic_id => ma.at_message.id) %>
|
||||
<% else %>
|
||||
<% href = ma.url %>
|
||||
<% end %>
|
||||
<li><a href="<%=href %>" target="_blank" title="<%=ma.author.show_name %> 提到了你:<%= ma.subject.html_safe%>"><span class="shadowbox_news_user"><%=ma.author.show_name %> </span>提到了你:<%= ma.subject.html_safe%></a></li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<!--<li><span class="shadowbox_news_user">教辅测试老师</span><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试辅测试老辅测试老老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank"><span class="c_red">【课程通知】</span>发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
<li><a href="#" target="_blank" class="shadowbox_news_user">教辅测试老师</a><a href="#" target="_blank">发布的作业:作业标题:0525发布布的作业:作业标题:0525发布布的作业:作业标题:0525发布普...</a></li>
|
||||
-->
|
||||
</ul>
|
||||
<%= link_to '查看全部', user_message_path(User.current), :class => "shadowbox_news_all", :target =>"_Blank" %>
|
|
@ -1,8 +1,10 @@
|
|||
<% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %>
|
||||
<%= user.user_extensions.brief_introduction %>
|
||||
<% else%>
|
||||
这位童鞋很懒,什么也没有留下~
|
||||
<% end %>
|
||||
<span>
|
||||
<% if user.user_extensions && user.user_extensions.brief_introduction && !user.user_extensions.brief_introduction.empty? %>
|
||||
<%= user.user_extensions.brief_introduction %>
|
||||
<% else%>
|
||||
这位童鞋很懒,什么也没有留下~
|
||||
<% end %>
|
||||
</span>
|
||||
<% if User.current == user%>
|
||||
<%= link_to image_tag("../images/signature_edit.png",width:"12px", height: "12px"), "javascript:void(0);", :onclick => "show_edit_user_introduction();"%>
|
||||
<% end%>
|
||||
<% end %>
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
</div><!--项目标签 end-->
|
||||
<!--课程推荐-->
|
||||
<%= render :partial => 'courses/recommendation', :locals => {:course => @course} %>
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @course.visits.to_i %></div>
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @course.visits.to_i %> (自2016年5月)</div>
|
||||
</div><!--LSide end-->
|
||||
|
||||
<div id="RSide" class="fl">
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<%= render :partial => "organizations/org_left_subfield_list", :locals => {:organization => @organization} %>
|
||||
|
||||
</div>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @organization.visits.to_i %></div>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @organization.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
<div class="homepageRight" style="margin-top:<%= (params[:show_homepage].nil? && User.current.logged?) ? '10px':'0px' %>;">
|
||||
<%= render_flash_messages %>
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
<%= favicon %>
|
||||
<%= javascript_heads %>
|
||||
<%= heads_for_theme %>
|
||||
<%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2' %>
|
||||
<%= stylesheet_link_tag 'new_user', 'public', 'org_custom','jquery/jquery-ui-1.9.2', 'org2' %>
|
||||
<%= call_hook :view_layouts_base_html_head %>
|
||||
<%= yield :header_tags -%>
|
||||
<!-- MathJax的配置 -->
|
||||
<%=render :partial => "math_js" %>
|
||||
<%#=render :partial => "math_js" %>
|
||||
</head>
|
||||
<body style="background: #fff">
|
||||
<% update_visiti_count @organization %>
|
||||
<header id="por_header">
|
||||
<%= render :partial => 'org_custom_header', :locals => {:subfield_content => @subfield_content} %>
|
||||
<%= render :partial => 'organizations/org_custom_header', :locals => {:subfield_content => @subfield_content} %>
|
||||
</header>
|
||||
|
||||
<%# 内容开始 %>
|
||||
|
|
|
@ -146,7 +146,7 @@
|
|||
<div class="cl"></div>
|
||||
</div><!--项目标签 end-->
|
||||
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %></div>
|
||||
<div class="fontGrey5 mt10 ml10 mb10">访问计数 <%= @project.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -160,30 +160,14 @@
|
|||
<div style="clear:both;"></div>
|
||||
|
||||
<footer>
|
||||
<!--footer-->
|
||||
<div class="sn-row sn-bg-grey2">
|
||||
<div class="sn-footer">
|
||||
<ul class="sn-footer-link">
|
||||
<li class="sn-mr50"><a href="<%= about_us_path %>" class="sn-link-white sn-f18">关于我们</a></li>
|
||||
<li class="sn-mr50"><a href="<%= agreement_path %>" class="sn-link-white sn-f18">服务协议</a></li>
|
||||
<li class="sn-mr50"><a href="http://forge.trustie.net/forums/1/memos/1168" class="sn-link-white sn-f18">帮助中心</a></li>
|
||||
<li><a href="<%= forums_path(:reorder_complex=>'desc')%>" class="sn-link-white sn-f18">在线报名</a></li>
|
||||
</ul>
|
||||
<div class="sn-contact">联系人:魏小姐 | 电 话:0731-84761282 | 传 真:0731-84761268 | 邮 箱:office@gnssopenlab.org</div>
|
||||
<div class="sn-address">地 址:湖南省长沙市开福区东风路89号观园大厦23层<br />
|
||||
卫星导航仿真与测试开放实验室</div>
|
||||
</div>
|
||||
</div>
|
||||
<%= render :partial => "layouts/org_custom_footer" %>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<!--页面底部-->
|
||||
<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="ajax-indicator" style="display:none;"><span><%= l(:label_loading) %></span></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -14,19 +14,8 @@
|
|||
<%= 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>
|
||||
</head>
|
||||
<body style="background-color: #fff">
|
||||
<div class="navContainer">
|
||||
<% is_current_user = User.current.logged? && User.current == @user%>
|
||||
<% if User.current.logged? %>
|
||||
|
|
|
@ -139,9 +139,9 @@
|
|||
|
||||
<div>
|
||||
<div class="homepageSignature break_word">
|
||||
<p id="user_brief_introduction_show">
|
||||
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
|
||||
</p>
|
||||
<div id="user_brief_introduction_show">
|
||||
<%= render :partial => 'layouts/user_brief_introduction', :locals => {:user => @user} %>
|
||||
</div>
|
||||
</div>
|
||||
<textarea class="homepageSignatureTextarea none" placeholder="请编辑签名" id="user_brief_introduction_edit" onblur="edit_user_introduction('<%= edit_brief_introduction_user_path(@user.id)%>');"><%= @user.user_extensions.brief_introduction %></textarea>
|
||||
</div>
|
||||
|
@ -284,7 +284,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %></div>
|
||||
<div class="fontGrey5 mt10 ml20">访问计数 <%= @user.visits.to_i %> (自2016年5月)</div>
|
||||
</div>
|
||||
<div class="homepageRight">
|
||||
<%= yield %>
|
||||
|
@ -349,6 +349,7 @@
|
|||
$(function(){
|
||||
$('#user_hide_course').hide();
|
||||
$('#user_hide_project').hide();
|
||||
autoUrl("user_brief_introduction_show");
|
||||
});
|
||||
|
||||
$("#courseMenu").mouseenter(function(){
|
||||
|
|
|
@ -119,19 +119,23 @@
|
|||
<div class="homepagePostReplyContainer borderBottomNone minHeight48">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= @memo.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= @memo.id%>' style="display:none;">
|
||||
<%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%>
|
||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||
<div nhname='toolbar_container_<%= @memo.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @memo.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= @memo.id%>' style="display:none;">
|
||||
<%= form_for('memo',:url=>forum_memos_path,:method => "post") do |f|%>
|
||||
<%= f.hidden_field :subject, :required => true, value: @memo.subject %>
|
||||
<%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %>
|
||||
<%= f.hidden_field :parent_id, :required => true, value: @memo.id %>
|
||||
<%= hidden_field_tag :quote,"",:required => false,:style => 'display:none' %>
|
||||
<div nhname='toolbar_container_<%= @memo.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= @memo.id%>' name="memo[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= @memo.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= @memo.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -2,17 +2,21 @@
|
|||
<div class="ReplyToMessageContainer borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @reply, :as => :reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14"> 您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<%=link_to @org_subfield.name, organization_path(@organization, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2" ><%= @document.title %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sn-inner-newslist mt15">
|
||||
<h2 class="sn-inner-newsh2 sn-hidden"><%= @document.title %></h2>
|
||||
<div class="sn-inner-newscon">
|
||||
<p class=" sn-inner-psmall">来源:<%= @org_subfield.name %> 发布时间:<%= format_date(@document.created_at) %></p>
|
||||
<p class=" sn-inner-pcon"><%= @document.content.html_safe %></p>
|
||||
</div>
|
||||
</div>
|
||||
<!--回复-->
|
||||
<% if User.current.logged? %>
|
||||
<% comments_for_doc = @document.children.reorder("created_at desc") %>
|
||||
<% count = @document.children.count() %>
|
||||
<div class="sn-replybox">
|
||||
<h2 class="sn-reply-h2">留言板<span class="sn-fr sn-f14 sn-font-grey3 sn-mt10"><%= count %>条留言</span></h2>
|
||||
<%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'org_document_comments', :id => @document.id, :flag => true}, :html => {:multipart => true, :id => 'message_form', :class => "sn-reply-form", } do |f| %>
|
||||
<textarea class="sn-reply-text" name="org_content" id="text_submain"></textarea>
|
||||
<%#= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor', :class => "sn-reply-text" %>
|
||||
<div class="sn-reply-btnbox">
|
||||
<a href="javascript:void(0)" onclick = "org_new_files_upload()" class = "submit-btn">发表</a>
|
||||
</div>
|
||||
<p id="sub_domain_reply" style="display: none;color: #ff0000">内容不能为空</p>
|
||||
<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
|
||||
<% end %>
|
||||
|
||||
<div class="sn-reply-comment">
|
||||
<h2 class="sn-comment-h2">全部评论</h2>
|
||||
|
||||
<div id="newstyle_reply_div_<%= @document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
|
||||
<% comments_for_doc.each_with_index do |reply,i| %>
|
||||
<div class="sn-comment-listbox">
|
||||
<a href="javascript:void(0)" class="sn-reply-userpic fl"><img src="images/img-news-con.jpg" width="824" height="522" alt="" /></a>
|
||||
<%= link_to User.find(reply.creator_id).realname, user_url_in_org(reply.creator_id), :class => "sn-reply-username fl" %><span class="fl"><%= time_from_now(reply.created_at) %></span>
|
||||
<div class="fl sn-reply-usertxt ">
|
||||
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => reply.id, :content=> reply.content} %>
|
||||
<%#= reply.content.html_safe unless reply.content.nil? %>
|
||||
</div>
|
||||
<!--<a href="javascript:void(0)" target="_blank" class="sn-reply-zan fl">(100)</a>-->
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if count > 3 %>
|
||||
<div class="sn-reply-more">
|
||||
<a id="reply_btn_<%= @document.id %>" onclick="expand_reply('#newstyle_reply_div_<%= @document.id %>','#reply_btn_<%= @document.id%>')" data-count="<%= count %>" data-init="0" href="javascript:void(0)" value="show_help">
|
||||
展开更多
|
||||
</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
var replyCount = $(".sn-comment-listbox").size();
|
||||
if (replyCount >3){
|
||||
for(var i= 3; i < replyCount+1; i++){
|
||||
$(".sn-comment-listbox").eq(i).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container).children();
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
|
||||
//验证搜索时输入字
|
||||
function regexName_submain(content) {
|
||||
var name = $.trim($("#name").val());
|
||||
if (name.length == 0) {
|
||||
$("#project_name_span").text(content);
|
||||
$("#project_name_span").css('color', '#ff0000');
|
||||
$("#project_name_span").focus();
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
$("#project_name_span").text("");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
function org_new_files_upload(){
|
||||
var name = $.trim($("#text_submain").val());
|
||||
// content = $("#text_submain").val();
|
||||
if (name.length == 0) {
|
||||
$("#sub_domain_reply").show();
|
||||
}
|
||||
else {
|
||||
$("#message_form").submit();
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,17 +1,21 @@
|
|||
<div class="ReplyToMessageContainer borderBottomNone"id="reply_to_message_<%= reply.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="ReplyToMessageInputContainer mb10">
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<input type="hidden" name="org_document_comment[title]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for @org_comment, :as => :reply, :url => {:controller => 'org_document_comments',:action => 'reply', :id => @org_comment.id}, :method => 'post', :html => {:multipart => true, :id => 'new_form'} do |f| %>
|
||||
<input type="hidden" name="quote[quote]" id="quote_quote">
|
||||
<input type="hidden" name="org_document_comment[title]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="org_document_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:2px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,72 +1,84 @@
|
|||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
||||
<script>
|
||||
$(function() {
|
||||
sd_create_editor_from_data(<%= @document.id%>,null,"100%", "<%=@document.class.to_s%>");
|
||||
showNormalImage('message_description_<%= @document.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<%= link_to User.find(@document.creator_id), user_url_in_org(@document.creator_id), :class => "newsBlue mr15" %>
|
||||
TO <%= link_to @document.organization.name, organization_path(@document.organization), :class => "newsBlue" %>
|
||||
|
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<span style="color:#269ac9;">首页</span>
|
||||
<% else %>
|
||||
<span style="color:#269ac9;">组织文章</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="homepagePostTitle postGrey"><%= link_to @document.title, org_document_comment_path(:id => @document.id, :organization_id => @document.organization.id) %></div>
|
||||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_activity_day(@document.created_at) %> <%= format_time(@document.created_at, false) %></div>
|
||||
<% unless @document.content.blank? %>
|
||||
<div class="homepagePostIntro" style="width:640px;" id="intro_content_<%= @document.id%>">
|
||||
<%= @document.content.html_safe %>
|
||||
<% if @organization.switch_type && @document && !@document.org_subfield_id.blank? %>
|
||||
<%= render :partial => 'show_custom_org_document_comment' %>
|
||||
<% else %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
||||
<script>
|
||||
$(function() {
|
||||
sd_create_editor_from_data(<%= @document.id%>,null,"100%", "<%=@document.class.to_s%>");
|
||||
showNormalImage('message_description_<%= @document.id %>');
|
||||
});
|
||||
</script>
|
||||
<div class="resources" style="margin-top:<%= User.current.logged? ? '0px':'10px' %>;" id="organization_document_<%= @document.id %>">
|
||||
<div class="homepagePostBrief">
|
||||
<div class="homepagePostPortrait">
|
||||
<%= link_to image_tag(url_to_avatar(User.find(@document.creator_id)), :width => 45, :heigth => 45), user_url_in_org(@document.creator_id) %>
|
||||
</div>
|
||||
<div class="homepagePostDes">
|
||||
<div class="homepagePostTo">
|
||||
<%= link_to User.find(@document.creator_id), user_url_in_org(@document.creator_id), :class => "newsBlue mr15" %>
|
||||
TO <%= link_to @document.organization.name, organization_path(@document.organization), :class => "newsBlue" %>
|
||||
|
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<span style="color:#269ac9;">首页</span>
|
||||
<% else %>
|
||||
<span style="color:#269ac9;">组织文章</span>
|
||||
<% end %>
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<span class="red_homework_btn_cir ml5">已设为首页</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class=" fl">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @document} %>
|
||||
<%#= link_to_attachments_course @document, :author => false %>
|
||||
</div>
|
||||
<!-- <%# if defined?(home_id) %>
|
||||
<div class="homepagePostTitle postGrey"><%= link_to @document.title, org_document_comment_path(:id => @document.id, :organization_id => @document.organization.id) %></div>
|
||||
<div class="homepagePostDate">
|
||||
发布时间:<%= format_activity_day(@document.created_at) %> <%= format_time(@document.created_at, false) %></div>
|
||||
<% unless @document.content.blank? %>
|
||||
<div class="homepagePostIntro" style="width:640px;" id="intro_content_<%= @document.id%>">
|
||||
<%= @document.content.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class=" fl">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => @document} %>
|
||||
<%#= link_to_attachments_course @document, :author => false %>
|
||||
</div>
|
||||
<!-- <%# if defined?(home_id) %>
|
||||
<div style="float:right;">最后编辑:<%#= User.find() %></div>
|
||||
<%# end %>-->
|
||||
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(@document.organization_id) || User.current.id == @document.creator_id) %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id, :detail_page => 1), :method => 'delete',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:remote => true, :class => 'postOptionLink' %>
|
||||
<% if User.current.admin? || User.current.admin_of_org?(Organization.find(@document.organization_id) || User.current.id == @document.creator_id) %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<% if @document.organization.home_id == @document.id %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => @document.organization_id, :home_id => @document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "编辑文章", edit_org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id, :flag => 1), :class => "postOptionLink" %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @document.organization_id, :detail_page => 1), :method => 'delete',
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:remote => true, :class => 'postOptionLink' %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% comments_for_doc = @document.children.reorder("created_at desc") %>
|
||||
<% count = @document.children.count() %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% comments_for_doc = @document.children.reorder("created_at desc") %>
|
||||
<% count = @document.children.count() %>
|
||||
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
|
||||
<%# if count > 0 %>
|
||||
<div class="homepagePostReply fl" style="background-color: #f1f1f1;" id="<%= @document.id %>">
|
||||
<%# if count > 0 %>
|
||||
<div class="homepagePostReplyBanner">
|
||||
<div class="homepagePostReplyBannerCount">回复
|
||||
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
||||
|
@ -123,50 +135,51 @@
|
|||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%# end %>
|
||||
<%# if User.current.logged?%>
|
||||
<%# end %>
|
||||
<%# if User.current.logged?%>
|
||||
<div class="talkWrapMsg" nhname="about_talk_reply">
|
||||
<em class="talkWrapArrow"></em>
|
||||
<div class="cl"></div>
|
||||
<div class="talkConIpt ml5 mb10" id="reply<%= @document.id %>">
|
||||
<%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'org_document_comments', :id => @document.id}, :html => {:multipart => true, :id => 'message_form'} do |f| %>
|
||||
<%= f.kindeditor :org_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor' %>
|
||||
<%= f.kindeditor :org_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor' %>
|
||||
<%= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
|
||||
<%= link_to l(:button_reply), "javascript:void(0)", :onclick => "message_content_editor.sync();$('#message_form').submit();", :class => "blue_btn fr c_white mt10 mb10", :style => "margin-right: 5px;" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<%# end %>
|
||||
</div>
|
||||
</div>
|
||||
<%# end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#intro_content_<%= @document.id%> p,#intro_content_<%= @document.id%> span,#intro_content_<%= @document.id%> em").each(function(){
|
||||
var postContent = $(this).html();
|
||||
postContent = postContent.replace(/ /g," ");
|
||||
postContent= postContent.replace(/ {2}/g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
postContent=postContent.replace(/ /g," ");
|
||||
$(this).html(postContent);
|
||||
});
|
||||
autoUrl('intro_content_<%= @document.id %>');
|
||||
});
|
||||
autoUrl('intro_content_<%= @document.id %>');
|
||||
});
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
function expand_reply(container, btnid) {
|
||||
var target = $(container);
|
||||
var btn = $(btnid);
|
||||
if (btn.data('init') == '0') {
|
||||
btn.data('init', 1);
|
||||
btn.html('收起回复');
|
||||
target.show();
|
||||
} else {
|
||||
btn.data('init', 0);
|
||||
btn.html('展开更多');
|
||||
target.hide();
|
||||
target.eq(0).show();
|
||||
target.eq(1).show();
|
||||
target.eq(2).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
$("#sub_field_left_lists").html("");
|
||||
$("#sub_field_left_lists").html("<%= escape_javascript(render :partial => 'organizations/org_left_subfield_list', :locals => {:organization => @organization}) %>");
|
||||
$("#org_custom_admin").html("<%= escape_javascript(render :partial => 'organizations/org_custom_admin') %>");
|
||||
//默认选中第一个
|
||||
$("input[name='field_type']").get(0).checked=true;
|
||||
<% end %>
|
||||
$("#subfield_name").val("");
|
||||
$("#sub_dir").val("");
|
|
@ -55,9 +55,9 @@
|
|||
<% when 'Issue' %>
|
||||
<%= render :partial => 'users/project_issue', :locals => {:activity => Issue.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<% when 'Message' %>
|
||||
<%= render :partial => 'users/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'users/project_message', :locals => {:activity => Message.find(act.org_act_id),:user_activity_id =>act.id, :is_course=>0, :is_board=>0} %>
|
||||
<% when 'Project'%>
|
||||
<%= render :partial => 'users/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
||||
<%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if act.container_type == 'Course' %>
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
<div class="block-title">资源</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="admin_hide_org($(this),'<%= container.id %>');" id="hide_<%= container.id %>"><%= container.class == Course ? (container.is_excellent == 0 ? "设为精品" : "取消精品") : (container.hot ==0 ? "设为热门" : "取消热门") %></a>
|
||||
<% if User.current.admin? %>
|
||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="admin_hide_org($(this),'<%= container.id %>');" id="hide_<%= container.id %>"><%= container.class == Course ? (container.is_excellent == 0 ? "设为精品" : "取消精品") : (container.hot ==0 ? "设为热门" : "取消热门") %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -387,17 +387,21 @@
|
|||
<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 %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<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>
|
||||
<% if User.current.logged? %>
|
||||
<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 %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -131,18 +131,22 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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 class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -98,16 +98,20 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
|
||||
<div class="por_header_top">
|
||||
<div class="por_header_con" >
|
||||
<%= image_tag(url_to_avatar(@organization), width:"67", height: "61", :id => 'nh_user_tx', :class => "por_logo fl ", :target => "_blank") %>
|
||||
<%= image_tag(url_to_avatar(@organization), width:"51", height: "51", :id => 'nh_user_tx', :class => "por_logo fl mt1", :target => "_blank") %>
|
||||
<% if User.current.logged? %>
|
||||
<div class="navHomepageProfile" id="navHomepageProfile">
|
||||
<ul>
|
||||
<li class="homepageProfileMenuIcon fr mt15" id="homepageProfileMenuIcon">
|
||||
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :width =>"40", :height => "40", :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_activities_path(User.current.id) %>
|
||||
<li class="homepageProfileMenuIcon fr mt5 " id="homepageProfileMenuIcon">
|
||||
<%= link_to "<div class='user-img' id='user_avatar'>#{image_tag(url_to_avatar(User.current), :width =>"40", :height => "40", :class => "portraitRadius",:alt=>"头像", :id => "nh_user_logo")}</div>".html_safe, user_url_in_org(User.current.id) %>
|
||||
<ul class="topnav_login_list none sn-f12" id="topnav_login_list" style="text-align:left;">
|
||||
<li><%= link_to "修改资料", my_account_path, :class => "menuGrey"%></li>
|
||||
<li><%= link_to "我的组织", user_organizations_user_path(:id => User.current.id), :class => "menuGrey"%></li>
|
||||
|
@ -63,17 +64,38 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% elsif field.field_type == "Comptec" %>
|
||||
<li>
|
||||
<%= link_to "#{field.name}", teachers_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% elsif field.field_type == "Compstu" %>
|
||||
<li>
|
||||
<%= link_to "#{field.name}", students_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% elsif field.field_type == "Comppro" %>
|
||||
<li>
|
||||
<%= link_to "#{field.name}", projects_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% elsif field.field_type == "Compcou" %>
|
||||
<li>
|
||||
<%= link_to "#{field.name}", courses_organization_path(@organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% elsif field.field_type == "Compact" %>
|
||||
<li>
|
||||
<%= link_to "#{field.name}", acts_organization_path(@organization, :org_subfield_id => field.id), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% elsif field.field_type == "Resource" && field.hide == 0 %>
|
||||
<li class="nav-element">
|
||||
<li>
|
||||
<%= link_to field.name, org_subfield_files_path(field), :class => "sn-link-white", :target => "_blank" %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if User.current.admin_of_org?(@organization) %>
|
||||
<a href="<%= setting_organization_path(@organization) %>" class="link-black fr por_edit_index" target="_blank">配置</a>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<div class="cl"></div>
|
||||
</div><!--por_nav end-->
|
||||
|
||||
|
|
|
@ -8,11 +8,11 @@
|
|||
</h2>
|
||||
<ul class="por_hotbar_left fl">
|
||||
<% if acts.count > 1 %>
|
||||
<% acts[1..2].each do |activity| %>
|
||||
<% acts[1..3].each do |activity| %>
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||
<% document = activity.org_act %>
|
||||
<li>
|
||||
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
|
||||
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<li>
|
||||
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
|
@ -33,7 +33,7 @@
|
|||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{title}".html_safe, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||
<% news = activity.org_act %>
|
||||
<li>
|
||||
<%= link_to "<span class='por_icons_hot fl'>热门推荐</span>#{news.title}".html_safe, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
|
||||
<%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
|
||||
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
|
@ -54,54 +54,6 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% if acts.count > 3 %>
|
||||
<% activity = acts[3] %>
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||
<% document = activity.org_act %>
|
||||
<li>
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hot_title link-black', :target => "_blank", :title => document.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span>
|
||||
<%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||
</li>
|
||||
<% else activity.container_type == 'OrgSubfield' %>
|
||||
<% if activity.org_act_type == 'Message' and activity.org_act_id and Message.where("id=#{activity.org_act_id}").count > 0 %>
|
||||
<% message = activity.org_act %>
|
||||
<% content = message.parent_id.nil? ? message.content : message.parent.content %>
|
||||
<% title = message.parent_id.nil? ? message.subject : message.parent.subject %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<li>
|
||||
<%= link_to title, board_message_url_in_org(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||
</li>
|
||||
<% else %>
|
||||
<li>
|
||||
<%= link_to title, board_message_path(message.board.id,message.id), class: 'por_hot_title link-black', :target => "_blank", :title => title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(message.created_on) %></span>
|
||||
<%= link_to message.author.show_name, user_path(message.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => message.id, :content=> content, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||
<% news = activity.org_act %>
|
||||
<li>
|
||||
<%= link_to news.title, news_path(news), class: 'por_hot_title link-black', :target => "_blank", :title => news.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(news.created_on) %></span>
|
||||
<%= link_to news.author.show_name, user_path(news.author), :class => "por_hot_name link-blue", :target => "_blank" %>
|
||||
</p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => news.id, :content=> news.description, :maxheight => 60, :maxwordsnum => 80, :maxwidth => 0, :cl => "por_hot_txt"} %>
|
||||
</li>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
</ul>
|
||||
|
||||
<%# if acts.count > 3 %>
|
||||
|
@ -114,9 +66,11 @@
|
|||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{get_image_path_from_content(document.content)}", :width => "299", :height => "246"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||
<div style="background: #f8fafb;">
|
||||
<%= link_to document.title, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :class => 'por_hot_title_r link-black', :target => "_blank", :title => document.title %>
|
||||
<p class="mt5 mb5"><span class="por_time mr10"><%= time_from_now(document.created_at) %></span><%= link_to document.creator.show_name, user_path(document.creator), :class => "por_hot_name link-blue", :target => "_blank" %></p>
|
||||
<%=render :partial =>"organizations/organization_content_extension", :locals => {:user_activity_id => document.id, :content=> document.content, :maxheight => 80, :maxwordsnum => 90, :maxwidth => 0, :cl => "por_hot_txt_r"} %>
|
||||
</div>
|
||||
</div>
|
||||
<% else activity.container_type == 'OrgSubfield' %>
|
||||
<!--发送过来的帖子-->
|
||||
|
|
|
@ -71,8 +71,8 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless acts[1..5].nil? %>
|
||||
<% acts[1..5].each do |activity| %>
|
||||
<% unless acts[1..4].nil? %>
|
||||
<% acts[1..4].each do |activity| %>
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||
<% document = activity.org_act %>
|
||||
<ul class="por_post_list">
|
||||
|
@ -110,10 +110,10 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% unless acts[6..19].nil? %>
|
||||
<% unless acts[5..16].nil? %>
|
||||
<div class="fl">
|
||||
<ul class="por_post_right por_post_list">
|
||||
<% acts[6..19].each do |activity| %>
|
||||
<% acts[6..16].each do |activity| %>
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' %>
|
||||
<% document = activity.org_act %>
|
||||
<li><%= link_to "<span class='post_icons_grey fl'></span>#{document.title}".html_safe, org_document_comment_path(:id => document.id, :organization_id => document.organization.id), class: 'por_hidden_w270 link-black', :target => "_blank" %></li>
|
||||
|
|
|
@ -33,9 +33,6 @@
|
|||
<li id="por_teachers_nav_1" class="por_teachers_hover" onclick="HoverLi(1);">
|
||||
<a href="javascript:void(0);" class="por_teachers_type">名师风采</a>
|
||||
</li>
|
||||
<li id="por_teachers_nav_2" onclick="HoverLi(2);">
|
||||
<a href="javascript:void(0);" class="por_teachers_type">学生英雄榜</a>
|
||||
</li>
|
||||
<!--<a href="javascript:void(0);" target="_blank" class="f12 fontGrey2 fr mt5">更多></a>-->
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
|
@ -65,29 +62,6 @@
|
|||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="por_teachers_content_2" class="undis">
|
||||
<ul class="por_teachers_li">
|
||||
<% excellent_students.each do |student| %>
|
||||
<li >
|
||||
<%= link_to image_tag(url_to_avatar(student), :width => "43", :height => "43", :class => "por_teachers_img fl mr15"), user_path(student), :alt => "用户头像", :target => '_blank', :class => "fl" %>
|
||||
<div class="por_teachers_txt fl mt5">
|
||||
<%=link_to student.try(:realname) ? student.try(:realname) :student.try(:login), user_path(student), :class => "por_teachers_name link-black fl", :target => '_blank' %>
|
||||
<p class="por_teachers_p fr" title="<%= student.my_workplace %>"><%= student.my_workplace %></p>
|
||||
<div class="cl"></div>
|
||||
<p class="por_teachers_span ">
|
||||
<% unless student.my_blogs_count == 0 %>
|
||||
<span class=" mr10">博客 <%= student.my_blogs_count %></span>
|
||||
<% end %>
|
||||
<% unless student.courses.count == 0 %>
|
||||
<span class="mr10">课程 <%= student.courses.count %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -117,27 +117,23 @@
|
|||
<a href="javascript:void(0);" class="homepageLeftMenuMoreIcon" onclick="$('#PostDomain_<%= field.id %>').slideToggle();" style="border-bottom: 1px solid #ddd;"></a>
|
||||
</li>
|
||||
<% end %>
|
||||
<% elsif field.field_type == "Comptec" && User.current.admin? %>
|
||||
<% elsif field.field_type == "Comptec" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<%= link_to "#{field.name}", teachers_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
<% elsif field.field_type == "Compstu" && User.current.admin? %>
|
||||
<% elsif field.field_type == "Compstu" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
<% elsif field.field_type == "Compstu" && User.current.admin? %>
|
||||
<% elsif field.field_type == "Comppro" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", students_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
<% elsif field.field_type == "Comppro" && User.current.admin? %>
|
||||
<% elsif field.field_type == "Compcou" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", projects_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
<%= link_to "#{field.name}", courses_organization_path(organization, :org_subfield_id => field.id, :type => "#{User.current.admin? ? "" : "famous"}"), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
<% elsif field.field_type == "Compcou" && User.current.admin? %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", courses_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
<% elsif field.field_type == "Compact" && User.current.admin? %>
|
||||
<% elsif field.field_type == "Compact" %>
|
||||
<div class="homepageLeftMenuBlock">
|
||||
<%= link_to "#{field.name}", acts_organization_path(organization, :org_subfield_id => field.id), :class => "homepageMenuText homepageMenuControl hidden", :onclick => "$('#homepageLeftMenuPost').slideToggle();" %>
|
||||
</div>
|
||||
|
|
|
@ -115,16 +115,20 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_in_org_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_in_org_issue_path(activity.id),:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="block-title">资源数</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if User.current.admin_of_org?(@organization) %>
|
||||
<% if User.current.admin? %>
|
||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_student.id %>');" id="hide_<%= org_student.id %>"><%= org_student.excellent_student ==0 ? "设为学霸" : "取消设置" %></a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -103,17 +103,21 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -87,16 +87,20 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -28,15 +28,8 @@
|
|||
<div class="block-title">资源数</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if User.current.admin_of_org?(@organization) %>
|
||||
<% if User.current.admin? %>
|
||||
<a href="javascript:void(0);" class="fr teacher-select" onclick="hide($(this),'<%= org_teacher.id %>');" id="hide_<%= org_teacher.id %>"><%= org_teacher.excellent_teacher==0?"设为名师":"取消设置" %></a>
|
||||
<!--<a href="javascript:void(0);" class="fr teacher-select">设为名师</a>-->
|
||||
<% else %>
|
||||
<!--<%# if(org_teacher.watched_by?(User.current)) %>-->
|
||||
<!--<%#= link_to "取消关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "delete",:remote => "true", :title => "取消关注"%>-->
|
||||
<!--<%# else %>-->
|
||||
<!--<%#= link_to "添加关注",watch_path(:object_type=> 'user',:object_id=>org_teacher.id,:target_id=>org_teacher.id),:class => "fr teacher-select", :method => "post",:remote => "true", :title => "添加关注"%>-->
|
||||
<!--<%# end %>-->
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -108,17 +108,21 @@
|
|||
<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"), user_url_in_org(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14">
|
||||
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||
</div>
|
||||
</div>
|
||||
<% if @subfield_acts.blank? %>
|
||||
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||
<% else %>
|
||||
|
||||
<div class="sn-inner-newslist mt15">
|
||||
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
|
||||
<ul>
|
||||
<% @subfield_acts.each do |act| %>
|
||||
<% title = subfield_title_type(act) %>
|
||||
<% time = subfield_time_type(act) %>
|
||||
<% reply_count = subfield_reply_count_type(act) %>
|
||||
<% document = act.org_act %>
|
||||
<li>
|
||||
<div class="sn-circle fl"></div>
|
||||
<% if act.org_act_type == "OrgDocumentComment" %>
|
||||
<%=link_to title, org_document_comment_path(act.org_act, :organization_id => @organization.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif act.org_act_type == "News" %>
|
||||
<%=link_to title, news_path(act.org_act), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif act.org_act_type == "Message" %>
|
||||
<%=link_to title, board_message_path(act.org_act.board.id, act.org_act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% end %>
|
||||
<span class=" txt-grey fr"><%= format_date(time) %></span>
|
||||
<span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= reply_count %>)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<!--<div>-->
|
||||
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -41,8 +41,14 @@
|
|||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% if document.organization.home_id == document.id %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'cancel_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">取消首页</a>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id, :show_homepage => 1}, :method => "put", :remote => true) do |f| %>
|
||||
<a href="javascript:void(0);" class="postOptionLink" onclick="$(this).parent().submit();">设为首页</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
|
@ -88,17 +94,21 @@
|
|||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
||||
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
|
||||
<div nhname='toolbar_container_<%= act.id %>'></div>
|
||||
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
||||
<%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
|
||||
<div nhname='toolbar_container_<%= act.id %>'></div>
|
||||
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="org_content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
||||
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= act.id %>'></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= act.id %>'></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
<li class="orgListType"><%= org_subfield_type field %></li>
|
||||
<li class="orgListCatalog hidden">
|
||||
<% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %>
|
||||
<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; width:30px; margin-left:20px;" title="双击可编辑">
|
||||
<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; width:75px;overflow: hidden; white-space: nowrap;text-overflow: ellipsis;" title="双击可编辑">
|
||||
<%= field.subfield_subdomain_dir.nil? ? '未设置': field.subfield_subdomain_dir.name %>
|
||||
</div>
|
||||
<% else %>
|
||||
|
@ -89,7 +89,11 @@
|
|||
<li class="orgListOperation">
|
||||
<a href="javascript:void(0);" class="linkGrey fr ml5 mr10" onclick="hide($(this),'<%= field.id %>');" id="hide_<%= field.id %>"><%= field.hide==0?"隐藏":"可见" %></a>
|
||||
<span class="fr">|</span>
|
||||
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
|
||||
<% if (field.field_type == "Comptec" || field.field_type == "Compstu" || field.field_type == "Comppro" || field.field_type == "Compcou" || field.field_type == "Compact") && !User.current.admin? %>
|
||||
<span class = "linkGrey fr ml5 mr5">默认</span>
|
||||
<% else %>
|
||||
<%= link_to "删除", org_subfield_path(field), :method => 'delete', :remote => true, :confirm => "您确定删除吗?", :class => "linkGrey fr ml5 mr5" %>
|
||||
<% end %>
|
||||
<span class="fr">|</span>
|
||||
<a href="javascript:void(0);" class="linkGrey fr ml5 mr5" onclick="edit('#subfield_show_<%= field.id %>','#subfield_edit_<%= field.id %>');">编辑</a>
|
||||
<% unless field.field_type == "Resource" || field.field_type == "Comptec" || field.field_type == "Compstu" || field.field_type == "Comppro" || field.field_type == "Compcou" || field.field_type == "Compact" %>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
//获取登录页面地址
|
||||
var signinPath = '<%= signin_url_without_domain %>';
|
||||
var htmlvalue = "</br><div style='width:550px;text-align:center'>您还没有登录,请登录后再执行此操作,谢谢!</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href="+signinPath+" class='Blue-btn fl' target='_Blank' onclick=' hideModal()' >登录</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>关闭</a></div>";
|
||||
pop_up_box(htmlvalue,580,30,50);
|
|
@ -0,0 +1,52 @@
|
|||
<% if @org_acts.blank? %>
|
||||
<p class="fontGrey2 f14 mt10 mb5">该模块暂时没有相关内容</p>
|
||||
<% else %>
|
||||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-font-grey3 f14">
|
||||
您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> >
|
||||
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sn-inner-newslist mt15">
|
||||
<h2 class="sn-inner-newsh2"><%= @org_subfield.name %></h2>
|
||||
<ul>
|
||||
<% @org_acts.each do |obj| %>
|
||||
<% user = org_user_by_type(obj) %>
|
||||
<% title = org_title_by_type(obj) %>
|
||||
<% content = org_content_by_type(obj) %>
|
||||
<% time = org_time_by_type(obj) %>
|
||||
<% reply_count = org_reply_count_type(obj) %>
|
||||
<li>
|
||||
<div class="sn-circle fl"></div>
|
||||
<% if obj.act_type == "Message" %>
|
||||
<%= link_to title, board_message_path(obj.act.board.id, obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "News" %>
|
||||
<%= link_to title, news_path(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "HomeworkCommon" %>
|
||||
<%= link_to title, student_work_index_url_in_org(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% elsif obj.act_type == "Issue" %>
|
||||
<%= link_to title, issue_path(obj.act.id), :class => "sn-newslist-titile fl", :target => "_blank" %>
|
||||
<% end %>
|
||||
|
||||
|
||||
|
||||
|
||||
<span class=" txt-grey fr"><%= format_date(time) %></span>
|
||||
<span class="sn-newslist-reply fr mr10 txt-grey">回复(<%= reply_count %>)</span>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<!--<div>-->
|
||||
<!--<ul class="sn-inner-pages" id="pages" style="margin-top: 5px;">-->
|
||||
<!--<%#= pagination_links_full @atta_pages, @atta_count, :per_page_links => true, :remote => @is_remote, :flag => true %>-->
|
||||
<!--<div class="cl"></div>-->
|
||||
<!--</ul>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -14,9 +14,11 @@
|
|||
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||
<% end %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% if User.current.admin? %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "精品课程", courses_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="org_container_list">
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$("#org_student_search").attr('href','<%= courses_organization_path(@organization, :type => @type) %>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
//$("#org_student_search").attr('href','<%#= courses_organization_path(@organization, :type => @type) %>');
|
|
@ -14,9 +14,11 @@
|
|||
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||
<% end %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% if User.current.admin? %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "热门项目", projects_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="org_container_list">
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
$("#org_container_list").html('<%= escape_javascript( render :partial => 'organizations/org_container', :locals => {:containers => @containers})%>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$("#org_student_search").attr('href','<%= projects_organization_path(@organization, :type => @type) %>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @container_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
|
|
|
@ -75,9 +75,9 @@
|
|||
<div class="orgRow mb10 mt5">
|
||||
<span style="margin-left:10px;" >显示模式 : </span>
|
||||
<input type="radio" id="show_mode_ordinary" value="0" name="show_mode" style="margin-left:5px;" <%= @organization.show_mode == 0 ? "checked" : "" %> />
|
||||
<label for="show_mode_ordinary">社区模式一</label>
|
||||
<label for="show_mode_ordinary">简洁模式</label>
|
||||
<input type="radio" id="show_mode_special" value="1" name="show_mode" style="margin-left:10px;" <%= @organization.show_mode == 1 ? "checked" : "" %> />
|
||||
<label for="show_mode_special">社区模式二</label>
|
||||
<label for="show_mode_special">门户模式</label>
|
||||
</div>
|
||||
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开 : </span>
|
||||
<input type="checkbox" id="is_public" onclick="disable_down($(this), $('#allow_download'),$('#allow_down_hint'));" name="organization[is_public]" <%= @organization.is_public ? 'checked': ''%> class="ml3" />
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
<%# 区分两种模式 params[:org_subfield_id] 不为空的时候则跳到栏目%>
|
||||
<% if @organization.switch_type && params[:org_subfield_id].nil? %>
|
||||
<%= render :partial => 'show_custom' %>
|
||||
<% if @organization.switch_type %>
|
||||
<% if params[:org_subfield_id].nil? %>
|
||||
<%= render :partial => 'show_custom' %>
|
||||
<% else %>
|
||||
<%#= 单个栏目模式二中显示 %>
|
||||
<%= render :partial => 'show_custom_org_subfield' %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= javascript_include_tag "jquery.infinitescroll.js" %>
|
||||
|
||||
|
|
|
@ -14,9 +14,11 @@
|
|||
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :class => "teacher-search-icon fl" %>
|
||||
<!--<a href="javascript:void(0);" onclick='this.parent.submit();return false;' class="searchIcon"></a>-->
|
||||
<% end %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% if User.current.admin? %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "学霸列表", students_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="org_students_list">
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
$("#org_students_list").html('<%= escape_javascript( render :partial => 'organizations/org_students_list', :locals => {:org_students => @org_students})%>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$("#org_student_search").attr('href','<%= students_organization_path(@organization, :type => @type) %>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @students_count, :per_page_links => false, :remote => true, :flag => true %>');
|
||||
|
|
|
@ -22,9 +22,11 @@
|
|||
<!--<option value="2">学生数</option>-->
|
||||
<!--<option value="3">资源数</option>-->
|
||||
<!--</select>-->
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% if User.current.admin? %>
|
||||
<div class="sn-font-grey fr">
|
||||
<%= link_to "名师列表", teachers_organization_path(@organization, :type => "famous", :org_subfield_id => @field.id), :class => "fontGrey2" %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div id="org_teachers_list">
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
$("#org_teachers_list").html('<%= escape_javascript( render :partial => 'organizations/org_teachers_list', :locals => {:org_teachers => @org_teachers})%>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => @is_remote, :flag => true %>');
|
||||
$("#org_teacher_search").attr('href','<%= teachers_organization_path(@organization, :type => @type) %>');
|
||||
$("#pages").html('<%= pagination_links_full @atta_pages, @teachers_count, :per_page_links => false, :remote => true, :flag => true %>');
|
|
@ -67,16 +67,20 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -123,17 +123,20 @@
|
|||
<%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %>
|
||||
</div>
|
||||
<div class="homepagePostReplyInputContainer">
|
||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
||||
<%= form_for('new_form', :url => add_reply_org_subfield_sub_domain_sub_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
|
||||
<div nhname='toolbar_container_<%= act.id %>'></div>
|
||||
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="sub_content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
||||
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= act.id %>'></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= act.id %>' style="display:none;">
|
||||
<%= form_for('new_form', :url => add_reply_org_subfield_sub_domain_sub_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="org_activity_id" value="<%= act.id %>"/>
|
||||
<div nhname='toolbar_container_<%= act.id %>'></div>
|
||||
<textarea placeholder="有问题或建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= act.id %>' name="sub_content"></textarea>
|
||||
<a id="new_message_submit_btn_<%= act.id %>" href="javascript:void(0)" class="blue_n_btn fr" style="display:none;margin-top:6px;line-height:18px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= act.id %>'></p>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -319,17 +319,21 @@
|
|||
<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 %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<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 %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="homework_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -70,20 +70,24 @@
|
|||
<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 => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id}, :method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -49,33 +49,35 @@
|
|||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
|
||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:class => 'postOptionLink'
|
||||
) if activity.course_editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.course_destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:class => 'postOptionLink'
|
||||
) if activity.course_editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.course_destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
@ -116,18 +118,22 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => is_board,is_course=>is_course},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => is_board,is_course=>is_course},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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 class="cl"></div>
|
||||
<p nhname='contentmsg_<%= user_activity_id%>'></p>
|
||||
<% end%>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -35,31 +35,33 @@
|
|||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{controller:'news', :action => 'edit', :id => activity.id},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(activity),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{controller:'news', :action => 'edit', :id => activity.id},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(activity),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if User.current.allowed_to?(:manage_news, activity.course) %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -92,16 +94,20 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -13,29 +13,31 @@
|
|||
<% end %> TO
|
||||
<%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%>
|
||||
</div>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
</li>
|
||||
<li>
|
||||
<% if !defined?(project_id) && !defined?(user_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(project_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(user_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li>
|
||||
<%= link_to l(:button_edit), issue_path(activity.id, :edit => 'true'), :class => 'postOptionLink', :accesskey => accesskey(:edit) if activity.editable? && User.current.allowed_to?(:edit_issues, activity.project) %>
|
||||
</li>
|
||||
<li>
|
||||
<% if !defined?(project_id) && !defined?(user_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(project_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "project_page", :page_id => project_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% elsif defined?(user_id) %>
|
||||
<%= link_to l(:button_delete), issue_path(activity.id, :page_classify => "user_page", :page_id => user_id), :data => {:confirm => issues_destroy_confirmation_message(activity)}, :method => :delete, :class => 'postOptionLink' if User.current.allowed_to?(:delete_issues, activity.project) %>
|
||||
<% end %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to l(:button_copy), project_copy_issue_path(activity.project, activity), :class => 'postOptionLink' if User.current.allowed_to?(:add_issues, activity.project) %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="homepagePostTitle break_word">
|
||||
<% case activity.tracker_id %>
|
||||
<% when 1%>
|
||||
|
|
|
@ -27,16 +27,20 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id %>' style="display:none;">
|
||||
<%= form_for('new_form',:url => add_journal_issue_path(activity.id, :user_activity_id => user_activity_id),:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -49,33 +49,35 @@
|
|||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:class => 'postOptionLink'
|
||||
) if activity.editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting" id="message_setting_<%= user_activity_id%>" style="display: none">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<ul class="homepagePostSettiongText">
|
||||
<% if activity.author.id == User.current.id%>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
edit_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:class => 'postOptionLink'
|
||||
) if activity.editable_by?(User.current) %>
|
||||
</li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_delete),
|
||||
delete_board_message_path(activity.id,:board_id=>activity.board_id,:is_course=>is_course,:is_board=>is_board),
|
||||
:method => :post,
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.destroyable_by?(User.current) %>
|
||||
</li>
|
||||
<% end %>
|
||||
<li><%= link_to "发送", "javascript:void(0);", :onclick => "show_send(#{activity.id}, #{User.current.id}, 'message');", :class => "postOptionLink" %></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -111,17 +113,21 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller=>'messages',:action => 'reply', :id => activity.id, :board_id => activity.board_id, :is_board => 'true'},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="reply[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -32,31 +32,33 @@
|
|||
<div class="mt10" style="font-weight:normal;">
|
||||
<%= render :partial=>"attachments/activity_attach", :locals=>{:activity => activity} %>
|
||||
</div>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => activity},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.author == User.current %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(activity),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.author == User.current %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div class="homepagePostSetting">
|
||||
<ul>
|
||||
<li class="homepagePostSettingIcon">
|
||||
<% if User.current.logged? %>
|
||||
<ul class="homepagePostSettiongText">
|
||||
<li><%= link_to("发送", 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{activity.id}',#{User.current.id},'news')") %></li>
|
||||
<li>
|
||||
<%= link_to(
|
||||
l(:button_edit),
|
||||
{:action => 'edit', :id => activity},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.author == User.current %>
|
||||
</li>
|
||||
<li>
|
||||
<%= delete_link(
|
||||
news_path(activity),
|
||||
:data => {:confirm => l(:text_are_you_sure)},
|
||||
:class => 'postOptionLink'
|
||||
) if activity.author == User.current %>
|
||||
</li>
|
||||
</ul>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
@ -89,16 +91,20 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'comments', :action => 'create', :id => activity},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="comment"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
<div class="orig_reply_box borderBottomNone" id="reply_to_message_<%= reply.id%>">
|
||||
<div class="homepagePostReplyPortrait mr15 imageFuzzy" id="reply_image_<%= reply.id%>"><%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33"), user_path(User.current), :alt => "用户头像" %></div>
|
||||
<div class="orig_textarea mb10 fl">
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="is_in_course" value=<%=@is_in_course %>>
|
||||
<input type="hidden" name="user_activity_id" value=<%=@user_activity_id %>>
|
||||
<input type="hidden" name="course_activity" value=<%=@course_activity %>>
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= reply.id%>'>
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'reply_to_homework', :id => reply.id},:method => "post", :remote => true) do |f| %>
|
||||
<input type="hidden" name="is_in_course" value=<%=@is_in_course %>>
|
||||
<input type="hidden" name="user_activity_id" value=<%=@user_activity_id %>>
|
||||
<input type="hidden" name="course_activity" value=<%=@course_activity %>>
|
||||
<input type="hidden" name="reply[subject]" id="reply_subject">
|
||||
<div nhname='toolbar_container_<%= reply.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= reply.id%>' name="reply_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= reply.id%>" href="javascript:void(0)" onclick="this.style.display='none'" class="blue_n_btn fr" style="display:none;margin-top:6px;">发送</a>
|
||||
<div class="cl"></div>
|
||||
<p nhname='contentmsg_<%= reply.id%>'></p>
|
||||
<% end%>
|
||||
</div>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<div class="visitor-box fontGrey2">
|
||||
<a href='<%= signin_url_without_domain %>' class='linkBlue' target='_Blank' >登录</a>后可添加回复
|
||||
<%#= link_to "登录", signin_path, :class => "linkBlue", :target => "_blank" %>
|
||||
</div>
|
|
@ -74,21 +74,25 @@
|
|||
<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"), user_path(activity.author_id), :alt => "用户头像" %></div>
|
||||
<div class="homepagePostReplyInputContainer mb10">
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="in_user_center" value="true">
|
||||
<input type="hidden" name="blog_comment[sticky]" value="0">
|
||||
<input type="hidden" name="blog_comment[locked]" value="0">
|
||||
<input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'blog_comments', :action => 'reply', :user_id=>activity.author_id,:blog_id=>activity.blog_id,:id=>activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<input type="hidden" name="quote[quote]" value="">
|
||||
<input type="hidden" name="in_user_center" value="true">
|
||||
<input type="hidden" name="blog_comment[sticky]" value="0">
|
||||
<input type="hidden" name="blog_comment[locked]" value="0">
|
||||
<input type="hidden" name="blog_comment[title]" value="RE:<%= activity.title%>">
|
||||
<input type="hidden" name="user_activity_id" value="<%=user_activity_id%>">
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="blog_comment[content]"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -329,17 +329,21 @@
|
|||
<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 %>
|
||||
<div nhname='toolbar_container_<%= homework_common.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<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 %>
|
||||
<div nhname='toolbar_container_<%= homework_common.id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= homework_common.id%>' name="homework_message"></textarea>
|
||||
<a id="new_message_submit_btn_<%= homework_common.id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -91,21 +91,25 @@
|
|||
<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 => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% if User.current.logged? %>
|
||||
<div nhname='new_message_<%= user_activity_id%>' style="display:none;">
|
||||
<%= form_for('new_form',:url => {:controller => 'words', :action => 'create_reply', :id => activity.id},:method => "post", :remote => true) do |f|%>
|
||||
<%= hidden_field_tag 'reference_id', params[:reference_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'reference_user_id', params[:reference_user_id], :value => activity.user.id %>
|
||||
<%= hidden_field_tag 'reference_message_id', params[:reference_message_id], :value => activity.id %>
|
||||
<%= hidden_field_tag 'show_name',params[:show_name],:value =>true %>
|
||||
<%= hidden_field_tag 'user_activity_id',params[:user_activity_id],:value =>user_activity_id %>
|
||||
<%= hidden_field_tag 'is_activity',params[:is_activity],:value =>is_activity %>
|
||||
<div nhname='toolbar_container_<%= user_activity_id%>'></div>
|
||||
<textarea placeholder="有问题或有建议,请直接给我留言吧!" style="display: none" nhname='new_message_textarea_<%= user_activity_id%>' name="user_notes"></textarea>
|
||||
<a id="new_message_submit_btn_<%= user_activity_id%>" href="javascript:void(0)" onclick="this.style.display='none'" 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>
|
||||
<% else %>
|
||||
<%= render :partial => "users/show_unlogged" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -326,7 +326,7 @@
|
|||
|
||||
</ul>
|
||||
<% end %>
|
||||
<% if ma.course_message_type == "StudentWorksScore" %>
|
||||
<% if ma.course_message_type == "StudentWorksScore" && ma.course_message %>
|
||||
<ul class="homepageNewsList fl">
|
||||
<li class="homepageNewsPortrait fl">
|
||||
<% if ma.course_message.reviewer_role == 3 %>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
$("#user_brief_introduction_show").html("<%= escape_javascript render(:partial => "layouts/user_brief_introduction", :locals => {:user => @user}) %>");
|
||||
$("#user_brief_introduction_show").show();
|
||||
$("#user_brief_introduction_edit").hide();
|
||||
$("#user_brief_introduction_edit").hide();
|
||||
autoUrl("user_brief_introduction_show");
|
||||
|
|
|
@ -1,29 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<html ng-app="wechat">
|
||||
<head>
|
||||
<base href="/">
|
||||
<title>我的动态</title>
|
||||
<meta charset='utf-8' />
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="" />
|
||||
<meta name="apple-mobile-web-app-capable" content="no">
|
||||
<meta name="apple-mobile-web-app-capable" content="no" />
|
||||
<meta content='True' name='HandheldFriendly' />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
|
||||
<link type="text/css" rel="stylesheet" href="/stylesheets/weui/weixin.css" />
|
||||
|
||||
<script type="text/javascript">
|
||||
window.g_openid = '<%= @wechat_user.openid %>';
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div ng-view>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="/javascripts/wechat/angular.js"></script>
|
||||
<script src="/javascripts/wechat/angular-route.js"></script>
|
||||
<script src="/javascripts/wechat/angular-sanitize.min.js"></script>
|
||||
<script src="/javascripts/wechat/angular-cookies.js"></script>
|
||||
<script src="/javascripts/jquery-1.3.2.js"></script>
|
||||
<script src="/javascripts/wechat/build/angular.all.min.js"></script>
|
||||
<script src="/javascripts/wechat/app.js"></script>
|
||||
</body>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue