修复不分页面导航栏缺失问题、修复部分域名错误问题、添加修复FirstPage表数据的迁移文件
This commit is contained in:
parent
599a277af3
commit
5c0e3e96cc
|
@ -131,7 +131,7 @@
|
|||
<tr style="width:800px;">
|
||||
<span><%= l(:label_work_deposit_project) %>:</span>
|
||||
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline2' %></span>
|
||||
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0} , :target => '_blank',host:Setting.project_domain %></span><!-- new_project_path(course: 0, project_type: 0) -->
|
||||
<span><%= link_to l(:label_create_new_projects),{:controller => 'projects',:action => 'new',course: 0, project_type: 0,host: Setting.project_domain}, :target => '_blank' %></span><!-- new_project_path(course: 0, project_type: 0) -->
|
||||
</tr>
|
||||
<br/>
|
||||
<br/>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
<% @nav_dispaly_course_all_label = 1
|
||||
@nav_dispaly_forum_label = 1
|
||||
@nav_dispaly_course_label = nil
|
||||
@nav_dispaly_store_all_label = 1 %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
|
|
@ -38,7 +38,10 @@
|
|||
<% end -%>
|
||||
<ul class="list-group-item-meta">
|
||||
<div class="issue-list-description">
|
||||
<%= l(:field_description)%>: <%= issue.short_description %>
|
||||
<div class="wiki">
|
||||
<%= textilizable issue, :description, :attachments => issue.attachments %>
|
||||
</div>
|
||||
<!-- <#%= l(:field_description)%>: <#%= issue.short_description %> -->
|
||||
</div>
|
||||
</ul>
|
||||
<ul class="list-group-item-meta">
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
<% @nav_dispaly_project_label = 1
|
||||
@nav_dispaly_forum_label = 1 %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:action => 'index', :format => 'atom', :key => User.current.rss_key}) %>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
# -*coding:utf-8 -*-
|
||||
class RepairFirstPage < ActiveRecord::Migration
|
||||
def change
|
||||
pro_fps = FirstPage.where("page_type = 'project'")
|
||||
if pro_fps.nil? || pro_fps.first.nil?
|
||||
fp = FirstPage.new
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.title = "Trustie在线项目托管平台"
|
||||
fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
fp.page_type = "project"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
else
|
||||
fp = pro_fps.first
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.title = "Trustie在线项目托管平台"
|
||||
fp.description = "面向中国大学生与软件从业者,提供社交化的项目管理、代码托管、资源共享、合作交流。"
|
||||
fp.page_type = "project"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
end
|
||||
course_fps = FirstPage.where("page_type = 'course'")
|
||||
if course_fps.nil? || course_fps.first.nil?
|
||||
fp = FirstPage.new
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.title = "Trustie在线课程实践平台"
|
||||
fp.description = "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
fp.page_type = "course"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
else
|
||||
fp = course_fps.first
|
||||
fp.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp.title = "Trustie在线课程实践平台"
|
||||
fp.description = "面向中国高校教师与大学生,提供社交化的课程管理、资源共享、合作实验、协同研究。"
|
||||
fp.page_type = "course"
|
||||
fp.sort_type = 1
|
||||
fp.save
|
||||
end
|
||||
contest_fps = FirstPage.where("page_type = 'contest'")
|
||||
if contest_fps.nil? || contest_fps.first.nil?
|
||||
fp1 = FirstPage.new
|
||||
fp1.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp1.title = "Trustie在线竞赛实战平台"
|
||||
fp1.description = "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
fp1.page_type = "contest"
|
||||
fp1.sort_type = 1
|
||||
fp1.save
|
||||
else
|
||||
fp1 = contest_fps.first
|
||||
fp1.web_title = "Trustie - 为大学生技术创新筑巢"
|
||||
fp1.title = "Trustie在线竞赛实战平台"
|
||||
fp1.description = "面向中国大学生与编程爱好者,提供社交化的竞赛管理、应用管理、代码托管、合作交流。"
|
||||
fp1.page_type = "contest"
|
||||
fp1.sort_type = 1
|
||||
fp1.save
|
||||
end
|
||||
end
|
||||
end
|
19
db/schema.rb
19
db/schema.rb
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20140716021558) do
|
||||
ActiveRecord::Schema.define(:version => 20140719080032) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -810,7 +810,7 @@ ActiveRecord::Schema.define(:version => 20140716021558) do
|
|||
t.integer "osp_id"
|
||||
t.integer "parent_id"
|
||||
t.string "subject", :null => false
|
||||
t.text "content", :limit => 16777215, :null => false
|
||||
t.text "content", :null => false
|
||||
t.integer "author_id"
|
||||
t.integer "replies_count", :default => 0
|
||||
t.integer "last_reply_id"
|
||||
|
@ -844,19 +844,6 @@ ActiveRecord::Schema.define(:version => 20140716021558) do
|
|||
|
||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||
|
||||
create_table "rich_rich_files", :force => true do |t|
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
t.string "rich_file_file_name"
|
||||
t.string "rich_file_content_type"
|
||||
t.integer "rich_file_file_size"
|
||||
t.datetime "rich_file_updated_at"
|
||||
t.string "owner_type"
|
||||
t.integer "owner_id"
|
||||
t.text "uri_cache"
|
||||
t.string "simplified_type", :default => "file"
|
||||
end
|
||||
|
||||
create_table "roles", :force => true do |t|
|
||||
t.string "name", :limit => 30, :default => "", :null => false
|
||||
t.integer "position", :default => 1
|
||||
|
@ -916,7 +903,7 @@ ActiveRecord::Schema.define(:version => 20140716021558) do
|
|||
|
||||
create_table "softapplications", :force => true do |t|
|
||||
t.string "name"
|
||||
t.string "description"
|
||||
t.text "description"
|
||||
t.integer "app_type_id"
|
||||
t.string "app_type_name"
|
||||
t.string "android_min_version_available"
|
||||
|
|
Loading…
Reference in New Issue