组织历史数据迁移 模式术语修改, 配置页面域名长度问题

This commit is contained in:
huang 2016-06-12 13:36:35 +08:00
parent 871a4d2d7b
commit 78b445a7ae
5 changed files with 22 additions and 4 deletions

View File

@ -73,7 +73,7 @@
<li class="orgListType"><%= org_subfield_type field %></li> <li class="orgListType"><%= org_subfield_type field %></li>
<li class="orgListCatalog hidden"> <li class="orgListCatalog hidden">
<% if Secdomain.where("sub_type=2 and pid=?", @organization.id).count > 0 %> <% 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 %> <%= field.subfield_subdomain_dir.nil? ? '未设置': field.subfield_subdomain_dir.name %>
</div> </div>
<% else %> <% else %>

View File

@ -75,9 +75,9 @@
<div class="orgRow mb10 mt5"> <div class="orgRow mb10 mt5">
<span style="margin-left:10px;" >显示模式&nbsp;: </span> <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" : "" %> /> <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" : "" %> /> <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>
<div class="orgRow mb10 mt5"><span style="margin-left:38px;" >公开&nbsp;: </span> <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" /> <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. # 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| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false