modify some bug about course and add db migrate

This commit is contained in:
xianbo 2013-09-24 12:15:24 +08:00
parent 29313d9ab5
commit 633104b493
6 changed files with 16 additions and 45 deletions

View File

@ -78,7 +78,7 @@
<tr>
<td valign="top" style="padding-left: 8px;">课程学期:</td><td class="font_lighter_sidebar"><%= @course.term %></td>
</tr>
<% unless @course.teacher.user_extensions.occupation.nil? %>
<% unless @course.teacher.user_extensions.occupation==""%>
<tr>
<td valign="top" style="padding-left: 8px;">教师单位:</td><td class="font_lighter_sidebar"><%= @course.teacher.user_extensions.occupation %></td>
</tr>

View File

@ -111,23 +111,23 @@
<% unless @user.user_extensions.nil? %>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.occupation %></td>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.occupation %></td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %></td>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.location %></td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px">
<% if @user.user_extensions.identity == 0 %>
<%= l(:label_technical_title) %></td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.technical_title %></td>
<%= l(:label_technical_title) %>:</td><td class="font_lighter_sidebar" style="padding-left: 0px" width="170px"><%= @user.user_extensions.technical_title %></td>
<% end %>
</tr>
<% else%>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %></td>
<td style="padding-left: 8px" width="70px"><%= l(:field_occupation) %>:</td>
</tr>
<tr>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %></td>
<td style="padding-left: 8px" width="70px"><%= l(:label_location) %>:</td>
</tr>
<% end %>
</tr>

View File

@ -18,11 +18,11 @@
<table border="0">
<tr><td>
<% if bid.reward_type.nil? or bid.reward_type == 1%>
<strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #ed8924;font-family: 14px; font-family: 微软雅黑"><%= l(:label_call_bonus) %>&nbsp;<%= l(:label_RMB_sign) %><%= bid.budget%></span></strong>
<% elsif bid.reward_type == 2%>
<strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= bid.budget%></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #15bccf;font-family: 14px; font-family: 微软雅黑"><%= bid.budget%></span></strong>
<% else %>
<strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: ΢ÈíÑźÚ"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong>
<strong><%= l(:label_bids_reward_method) %><span style="color: #00aa83;font-family: 14px; font-family: 微软雅黑"><%= l(:label_bids_credit) %>&nbsp;<%= bid.budget%>&nbsp;<%= l(:label_bids_credit_number) %></span></strong>
<% end %>
<!-- <td style="color: rgb(255, 0, 0);"><strong><%= l(:label_price) %><%= l(:label_RMB_sign) %><%= bid.budget%></strong></td> -->

View File

@ -15,12 +15,12 @@ production:
development:
adapter: mysql2
database: bitnami_redmine
host: 10.0.47.245
database: tr
host: localhost
#socket: /home/pdl/redmine-2.3.1-2/mysql/tmp/mysql.sock
port: 3306
username: root
password: "bitnami"
password: "1234"
encoding: utf8
# Warning: The database defined as "test" will be erased and

View File

@ -1515,3 +1515,4 @@ zh:
label_course_homework_new: 发布作业
label_course_data: 资料
label_homework_statistics: 作业统计
label_technical_title: 职称

View File

@ -69,7 +69,6 @@ ActiveRecord::Schema.define(:version => 20130922123849) do
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "reward"
end
create_table "bids", :force => true do |t|
@ -480,18 +479,6 @@ ActiveRecord::Schema.define(:version => 20130922123849) do
t.integer "project_id"
end
add_index "project_statuses", ["changesets_count"], :name => "index_project_statuses_on_changesets_count"
add_index "project_statuses", ["watchers_count"], :name => "index_project_statuses_on_watchers_count"
create_table "project_tags", :force => true do |t|
t.integer "project_id"
t.integer "tag_id"
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "user_id"
end
create_table "projects", :force => true do |t|
t.string "name", :default => "", :null => false
t.text "description"
@ -596,14 +583,6 @@ ActiveRecord::Schema.define(:version => 20130922123849) do
t.datetime "updated_at", :null => false
t.integer "project_id"
t.integer "user_id"
t.string "description"
end
create_table "students_for_courses", :force => true do |t|
t.integer "student_id"
t.integer "course_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
create_table "students_for_courses", :force => true do |t|
@ -690,8 +669,8 @@ ActiveRecord::Schema.define(:version => 20130922123849) do
t.integer "zip_code"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "identity"
t.string "technical_title"
t.integer "identity"
t.integer "student_id"
t.string "teacher_realname"
t.string "student_realname"
@ -717,15 +696,6 @@ ActiveRecord::Schema.define(:version => 20130922123849) do
add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count"
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
create_table "user_tags", :force => true do |t|
t.integer "user_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
end
add_index "user_statuses", ["changesets_count"], :name => "index_user_statuses_on_changesets_count"
add_index "user_statuses", ["watchers_count"], :name => "index_user_statuses_on_watchers_count"
create_table "users", :force => true do |t|
t.string "login", :default => "", :null => false
t.string "hashed_password", :limit => 40, :default => "", :null => false