<% if User.current.logged? %>
<%= labelled_form_for(@memo, :url => create_memo_forum_path(@forum), :html => {:multipart => true} ) do |f| %>
-
<%= f.text_field :subject, :required => true%>
-
<%= f.text_area :content, :required => true, :id => 'editor02' %>
+
+ <%= f.text_field :subject, :required => true, :maxlength => 50%>
+
+
+ <%= f.text_area :content, :required => true, :id => 'editor02' %>
+
-
(<%= l(:label_memos_max_length) %>)
+
+ (<%= l(:label_memos_max_length) %>)
+
- <%= l(:label_attachment_plural) %>
- <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
+ <%= l(:label_attachment_plural) %>
+
+ <%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
<%= f.submit :value => l(:label_memo_create) %>
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-memo").hide(); return false;' %>
diff --git a/app/views/homework_attach/_homeworks_list.html.erb b/app/views/homework_attach/_homeworks_list.html.erb
index c778588f7..c40004d02 100644
--- a/app/views/homework_attach/_homeworks_list.html.erb
+++ b/app/views/homework_attach/_homeworks_list.html.erb
@@ -35,13 +35,13 @@
您还没交作业,请创建作业!
- <% if @bid.comment_status == 0 %>
+ <% if @bid.comment_status == 0 || @bid.comment_status == 1%>
<%= link_to "提交作业", new_exercise_book_path(@bid), :style => "width:80px; margin:20px 0 0 350px;" %>
<% else %>
-
+
提交作业
<% end %>
diff --git a/app/views/layouts/_user_courses_list.html.erb b/app/views/layouts/_user_courses_list.html.erb
index d3da499dc..250ab1d5f 100644
--- a/app/views/layouts/_user_courses_list.html.erb
+++ b/app/views/layouts/_user_courses_list.html.erb
@@ -1,6 +1,6 @@
<% if hasCourse %>
- <%=link_to l(:label_my_course), {:controller => 'users', :action => 'user_courses', id: User.current.id} %>
+ <%=link_to l(:label_my_course), user_courses_user_path(User.current.id) %>
- <%= render_main_menu(@project) %>
+ <%= render_main_menu(@project) %>
<%= render_flash_messages %>
<%= yield %>
diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb
index ded3a1b12..09e4262fe 100644
--- a/app/views/memos/edit.html.erb
+++ b/app/views/memos/edit.html.erb
@@ -4,30 +4,43 @@
<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %>
<% if @memo.errors.any? %>
-
<%= pluralize(@memo.errors.count, "error") %> prohibited this memo from being saved:
+
+ <%= pluralize(@memo.errors.count, "error") %>
+ prohibited this memo from being saved:
+
<% @memo.errors.full_messages.each do |msg| %>
- - <%= msg %>
+ -
+ <%= msg %>
+
<% end %>
<% end %>
-
<%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying%>
- <% unless @replying %>
- <% if @memo.safe_attribute? 'sticky' %>
- <%= f.check_box :sticky %> <%= label_tag 'memo_sticky', l(:label_board_sticky) %>
- <% end %>
- <% if @memo.safe_attribute? 'lock' %>
- <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
- <% end %>
- <% end %>
+ <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%>
+
+ <% if User.current.admin?%>
+
+ <% unless @replying %>
+ <% if @memo.safe_attribute? 'sticky' %>
+ <%= f.check_box :sticky %>
+ <%= label_tag 'memo_sticky', l(:label_board_sticky) %>
+ <% end %>
+ <% if @memo.safe_attribute? 'lock' %>
+ <%= f.check_box :lock %> <%= label_tag 'memo_locked', l(:label_board_locked) %>
+ <% end %>
+ <% end %>
+
+ <% end %>
+
+ <%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>
-
<%= f.text_area :content, :required => true, :size => 80, id: 'editor01' %>
- <%= l(:label_attachment_plural) %>
+ <%= l(:label_attachment_plural) %>
+
<%= render :partial => 'attachments/form', :locals => {:container => @memo} %>
diff --git a/app/views/my/blocks/_assiagn_issue.html.erb b/app/views/my/blocks/_assiagn_issue.html.erb
index 6e7df84fd..1cd940eb9 100644
--- a/app/views/my/blocks/_assiagn_issue.html.erb
+++ b/app/views/my/blocks/_assiagn_issue.html.erb
@@ -11,11 +11,13 @@
-->
-
<%= link_to l(:label_issue_view_all), :controller => 'issues',
- :action => 'index',
- :set_filter => 1,
- :assigned_to_id => 'me',
- :sort => 'priority:desc,updated_on:desc' %>
+
+ <%#= link_to l(:label_issue_view_all), :controller => 'issues',
+ :action => 'index',
+ :set_filter => 1,
+ :assigned_to_id => 'me',
+ :sort => 'priority:desc,updated_on:desc' %>
+
<% end %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(:atom,
diff --git a/app/views/my/blocks/_issuesreportedbyme.html.erb b/app/views/my/blocks/_issuesreportedbyme.html.erb
index 06bbda7f8..de5e20229 100644
--- a/app/views/my/blocks/_issuesreportedbyme.html.erb
+++ b/app/views/my/blocks/_issuesreportedbyme.html.erb
@@ -3,7 +3,7 @@
<% reported_issues = issuesreportedbyme_items %>
<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %>
<% if reported_issues.length > 0 %>
-
<%= link_to l(:label_issue_view_all), :controller => 'issues',
+
<%#= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index',
:set_filter => 1,
:status_id => '*',
diff --git a/app/views/my/blocks/_issueswatched.html.erb b/app/views/my/blocks/_issueswatched.html.erb
index 510920a08..906a47b12 100644
--- a/app/views/my/blocks/_issueswatched.html.erb
+++ b/app/views/my/blocks/_issueswatched.html.erb
@@ -3,7 +3,7 @@
<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
<% if watched_issues.length > 0 %>
-
<%= link_to l(:label_issue_view_all), :controller => 'issues',
+
<%#= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index',
:set_filter => 1,
:watcher_id => 'me',
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 7d13e404e..28994fe29 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -107,7 +107,7 @@
<%= l(:label_i_new_activity) %>
- <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
+ <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
<% else %>
@@ -117,7 +117,7 @@
<%= l(:label_new_activity) %>
- <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), respond_path(e.act_id) %>
+ <%= link_to format_activity_title("#{l(:label_active_homework)}##{act.id}:#{act.name}"), course_for_bid_path(e.act_id) %>
|
<% end %>
<% else %>
diff --git a/app/views/welcome/_course_list.html.erb b/app/views/welcome/_course_list.html.erb
index c33cc841e..8d0d6c40d 100644
--- a/app/views/welcome/_course_list.html.erb
+++ b/app/views/welcome/_course_list.html.erb
@@ -1,5 +1,5 @@
<% course_list.map do |course| %>
-
/,"") %>>
+
<%= image_tag(get_course_avatar(course), :class => "avatar-4") %>
@@ -9,11 +9,11 @@
<% unless course.is_public == 1 %>
<%= l(:label_private) %>
<% end %>
- <%= link_to(course.name.truncate(30, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
+ <%= link_to(course.name.truncate(25, omission: '...')+":", course_path(course.id), :class => "d-g-blue d-p-project-name", :title => "#{course.name}") %>
- <%= link_to(course.try(:teacher).try(:realname), user_path(course.teacher)) %>
+ <%= link_to(course.try(:teacher).try(:realname).truncate(6, omission: '...'), user_path(course.teacher)) %>
<%#=course.try(:teacher).try(:name)%>
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index d89d078a7..f01a6e6d8 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2202,3 +2202,4 @@ zh:
label_submit_comments: 提交评论
field_evaluation_num: 匿评分配数量
label_my_score: 我的评分
+ field_open_anonymous_evaluation: 是否开启匿评
diff --git a/db/migrate/20141119011439_add_open_anonymous_evaluation.rb b/db/migrate/20141119011439_add_open_anonymous_evaluation.rb
new file mode 100644
index 000000000..cea7143c4
--- /dev/null
+++ b/db/migrate/20141119011439_add_open_anonymous_evaluation.rb
@@ -0,0 +1,9 @@
+class AddOpenAnonymousEvaluation < ActiveRecord::Migration
+ def up
+ add_column :bids, :open_anonymous_evaluation, :integer, default: 1
+ end
+
+ def down
+ remove_column :bids, :open_anonymous_evaluation
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f6fc138af..2e664eaa7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20141105012624) do
+ActiveRecord::Schema.define(:version => 20141119011439) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false
@@ -95,21 +95,22 @@ ActiveRecord::Schema.define(:version => 20141105012624) do
create_table "bids", :force => true do |t|
t.string "name"
- t.string "budget", :null => false
+ t.string "budget", :null => false
t.integer "author_id"
t.date "deadline"
t.text "description"
- t.datetime "created_on", :null => false
- t.datetime "updated_on", :null => false
+ t.datetime "created_on", :null => false
+ t.datetime "updated_on", :null => false
t.integer "commit"
t.integer "reward_type"
t.integer "homework_type"
t.integer "parent_id"
t.string "password"
t.integer "is_evaluation"
- t.integer "proportion", :default => 60
- t.integer "comment_status", :default => 0
- t.integer "evaluation_num", :default => 3
+ t.integer "proportion", :default => 60
+ t.integer "comment_status", :default => 0
+ t.integer "evaluation_num", :default => 3
+ t.integer "open_anonymous_evaluation", :default => 1
end
create_table "boards", :force => true do |t|
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index be26a7fed..1b1580d8c 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -2202,7 +2202,7 @@ button.tab-right {
padding-bottom: 2px;
text-align: center;
border: 1px solid #15BCCF;
- /*border-bottom: 0px solid #15BCCF;*/
+ border-bottom: 0px solid #15BCCF;
color:#606060;
font-weight:bold;
diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css
index e54cd3af5..2eb401dfd 100644
--- a/public/stylesheets/css.css
+++ b/public/stylesheets/css.css
@@ -69,7 +69,7 @@ a.wzan_visited{background:url(images/pic_zan.png) 0 0 no-repeat;}
/****评分弹框****/
-.alert_box {width:488px;height:550px;position:absolute;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
+.alert_box {width:488px;height:550px;position:fixed;z-index:1002;left:50%;top:40%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; padding:5px; overflow:auto; }
.alert .close{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-502px;background:url(images/close.png) no-repeat;cursor:pointer;}
.alert .C{width:476px;height:296px;position:absolute;left:5px;top:5px; }
@@ -143,7 +143,7 @@ a:hover.tijiao{ background:#0f99a9 !important;}
.N_search{ height:20px !important; border:1px solid #999 !important;}
/* 匿名评分弹框 */
-.alert_praise{width:480px;height:200px;position:absolute;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
+.alert_praise{width:480px;height:200px;position:fixed;z-index:100;left:50%;top:50%;margin:-215px 0 0 -300px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.alert .close02{width:26px;height:26px;overflow:hidden;position:absolute;top:-10px;right:-490px;background:url(images/close.png) no-repeat;cursor:pointer;}
.ni_con { width:425px; margin:25px 30px;}
.ni_con h2{ display:block; height:40px; width:188px; margin:0 auto;}