Merge branch 'hjq_beidou' into develop
This commit is contained in:
commit
fdb1846f75
|
@ -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 ? 'base_org_custom' : 'base_org'}
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
@ -91,7 +96,7 @@ 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]
|
||||
@comment.content = params[:org_content]
|
||||
@document.children << @comment
|
||||
@document.save
|
||||
respond_to do |format|
|
||||
|
|
|
@ -28,8 +28,9 @@ class OrganizationsController < ApplicationController
|
|||
helper :project_score
|
||||
helper :issues
|
||||
include UsersHelper
|
||||
include OrganizationsHelper
|
||||
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]
|
||||
# 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)
|
||||
|
@ -102,7 +107,7 @@ class OrganizationsController < ApplicationController
|
|||
if @organization.org_subfields.where(:field_type => "Compact", :hide => 0).count > 0
|
||||
@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;")
|
||||
order by updated_at desc limit 6;")
|
||||
end
|
||||
render :layout => 'base_org_custom'
|
||||
else
|
||||
|
@ -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"
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -3,7 +3,7 @@ class SubDocumentCommentsController < ApplicationController
|
|||
before_filter :find_subfield_content, :only => [:show, :index]
|
||||
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
|
||||
|
|
|
@ -66,52 +66,87 @@ 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.updated_on
|
||||
when "News"
|
||||
user = obj.act.created_on
|
||||
obj.act.created_on
|
||||
when "HomeworkCommon"
|
||||
user = obj.act.updated_at
|
||||
obj.act.updated_at
|
||||
when "Issue"
|
||||
user = obj.act.updated_on
|
||||
obj.act.updated_on
|
||||
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
|
||||
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 +213,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)
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
||||
<%# 内容开始 %>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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,72 +1,75 @@
|
|||
<%= 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 %>
|
||||
<%= 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 %>
|
||||
</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>
|
||||
<%= 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' %>
|
||||
</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 +126,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 %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -63,8 +63,28 @@
|
|||
<% 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 %>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
<% if @subfield_acts.blank? %>
|
||||
<% 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>
|
||||
<% @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>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -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" %>
|
||||
|
|
|
@ -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) %>');
|
|
@ -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 %>');
|
||||
|
|
|
@ -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" %>
|
||||
|
||||
|
|
|
@ -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 %>');
|
||||
|
|
|
@ -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 %>');
|
|
@ -1,14 +1,6 @@
|
|||
@charset "utf-8";
|
||||
/* CSS Document */
|
||||
/* 样式重置 */
|
||||
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{ margin:0; padding:0;}
|
||||
body,table,input,textarea,select,button { font-family: "微软雅黑","宋体"; font-size:12px;line-height:1.9; background:#f2f2f2;}
|
||||
div,img,tr,td,table{ border:0;}
|
||||
table,tr,td{border:0;cellspacing:0; cellpadding:0;}
|
||||
ol,ul,li{ list-style-type:none}
|
||||
a:link,a:visited{color:#000;text-decoration:none;}
|
||||
a:hover,a:active{color:#24366e;}
|
||||
|
||||
.sn-fl {float:left;}
|
||||
.sn-fr {float:right;}
|
||||
.sn-cl {clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}
|
||||
|
@ -166,17 +158,17 @@ a.more-btn{ display:block; width:185px; height:30px; text-align:center; backgrou
|
|||
|
||||
/* 内页新闻列表 */
|
||||
.sn-inner-body{ width:100%; background-color:#fff;}
|
||||
.sn-innner-content{ width:1200px; margin:0 auto;}
|
||||
.sn-innner-content{ width:1000px; margin:0 auto;}
|
||||
.sn-inner-newsh2{ font-size:20px; font-weight:normal; padding-bottom:5px; border-bottom:1px dashed #eee;}
|
||||
.sn-circle{ margin:18px 5px 0 5px ;border:1px solid #24366e; width:5px; height:5px; -webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px; }
|
||||
.sn-inner-newslist ul li{ line-height:42px; font-size:15px; border-bottom:1px solid #eee;}
|
||||
.sn-inner-newslist a{font-size:15px; color:#888;}
|
||||
.sn-inner-newslist a:hover{ color:#24366e;}
|
||||
a.sn-newslist-titile{ font-size:15px;width:840px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;}
|
||||
a.sn-newslist-titile{ font-size:15px;width:700px; display:block;overflow:hidden;white-space:nowrap; text-overflow:ellipsis;}
|
||||
a:hover.sn-newslist-reply,a:hover.sn-newslist-zan{ color:#379be9;}
|
||||
|
||||
/* 内页新闻展示 */
|
||||
.sn-inner-newscon{ width:1200px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; }
|
||||
.sn-inner-newscon{ width:1000px; padding:5px 0 50px; border-bottom:1px solid #e8e8e8; margin-bottom:30px; color:#999; font-size:14px; }
|
||||
.sn-inner-pcon{text-indent:2em; overflow:hidden;}
|
||||
.sn-inner-newscon img{ display:block; max-width:830px; margin:25px auto 5px;}
|
||||
.sn-inner-psmall{ color:#999; font-size:12px; margin-bottom:15px;}
|
||||
|
@ -186,8 +178,8 @@ a:hover.sn-newslist-zan{ background:url(../images/zan.gif) 0 -21px no-repeat; }
|
|||
/* 留言 */
|
||||
.sn-replybox{ margin-bottom:100px;}
|
||||
.sn-reply-h2{ font-size:18px; font-weight:normal; color:#24366e; margin-bottom:6px;}
|
||||
.sn-reply-form{ width:1200px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; }
|
||||
.sn-reply-text{ width:1200px; height:130px; background:#fff; border:none; resize:none;}
|
||||
.sn-reply-form{ width:1000px;height:180px; border:1px solid #e8e8e8; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#fff; margin-bottom:20px; }
|
||||
.sn-reply-text{ width:1000px; height:130px; background:#fff; border:none; resize:none;}
|
||||
.sn-reply-btnbox{border-top:1px solid #e8e8e8; height:48px;}
|
||||
a.submit-btn{ display:block; color:#fff; text-align:center; font-size:14px; line-height:27px; width:79px; height:27px; -webkit-border-radius:3px; -moz-border-radius:3px; -o-border-radius:3px; border-radius:3px; background:#24366e; margin:8px 0 0 10px;}
|
||||
a:hover.submit-btn{ color:#16275c; color:#fff;}
|
||||
|
@ -196,10 +188,10 @@ a:hover.submit-btn{ color:#16275c; color:#fff;}
|
|||
.sn-reply-userpic img{ width:40px; height:40px;-webkit-border-radius:50px; -moz-border-radius:50px; -o-border-radius:50px; border-radius:50px;}
|
||||
a.sn-reply-zan{ display:block; background:url(../images/zan.gif) 0 4px no-repeat; width:54px; height:16px; padding-left:12px; color:#999; }
|
||||
a:hover.sn-reply-zan{ background:url(../images/zan.gif) 0 -32px no-repeat; }
|
||||
.sn-comment-listbox{ padding:23px 0; width:1200px;border-bottom:1px solid #e8e8e8;}
|
||||
.sn-comment-listbox{ padding:23px 0; width:1000px;border-bottom:1px solid #e8e8e8;}
|
||||
a.sn-reply-username { color:#24366e; margin-right:15px; }
|
||||
.sn-reply-usertxt{ width:1145px; font-size:14px; }
|
||||
.sn-reply-more{ width:1200px; height:25px; background:#ddd; text-align:center; line-height:25px;}
|
||||
.sn-reply-usertxt{ width:945px; font-size:14px; }
|
||||
.sn-reply-more{ width:1000px; height:25px; background:#ddd; text-align:center; line-height:25px;}
|
||||
|
||||
/*用户图像*/
|
||||
.topnav_login_list{ border:1px solid #eaeaea; background:#fff; padding-left:10px; padding-bottom:10px; padding-top:8px; width:60px; left:-7px; position:absolute; z-index:9999; line-height:2; box-shadow: 0px 2px 8px rgba(146, 153, 169, 0.5); margin-top: 1px;}
|
||||
|
|
Loading…
Reference in New Issue