Merge branch 'develop' of https://git.trustie.net/jacknudt/trustieforge into develop

This commit is contained in:
cxt 2016-06-12 14:21:03 +08:00
commit d7c2ca896d
7 changed files with 43 additions and 23 deletions

View File

@ -57,7 +57,7 @@
<% when 'Message' %>
<%= 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' %>

View File

@ -1,14 +1,15 @@
<% if @subfield_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" %> &gt;
<a class = "sn-link-grey2"><%= @org_subfield.name %></a>
</div>
</div>
<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" %> &gt;
<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>
@ -34,12 +35,13 @@
</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>-->
<!--<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 %>
<% end %>
</div>
</div>

View File

@ -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 %>

View File

@ -75,9 +75,9 @@
<div class="orgRow mb10 mt5">
<span style="margin-left:10px;" >显示模式&nbsp;: </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;" >公开&nbsp;: </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" />

View File

@ -0,0 +1,10 @@
class UpdateOrgSubfiledDefault < ActiveRecord::Migration
def up
OrgSubfield.where(:name => "activity").update_all(:status => false)
OrgSubfield.where(:name => "course").update_all(:status => 2)
OrgSubfield.where(:name => "project").update_all(:status => 2)
end
def down
end
end

View File

@ -0,0 +1,8 @@
class UpdateOrgSubfiledResource < ActiveRecord::Migration
def up
OrgSubfield.where(:field_type => "Resource").update_all(:status => 6)
end
def down
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20160606064856) do
ActiveRecord::Schema.define(:version => 20160612043259) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false