app版本管理功能(表添加,页面部分添加)
This commit is contained in:
parent
04dea372c5
commit
3334299808
|
@ -322,4 +322,9 @@ class AdminController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
#移动端版本管理
|
||||
def mobile_version
|
||||
@versions = PhoneAppVersion.reorder('created_at desc')
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
class PhoneAppVersion < ActiveRecord::Base
|
||||
attr_accessible :description, :version
|
||||
end
|
|
@ -0,0 +1,55 @@
|
|||
<h3><%= l(:label_mobile_version) %></h3>
|
||||
<a href="javascript:void(0)" onclick="$('#new_version').slideToggle(400); ">发布新版本</a>
|
||||
<div>
|
||||
<form id="new_version" style="display: none">
|
||||
发布新版本
|
||||
</form>
|
||||
</div>
|
||||
<br/>
|
||||
<div>当前版本:</div>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%=l(:label_version_number)%></th>
|
||||
<th><%=l(:label_version_description)%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if @versions.count > 0 %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><%= @versions.first.version %></td>
|
||||
<td align="center" style="width: 70%">
|
||||
<%= @versions.first.description %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br/>
|
||||
|
||||
<div>历史版本:</div>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%=l(:label_version_number)%></th>
|
||||
<th><%=l(:label_version_description)%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% if @versions.count > 0 %>
|
||||
<% for version in @versions %>
|
||||
<tr class="<%= cycle("odd", "even") %>">
|
||||
<td><%= version.version %></td>
|
||||
<td align="center" style="width: 70%">
|
||||
<%= version.description %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- <div class="pagination"><#%= pagination_links_full @role_pages %></div> -->
|
||||
|
||||
<% html_title(l(:label_mobile_version)) -%>
|
|
@ -548,6 +548,8 @@ zh:
|
|||
label_organizer_name: 主办单位名称
|
||||
label_web_footer_description: 页脚内容
|
||||
label_cooperation_compnay: 合作单位
|
||||
label_version_number: 版本号
|
||||
label_version_description: 版本描述
|
||||
label_web_footer_cooperation_compnay: 网站页脚合作单位
|
||||
label_new_company: 添加合作单位
|
||||
label_edit_company: 编辑合作单位
|
||||
|
@ -1073,6 +1075,7 @@ zh:
|
|||
label_project_copy_notifications: 复制项目时发送邮件通知
|
||||
label_principal_search: "搜索用户或组:"
|
||||
label_user_search: "搜索用户:"
|
||||
label_mobile_version: "移动端版本管理"
|
||||
|
||||
button_check_all: 全选
|
||||
button_uncheck_all: 清除
|
||||
|
|
|
@ -641,6 +641,7 @@ RedmineApp::Application.routes.draw do
|
|||
match 'admin/contest_page_made', as: :contest_page_made
|
||||
match 'admin/web_footer_made', as: :web_footer_made
|
||||
match 'admin/enterprise_page_made', as: :enterprise_page_made
|
||||
match 'admin/mobile_version', as: :mobile_version
|
||||
match 'admin/search', :via => [:get, :post]
|
||||
match 'admin/plugins', :via => :get
|
||||
match 'admin/info', :via => :get
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class CreatePhoneAppVersions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :phone_app_versions do |t|
|
||||
t.string :version
|
||||
t.text :description
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20150128032421) do
|
||||
ActiveRecord::Schema.define(:version => 20150305081132) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -802,6 +802,13 @@ ActiveRecord::Schema.define(:version => 20150128032421) do
|
|||
t.integer "project_id"
|
||||
end
|
||||
|
||||
create_table "phone_app_versions", :force => true do |t|
|
||||
t.string "version"
|
||||
t.text "description"
|
||||
t.datetime "created_at", :null => false
|
||||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
create_table "poll_answers", :force => true do |t|
|
||||
t.integer "poll_question_id"
|
||||
t.text "answer_text"
|
||||
|
|
|
@ -363,6 +363,7 @@ Redmine::MenuManager.map :admin_menu do |menu|
|
|||
menu.push :projects, {:controller => 'admin', :action => 'projects'}, :caption => :label_project_plural
|
||||
menu.push :users, {:controller => 'admin', :action => 'users'}, :caption => :label_user_plural
|
||||
menu.push :first_page_made, {:controller => 'admin',:action => 'first_page_made'},:caption => :label_first_page_made
|
||||
menu.push :mobile_version, {:controller => 'admin',:action => 'mobile_version'},:caption => :label_mobile_version
|
||||
menu.push :groups, {:controller => 'groups'}, :caption => :label_group_plural
|
||||
menu.push :roles, {:controller => 'roles'}, :caption => :label_role_and_permissions
|
||||
menu.push :trackers, {:controller => 'trackers'}, :caption => :label_tracker_plural
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe PhoneAppVersion do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in New Issue