完成模块8配置
|
@ -118,4 +118,12 @@ module OrganizationsHelper
|
|||
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')
|
||||
org_acts
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -127,12 +127,15 @@
|
|||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<%# 更新访问数,刷新的时候更新访问次数 %>
|
||||
<% update_visiti_count @organization %>
|
||||
<%# over %>
|
||||
<!--内容开始-->
|
||||
<div class="sn-content">
|
||||
<div class="sn-content-left fl sn-mt15">
|
||||
<% @subfield_content.each do |field| %>
|
||||
<% if field.status.to_i == 1 %>
|
||||
<div class="sn-index-banner">
|
||||
<div class="sn-index-banner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<!-- 代码 开始 -->
|
||||
<div id="fsD1" class="focus">
|
||||
<div id="D1pic1" class="fPic">
|
||||
|
@ -188,7 +191,7 @@
|
|||
<!-- 代码 结束 -->
|
||||
</div>
|
||||
<% elsif field.status.to_i == 2 %>
|
||||
<div class="sn-index-leftbox">
|
||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title">业界动态<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<div class="cl"></div>
|
||||
<div class="sn-news-bigbox fl">
|
||||
|
@ -200,7 +203,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif field.status.to_i == 3 %>
|
||||
<div class="sn-news-smallbox fl">
|
||||
<div class="sn-news-smallbox fl" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<div class="sn-news-small mb18">
|
||||
<a href="javascript:void(0);" target="_blank" class="sn-news-smallimg fl"><img src="/images/news/img-news-small01.jpg" width="85" height="85" alt=""/></a>
|
||||
<h4><a href="javascript:void(0);" target="_blank" class="h4-title fl mt10">北斗开放实验室迎湖南省省直机关领导调研参观</a></h4>
|
||||
|
@ -229,7 +232,7 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<% elsif field.status.to_i == 4 %>
|
||||
<div class="sn-index-leftbox">
|
||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title">北斗资源<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<div class="sn-index-resourcescon">
|
||||
<div class="sn-index-resourcesbox">
|
||||
|
@ -281,7 +284,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif field.status.to_i == 5 %>
|
||||
<div class="sn-index-leftbox">
|
||||
<div class="sn-index-leftbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title">合作伙伴<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<div class="sn-index-partnerbox " >
|
||||
<ul id="scrollPic" >
|
||||
|
@ -309,7 +312,7 @@
|
|||
<div class="sn-content-right fr sn-mt15">
|
||||
<% @subfield_content.each do |field| %>
|
||||
<% if field.status.to_i == 6 %>
|
||||
<div class="sn-index-activebox">
|
||||
<div class="sn-index-activebox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title mb18">最新活动展示<a href="javascript:void(0);" target="_blank" class="more">更多</a></h2>
|
||||
<div class="sn-index-active">
|
||||
<a href="javascript:void(0);" target="_blank" class="sn-activeimg"><img src="/images/active/img-active01.jpg" width="330" height="210" alt=""/></a>
|
||||
|
@ -333,7 +336,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif field.status.to_i == 7 %>
|
||||
<div class="sn-index-wxbox">
|
||||
<div class="sn-index-wxbox" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<h2 class="h2-title ">关注北斗</h2>
|
||||
<div class="sn-index-wx">
|
||||
<img class="fl sn-index-wximg" src="/images/wx.gif" width="104" height="104" alt=""/>
|
||||
|
@ -342,9 +345,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<% elsif field.status.to_i == 8 %>
|
||||
<div class="sn-index-smallbanner">
|
||||
<a href="javascript:void(0);" target="_blank" ><img src="/images/banner-small.jpg" width="369" height="169" alt=""/></a>
|
||||
</div>
|
||||
<%= render :partial => 'organizations/org_subfield_rightD', :locals => {:field => field} %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,259 +0,0 @@
|
|||
<script type="text/javascript">
|
||||
Qfast.add('widgets', { path: "/javascripts/terminator2.2.min.js", type: "js", requires: ['fx'] });
|
||||
Qfast(false, 'widgets', function () {
|
||||
K.tabs({
|
||||
id: 'fsD1', //焦点图包裹id
|
||||
conId: "D1pic1", //** 大图域包裹id
|
||||
tabId:"D1fBt",
|
||||
tabTn:"a",
|
||||
conCn: '.fcon', //** 大图域配置class
|
||||
auto: 1, //自动播放 1或0
|
||||
effect: 'fade', //效果配置
|
||||
eType: 'click', //** 鼠标事件
|
||||
pageBt:true, //是否有按钮切换页码
|
||||
bns: ['.prev', '.next'],//** 前后按钮配置class
|
||||
interval: 3000 //** 停顿时间
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
<% if field.status.to_i == 1 %>
|
||||
|
||||
<% elsif field.status.to_i == 2 %>
|
||||
|
||||
<% elsif field.status.to_i == 3 %>
|
||||
|
||||
<% elsif field.status.to_i == 4 %>
|
||||
|
||||
<% elsif field.status.to_i == 5 %>
|
||||
|
||||
<% elsif field.status.to_i == 6 %>
|
||||
|
||||
<% end %>
|
||||
<div class="box1 bg-grey" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if field.status == 0 %>
|
||||
<div class="content ">
|
||||
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2></div>
|
||||
<% if @course_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="course-list">
|
||||
<ul class="clearfix">
|
||||
<% unless @course_acts.nil? %>
|
||||
<%= render :partial => 'organizations/org_new_course_pic', :locals => {:activities => @course_acts.first(3)} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
</div><!--content end-->
|
||||
<% else %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="course_<%= field.id %>"><h2 class="box-title">课程动态</h2></div>
|
||||
<% if @course_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<%= render :partial => 'organizations/org_new_course_act_list', :locals =>{:activities => @course_acts, :field => field, :organization => @organization} %>
|
||||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
|
||||
</div><!--row end-->
|
||||
<% end %>
|
||||
</div><!--box1 end-->
|
||||
<% when 'project' %>
|
||||
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if field.status == 0 %>
|
||||
<div class="content ">
|
||||
<div class="box-top" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
|
||||
<% if @project_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="course-list">
|
||||
<ul class="clearfix">
|
||||
<% unless @project_acts.nil? %>
|
||||
<%= render :partial => 'organizations/org_new_project_pic', :locals => {:activities => @project_acts.first(3)} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div><!--content end-->
|
||||
<% else %>
|
||||
<div class="content">
|
||||
<div class="box-top" style="display:<%= field.hide == 0?'block':'none' %>;" id="project_<%= field.id %>"><h2 class="box-title">项目动态</h2><p class="box-title-p"></p></div>
|
||||
<% if @project_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<%= render :partial => 'organizations/org_new_project_act_list', :locals =>{:activities => @project_acts, :field => field, :organization => @organization} %>
|
||||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<%= link_to "More", organization_path(@organization, :list =>1), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
</div><!--row end-->
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if field.field_type == "Post" %> <%# 讨论类型 %>
|
||||
<% 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') %>
|
||||
<%# message_ats = get_message_org(@organization.id, field.id) %>
|
||||
<%# ids = field.org_document_comments.map{|o| o.id}.join(",") %>
|
||||
<div class="box1 bg-grey" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
||||
<% if field.status == 0 %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if org_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
|
||||
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="course-list">
|
||||
<ul class="clearfix">
|
||||
|
||||
<% org_acts.first(3).each do |act| %>
|
||||
<%= render :partial => 'organizations/org_new_forum_pic', :locals => {:activity => act, :field => field, :organization => @organization} %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
</ul>
|
||||
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div><!--content end-->
|
||||
<% else %>
|
||||
<div class="content">
|
||||
<div class="box-top" id="message_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if org_acts.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<% org_acts.each do |act| %>
|
||||
<%= render :partial => 'organizations/org_new_forum_list', :locals => {:activity => act, :field => field, :organization => @organization} %>
|
||||
<% end %>
|
||||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
<% if !field.subfield_subdomain_dir.nil? %> <!--讨论帖子-->
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<% end %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
</div><!--row end-->
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
</div><!--box1 end-->
|
||||
<% elsif field.field_type == "Resource" %>
|
||||
<% org_attachs = get_attach_org2(field) %>
|
||||
<div class="box1" style="display:<%= field.hide == 0?'block':'none' %>;" id="org_subfield_<%= field.id %>">
|
||||
<div class="content">
|
||||
<div class="box-top" id="resource_<%= field.id %>"><h2 class="box-title"><%= field.name %></h2></div>
|
||||
<% if org_attachs.blank? %>
|
||||
<p class="nocontent">暂无内容,敬请期待!</p>
|
||||
<div class="cl"></div>
|
||||
<% if !field.subfield_subdomain_dir.nil? %>
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% end %>
|
||||
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% else %>
|
||||
<div class="row">
|
||||
<%= render :partial => 'organizations/org_new_resource', :locals => {:org_attachs => org_attachs} %>
|
||||
<!--row-ziyuan end-->
|
||||
</div>
|
||||
|
||||
<div class="cl"></div>
|
||||
<% if !field.subfield_subdomain_dir.nil? %>
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to "More", show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to "More", show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "More", org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% end %>
|
||||
<%#= link_to "More", organization_path(@organization, :org_subfield_id => field.id), :class => "more-btn-center mt30" , :target => "_blank" %>
|
||||
<div class="cl"></div>
|
||||
<% end %>
|
||||
|
||||
</div><!--row end-->
|
||||
<div class="cl"></div>
|
||||
</div><!--box1 end-->
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
|
@ -0,0 +1,73 @@
|
|||
<% if is_default_field?(field) %>
|
||||
<% case field.name %>
|
||||
<% when 'course' %>
|
||||
<p>暂无内容!</p>
|
||||
<% when 'project' %>
|
||||
<p>暂无内容!</p>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% if field.field_type == "Post" %> <%# 讨论类型 %>
|
||||
<% org_acts = get_subfield_acts field %>
|
||||
<% unless org_acts.blank? %>
|
||||
<% activity = org_acts.first %>
|
||||
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if activity.container_type == 'Organization' && activity.org_act_type == 'OrgDocumentComment' && activity.org_act_id != @organization.home_id %>
|
||||
<% document = activity.org_act %>
|
||||
<% org_subfield_id = params[:org_subfield_id] %>
|
||||
<% flag = 2 %>
|
||||
<% iamge_path = get_image_path_from_content(document.content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), org_document_comment_path(:id => document.id, :organization_id => document.organization.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
<% elsif 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 = Message.find(activity.org_act_id) %>
|
||||
<% if message.board.org_subfield_id %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), board_message_url_in_org(message.board.id,message.id), :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<% iamge_path = get_image_path_from_content(content) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "370", :height => "220"), board_message_path(message.board,activity), :target => "_blank" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if activity.org_act_type == 'News' and News.where("id=?", activity.org_act_id).count > 0 %>
|
||||
<% news = News.find(activity.org_act_id) %>
|
||||
<% iamge_path = get_image_path_from_content(news.description) %>
|
||||
<% if iamge_path.nil? %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/files/uploads/image#{iamge_path}", :width => "369", :height => "169"), news_path(news), :target => "_blank" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<a href="javascript:void(0);" target="_blank" ><img src="/images/default_blank/ad-default.jpg" width="369" height="169" alt=""/></a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% elsif field.field_type == "Resource" %>
|
||||
<% org_attachs = get_attach_org2(field) %>
|
||||
<div class="sn-index-smallbanner" style="display:<%= field.hide == 0?'block':'none' %>;">
|
||||
<% if !field.subfield_subdomain_dir.nil? %>
|
||||
<% if !request.local? and Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 and Secdomain.where("sub_type=2 and pid=?", @organization.id).map(&:subname).include?(request.subdomain) %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_subfield_without_id_path(:sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), show_org_subfield_organization_path(:id => @organization.id, :sub_dir_name => field.subfield_subdomain_dir.name), :target => "_blank" %>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to image_tag("/images/default_blank/ad-default.jpg", :width => "369", :height => "169"), org_subfield_files_path(field), :class => "more-btn-center mt30", :target => "_blank" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 17 KiB |