二级目录新界面的帖子列表页面
This commit is contained in:
parent
44f0615763
commit
2b4f16e5f1
|
@ -37,14 +37,21 @@ class SubDocumentCommentsController < ApplicationController
|
|||
end
|
||||
|
||||
def show
|
||||
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'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization)
|
||||
@documents = @subdomain.sub_document_comments.where("parent_id is null").order("created_at desc")
|
||||
respond_to do |format|
|
||||
format.html {render :layout => 'base_org'}
|
||||
format.html {render :layout => @organization.switch_type ? 'base_sub_domain' : 'base_org'}
|
||||
end
|
||||
else
|
||||
render_403
|
||||
|
|
|
@ -22,4 +22,8 @@ class Organization < ActiveRecord::Base
|
|||
OrgSubfield.create(:organization_id => self.id, :name => 'course', :field_type => 'default', :priority => 2)
|
||||
OrgSubfield.create(:organization_id => self.id, :name => 'project', :field_type => 'default', :priority => 3)
|
||||
end
|
||||
|
||||
def switch_type
|
||||
self.show_mode.to_i == 1 ? true : false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-content-position"> 您的位置:首页 >业界动态 </div>
|
||||
</div>
|
||||
<div class="sn-inner-newslist">
|
||||
<h2 class="sn-inner-newsh2">北斗(长沙)开放实验室迎湖南省省直机关领导调研参观</h2>
|
||||
<div class="sn-inner-newscon">
|
||||
<p class=" sn-inner-psmall">来源:卫星导航仿真与测试开放实验室 发布时间::2016-04-08 浏览:200次</p>
|
||||
<p class=" sn-inner-pcon"> 2016年3月27日上午,湖南省经信委巡视员钟志慧,湖南省发改委副主任卓群、高技处处长何志明、就业处处长周建龙等领导代表在长沙中电软件园董事长何明、总经理夏利锋的陪同下来北
|
||||
斗开放实验室长沙分实验室调研参观。北斗开放实验室办公室主任明德祥为参观的各位领导详细介绍了北斗开放实验室运行机制及各项共享资源。北斗开放实验室长沙分实验室是由导航仪器湖
|
||||
南省工程研究中心、湖南矩阵电子科技有限公司及中国仪器仪表学会空间仪器分会共同建设。</p>
|
||||
<img src="images/img-news-con.jpg" width="824" height="522" alt="" />
|
||||
<p class=" sn-inner-imgp">北斗开放实验室办公室主任明德祥为湖南省发改委领导介绍</p>
|
||||
<p class=" sn-inner-pcon">为进一步推动北斗资源共享、创新北斗人才培养,更好地服务湖南北斗产业应用发展、培育湖南省卫星导航产业创新体系,2016年,北斗开放实验室联合长沙中电软件园对长沙分实验室进行扩
|
||||
建,扩建后的长沙分实验室立足长沙国家高新区,辐射整个中南地区,成为推动中南地区导航产业的发展的主力军。
|
||||
|
||||
今后,北斗开放实验室长沙分实验室将在政府的推动下,以北斗领域相关企事业单位创新需求为导向,以北斗开放实验室名誉主任孙家栋院士、北斗开放实验室专家委员会主任委员谭述森院士
|
||||
以及北斗开放实验室专家库专家为核心,以长沙分实验室共建单位——导航仪器湖南省工程研究中心为依托,借助北斗开放实验室发起单位及各地分实验室资源,建设院士工作站,联合进行创
|
||||
新研究,促进研究成果产业化。
|
||||
|
||||
为充分发挥长沙分实验室在释放资源和人才培养方面的作用,北斗开放实验室计划于4月下旬依托扩建后的长沙分实验室举办首届北斗精英实训;并将联合各地分实验室为首批微小课题申请者
|
||||
定期提供专业系统的指导和培训,务实推动北斗开放实验室“LAB-ETS”人才联合培养。具体培训信息请实时关注北斗开放实验室微信号“GnssOpenLab”或官网www.gnssopenlab.org。</p>
|
||||
</div>
|
||||
</div>
|
||||
<!--回复-->
|
||||
<div class="sn-replybox">
|
||||
<h2 class="sn-reply-h2">留言板<span class="sn-fr sn-f14 sn-font-grey3 sn-mt10">80条留言</span></h2>
|
||||
<form class="sn-reply-form">
|
||||
<textarea class="sn-reply-text" name="" ></textarea>
|
||||
<div class="sn-reply-btnbox">
|
||||
<a href="javascript:void(0)" class="submit-btn">发表</a>
|
||||
</div>
|
||||
</form>
|
||||
<div class="sn-reply-comment">
|
||||
<h2 class="sn-comment-h2">全部评论</h2>
|
||||
<div class="">
|
||||
<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>
|
||||
<a href="javascript:void(0)" class="sn-reply-username fl">与再有</a><span class="fl">10分钟</span>
|
||||
<p class="fl sn-reply-usertxt ">北斗真棒,北斗加油</p>
|
||||
<a href="javascript:void()" target="_blank" class="sn-reply-zan fl">(100)</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<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>
|
||||
<a href="javascript:void(0)" class="sn-reply-username fl">与再有</a><span class="fl">10分钟</span>
|
||||
<p class="fl sn-reply-usertxt ">北斗真棒,北斗加油</p>
|
||||
<a href="javascript:void()" target="_blank" class="sn-reply-zan fl">(100)</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="sn-reply-more">
|
||||
<a href="javascript:void(0)" class="">加载更多</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,29 @@
|
|||
<div class="sn-inner-body">
|
||||
<div class="sn-innner-content">
|
||||
<div class="sn-row sn-bg-white">
|
||||
<div class="sn-content-position"> 您的位置:首页 > 数据资源 > 仿真数据 </div>
|
||||
</div>
|
||||
<div class="sn-inner-newslist">
|
||||
<h2 class="sn-inner-newsh2">最新资讯</h2>
|
||||
<ul>
|
||||
<% documents.each do |document| %>
|
||||
<li>
|
||||
<div class="sn-circle fl"></div><a href="javascript:void()" target="_blank" class="sn-newslist-titile fl"><%= document.title %></a>
|
||||
<span class=" txt-grey fr"><%= format_date(document.created_at) %>></span><a href="javascript:void()" target="_blank" class="sn-newslist-reply fr mr10">回复(100)</a><a href="javascript:void()" target="_blank" class="sn-newslist-zan fr mr10">(100)</a>
|
||||
<div class="cl"></div>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<div class="sn-inner-pages">
|
||||
<a href="javascript:void()" class="sn-inner-pages-big" >上一页</a>
|
||||
<a href="javascript:void()" class="sn-pages-active " >1</a>
|
||||
<a href="javascript:void()" >2</a>
|
||||
<a href="javascript:void()" >3</a>
|
||||
<a href="javascript:void()" >...</a>
|
||||
<a href="javascript:void()" >31</a>
|
||||
<a href="javascript:void()" class="sn-inner-pages-big" >下一页</a>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -1,7 +1,11 @@
|
|||
<% if @organization.show_mode %>
|
||||
<% unless @documents.nil? %>
|
||||
<%= render :partial => 'sub_document_comments/show_sub_document_newstyle', :locals => {:documents => @documents} %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= content_for(:header_tags) do %>
|
||||
<%= import_ke(enable_at: false, prettify: false, init_activity: true) %>
|
||||
<% end %>
|
||||
|
||||
<%= render :partial => 'new' %>
|
||||
<% unless @documents.nil? %>
|
||||
<% @documents.each do |document| %>
|
||||
|
@ -13,3 +17,4 @@
|
|||
<%= render :partial => 'sub_document_comments/show_sub_document', :locals => {:document => document, :act => OrgActivity.where("org_act_type='SubDocumentComment'and org_act_id=?", document.id).first, :flag => 0} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<% if @organization.show_mode %>
|
||||
<%= render :partial => 'sub_document_comments/_show_newstyle', :locals => {:document => @document} %>
|
||||
<% else %>
|
||||
<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"create_kindeditor",'blog' %>
|
||||
<script>
|
||||
$(function() {
|
||||
|
@ -176,3 +179,4 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue