添加参赛作品所属项目的网址;

参赛应用页面添加所属项目网址;
This commit is contained in:
wanglinchun 2014-05-13 16:49:23 +08:00
parent fc2f35f247
commit bbd293272d
6 changed files with 77 additions and 18 deletions

View File

@ -1,5 +1,5 @@
class Softapplication < ActiveRecord::Base
attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers
attr_accessible :android_min_version_available, :app_type_id, :app_type_name, :description, :name, :user_id, :contest_id, :application_developers, :deposit_project_url
acts_as_attachable
seems_rateable :allow_update => true, :dimensions => :quality

View File

@ -124,6 +124,14 @@
<br />
<br />
<tr style="width:800px;">
<span><%= l(:label_work_deposit_project_url) %></span>
<td style="width: 100px"><%= f.text_field :deposit_project_url, :required => true, :size => 60, :style => "width:378px;" %></td>
</tr><br/>
<br />
<br />
<fieldset style="width: 500px", style="padding-top: 10px">
<legend>
上传作品软件包和作品截图

View File

@ -47,6 +47,9 @@
<td style="padding-left: 40px">平均评分: <%= rating_for @softapplication, :static => true, dimension: :quality, class: 'rateable div_inline' %></td>
<td>发布时间:<%=format_time @softapplication.created_at %></td>
</tr>
<tr>
<td style="padding-left: 40px">托管项目网址:<%=@softapplication.deposit_project_url%></td>>
</tr>
</table>

View File

@ -1863,6 +1863,7 @@ zh:
label_running_platform: 运行平台
label_softapplication_developer: 上传人员
label_softapplication_developers: 开发人员
label_work_deposit_project_url: 托管项目网址
label_softapplication_name_condition: 25个汉字以内50个字符
label_user_login_softapplication_board: 您还没有登录,请登录后参与应用评价。
label_contest_description_no: 暂无描述。

View File

@ -0,0 +1,5 @@
class AddDepositProjectUrlToSoftapplications < ActiveRecord::Migration
def change
add_column :softapplications, :deposit_project_url, :string
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 => 20140428013546) do
ActiveRecord::Schema.define(:version => 20140513073801) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@ -23,6 +23,15 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "activities", ["user_id", "act_type"], :name => "index_activities_on_user_id_and_act_type"
add_index "activities", ["user_id"], :name => "index_activities_on_user_id"
create_table "apply_project_masters", :force => true do |t|
t.integer "user_id"
t.string "apply_type"
t.integer "apply_id"
t.integer "status"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "attachments", :force => true do |t|
t.integer "container_id"
t.string "container_type", :limit => 30
@ -518,6 +527,14 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "news", ["created_on"], :name => "index_news_on_created_on"
add_index "news", ["project_id"], :name => "news_project_id"
create_table "no_uses", :force => true do |t|
t.integer "user_id", :null => false
t.string "no_use_type"
t.integer "no_use_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "open_id_authentication_associations", :force => true do |t|
t.integer "issued"
t.integer "lifetime"
@ -533,6 +550,19 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
t.string "salt", :null => false
end
create_table "open_source_projects", :force => true do |t|
t.string "name"
t.text "description"
t.integer "commit_count", :default => 0
t.integer "code_line", :default => 0
t.integer "users_count", :default => 0
t.date "last_commit_time"
t.string "url"
t.date "date_collected"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "praise_tread_caches", :force => true do |t|
t.integer "object_id", :null => false
t.string "object_type"
@ -612,6 +642,24 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "queries", ["project_id"], :name => "index_queries_on_project_id"
add_index "queries", ["user_id"], :name => "index_queries_on_user_id"
create_table "relative_memos", :force => true do |t|
t.integer "osp_id", :null => false
t.integer "parent_id"
t.string "subject", :null => false
t.text "content", :null => false
t.integer "author_id"
t.integer "replies_count", :default => 0
t.integer "last_reply_id"
t.boolean "lock", :default => false
t.boolean "sticky", :default => false
t.boolean "is_quote", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "viewed_count_crawl", :default => 0
t.integer "viewed_count_local", :default => 0
t.string "url"
end
create_table "repositories", :force => true do |t|
t.integer "project_id", :default => 0, :null => false
t.string "url", :default => "", :null => false
@ -698,6 +746,7 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
t.integer "softapplication_id"
t.integer "is_public"
t.string "application_developers"
t.string "deposit_project_url"
end
create_table "students_for_courses", :force => true do |t|
@ -755,11 +804,6 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "time_entries", ["project_id"], :name => "time_entries_project_id"
add_index "time_entries", ["user_id"], :name => "index_time_entries_on_user_id"
create_table "tmp", :force => true do |t|
t.string "name"
t.string "part_number"
end
create_table "tokens", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.string "action", :limit => 30, :default => "", :null => false
@ -810,6 +854,13 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "user_grades", ["project_id"], :name => "index_user_grades_on_project_id"
add_index "user_grades", ["user_id"], :name => "index_user_grades_on_user_id"
create_table "user_levels", :force => true do |t|
t.integer "user_id"
t.integer "level"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "user_preferences", :force => true do |t|
t.integer "user_id", :default => 0, :null => false
t.text "others"
@ -820,16 +871,13 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
create_table "user_scores", :force => true do |t|
t.integer "user_id", :null => false
t.integer "user_id"
t.integer "collaboration"
t.integer "influence"
t.integer "skill"
t.integer "active"
t.integer "activity"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "level"
t.integer "file"
t.integer "issue"
end
create_table "user_statuses", :force => true do |t|
@ -966,10 +1014,4 @@ ActiveRecord::Schema.define(:version => 20140428013546) do
add_index "workflows", ["role_id", "tracker_id", "old_status_id"], :name => "wkfs_role_tracker_old_status"
add_index "workflows", ["role_id"], :name => "index_workflows_on_role_id"
create_table "yans", :force => true do |t|
t.string "name"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
end