<%= l(:label_gender) %> |
diff --git a/app/views/bids/_list_projects.html.erb b/app/views/bids/_list_projects.html.erb
index 8974abeaa..7216b60e1 100644
--- a/app/views/bids/_list_projects.html.erb
+++ b/app/views/bids/_list_projects.html.erb
@@ -23,7 +23,14 @@
<% if get_prize(b_project).nil? or get_prize(b_project) == "" %>
未评奖
<% else %>
- <%= get_prize(b_project) %>
+ <% case get_prize(b_project) %>
+ <% when '0' %>
+ 一等奖
+ <% when '1' %>
+ 二等奖
+ <% when '2' %>
+ 入围奖
+ <%end%>
<% end %>
@@ -52,7 +59,11 @@
<%= form_for "set_reward",:remote=>true,:url=>set_reward_path do |f| %>
<%= f.text_field :b_id,:style => "display:none",:value => b_project.id,:size=>"0" %>
- <%= f.text_field :reward,:size=>"10",:require=>true,:maxlength => 10,:minlength=>1 %>
+
+ <%= f.select :reward," "
+ .html_safe %>
+
+
<%= f.submit "提交",:class=>"submit" %>
<% end %>
diff --git a/app/views/bids/_project_list.html.erb b/app/views/bids/_project_list.html.erb
index 23e1b4f24..889a0b0da 100644
--- a/app/views/bids/_project_list.html.erb
+++ b/app/views/bids/_project_list.html.erb
@@ -1,8 +1,6 @@
<%= render_flash_messages %>
-
-
<% if @bid.deadline > Date.today %>
@@ -18,73 +16,6 @@
<% end %>
-
-<% @bidding_project.each do |b_project|%>
-
-
-
-
-
-
-
- <%= link_to image_tag(url_to_avatar(b_project.project), :class => 'avatar3'), :class => "avatar" %>
- |
-
- |
-
-
-
-
- <%= l(:label_bidding_user_homework) %> : <%= link_to(b_project.user.name, user_path(b_project.user)) %> |
-
-
- <%= l(:label_bidding_reason_homewrok) %> : <%= b_project.description %> |
-
-
- |
-
- |
-
-
<% end %>
-
-
-
- <% else %>
-
- <%= l(:label_bidding_project) %>(<%= @bidding_project.count%>) |
-
- <% if User.current.logged? %>
-
-
- <%= toggle_link l(:button_bidding), 'put-bid-form' %>
- |
- <% end %>
-
-
-
- <% else %>
-
-
- <%= l(:label_bid_end)%>
-
-
-
-
-<% end %>
-
-
-
<%= render :partial=> "list_projects",:locals => {:bidding_project => @bidding_project,:bid => @bid }%>
diff --git a/app/views/bids/set_reward.js.erb b/app/views/bids/set_reward.js.erb
index 85989c0fb..1e469eb37 100644
--- a/app/views/bids/set_reward.js.erb
+++ b/app/views/bids/set_reward.js.erb
@@ -3,7 +3,16 @@ $('#reward_result_<%= @biding_project_id %>').html('<%= j(
if get_prize(@b_p).nil? or get_prize(@b_p) == ""
puts '未评奖'
else
- get_prize(@b_p)
+ case get_prize(@b_p)
+ when '0'
+ '一等奖'
+ when '1'
+ '二等奖'
+ when '2'
+ '入围奖'
+ else
+ '未评奖'
+ end
end
)
diff --git a/app/views/tags/_tag_name.html.erb b/app/views/tags/_tag_name.html.erb
index 49a81da2a..552246da1 100644
--- a/app/views/tags/_tag_name.html.erb
+++ b/app/views/tags/_tag_name.html.erb
@@ -1,41 +1,84 @@
-
+
<% @tags = obj.reload.tag_list %>
<% if non_list_all and (@tags.size > 0) %>
- <% if @tags.size > Setting.show_tags_length.to_i then %>
- <% i = 0 %>
+<% if @tags.size > Setting.show_tags_length.to_i then %>
+<% i = 0 %>
- <% until i>Setting.show_tags_length.to_i do %>
-
- <%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %>
-
- <% i += 1%>
- <% end %>
+<% until i>Setting.show_tags_length.to_i do %>
+
+ <%= link_to @tags[i], :controller => "tags",:action => "index",:q => @tags[i],:object_flag => object_flag,:obj_id => obj.id %>
+
+<% i += 1%>
+<% end %>
- <%= link_to l(:label_more_tags),:action => "show",:id => obj.id %>
+<%= link_to l(:label_more_tags),:action => "show",:id => obj.id %>
- <% else %>
+<% else %>
- <% @tags.each do |tag| %>
-
- <%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id %>
-
- <% end %>
+<% @tags.each do |tag| %>
+
+ <%= link_to tag,:controller => "tags",:action => "index",:q=>tag,:object_flag => object_flag,:obj_id => obj.id %>
+
+<% end %>
- <% end %>
+<% end %>
<% else %>
- <% if @tags.size > 0 %>
- <% @tags.each do |tag| %>
-
- <%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
-
- <% end %>
- <% else %>
- <%= l(:label_tags_no) %>
- <% end %>
-
+<% if @tags.size > 0 %>
+<% @tags.each do |tag| %>
+
+ <%= link_to tag,:controller => "tags",:action => "index",:q=>tag ,:object_flag => object_flag,:obj_id => obj.id %>
+
+ <% case object_flag %>
+ <% when '1'%>
+
+ <% if User.current.eql?(obj) %>
+ <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
+ :taggable_id => obj.id,:taggable_type => object_flag %>
+ <% end %>
+
+ <% when '2' %>
+
+ <% if (ProjectInfo.find_by_project_id(obj.id)).user_id == User.current.id %>
+ <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
+ :taggable_id => obj.id,:taggable_type => object_flag %>
+ <% end %>
+
+ <% when '3' %>
+
+ <% if (ProjectInfo.find_by_project_id(obj.project_id)).user_id == User.current.id %>
+ <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
+ :taggable_id => obj.id,:taggable_type => object_flag %>
+ <% end %>
+
+ <% when '4'%>
+ <% if obj.author_id == User.current.id %>
+
+ <%= link_to 'x',:controller => "tags",:action => "remove_tag",:remote => true,:tag_name => tag,
+ :taggable_id => obj.id,:taggable_type => object_flag %>
+
+ <% end %>
+ <% end %>
+
+
+
+<% end %>
+<% else %>
+
+ <%= l(:label_tags_no) %>
+
+<% end %>
+
<% end %>
\ No newline at end of file
diff --git a/app/views/users/tag_save.js.erb b/app/views/users/tag_save.js.erb
index 6b13f6b41..4dbdc4203 100644
--- a/app/views/users/tag_save.js.erb
+++ b/app/views/users/tag_save.js.erb
@@ -1,14 +1,16 @@
-
-
<% if @obj_flag == '3'%>
+
$('#tags_show_issue').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#put-tag-form-issue').hide();
$('#name-issue').val("");
+
<% else %>
+
$('#tags_show').html('<%= escape_javascript(render :partial => 'tags/tag_name',
:locals => {:obj => @obj,:non_list_all => false,:object_flag => @obj_flag}) %>');
$('#put-tag-form').hide();
$('#name').val("");
+
<% end %>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index 54670a057..2522b0bc7 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -1515,7 +1515,8 @@ zh:
label_course_homework_new: 发布作业
label_course_data: 资料
label_homework_statistics: 作业统计
- # added by william
+
+ # added by william 无english版本
label_bidding_results: 应标结果
label_bid_end: 该需求已经结束!
label_special_reward: 特等奖
@@ -1523,4 +1524,4 @@ zh:
label_second_reward: 二等奖
label_third_reward: 三等奖
label_excellence_reward: 优秀奖
- label_comfort_reward: 入围
+ label_comfort_reward: 入围奖
diff --git a/config/routes.rb b/config/routes.rb
index d3b5c1b43..946d788dc 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -475,6 +475,7 @@ RedmineApp::Application.routes.draw do
match 'parise_tread/praise_plus',:to => 'parise_tread#praise_plus',:as=>"praise"
match 'parise_tread/tread_plus',:to => 'parise_tread#tread_plus',:as=>"tread"
match 'tags/delete',:to=>'tags#delete'
+ match 'tags/remove_tag',:to=>'tags#remove_tag',:as=>"remove_tag"
match 'words/add_brief_introdution', :controller => 'words', :action => 'add_brief_introdution'
end
diff --git a/db/schema.rb b/db/schema.rb
index ec75c62f4..ad15a092d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,11 +11,8 @@
#
# It's strongly recommended to check this file into your version control system.
-<<<<<<< .mine
+
ActiveRecord::Schema.define(:version => 20130922123849) do
-=======
-ActiveRecord::Schema.define(:version => 20130918004629) do
->>>>>>> .theirs
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -73,11 +70,9 @@ ActiveRecord::Schema.define(:version => 20130918004629) do
t.string "description"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
-<<<<<<< .mine
+
t.string "reward"
-=======
- t.integer "reward"
->>>>>>> .theirs
+
end
create_table "bids", :force => true do |t|
diff --git a/lib/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tags_helper.rb b/lib/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tags_helper.rb
index fbbfd0690..29701ba2f 100644
--- a/lib/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tags_helper.rb
+++ b/lib/plugins/acts-as-taggable-on/lib/acts_as_taggable_on/tags_helper.rb
@@ -11,5 +11,6 @@ module ActsAsTaggableOn
yield tag, classes[index.nan? ? 0 : index.round]
end
end
+
end
end
\ No newline at end of file
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index e843b3ba5..fea17ee12 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -593,3 +593,4 @@ function blockEventPropagation(event) {
$(document).ready(setupAjaxIndicator);
$(document).ready(hideOnLoad);
$(document).ready(addFormObserversForDoubleSubmit);
+
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 699bca8e5..65c5a78cc 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -330,6 +330,7 @@ ul.tool li{list-style-type:none;
padding-top: 5px;
padding-bottom: 5px;
padding-left: 12px;
+ padding-right: 12px;
}
.tool{