diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 394c52f13..1b2794034 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -83,6 +83,12 @@ class PollController < ApplicationController def destroy if @poll && @poll.destroy + if @is_teacher + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id}") + else + polls = Poll.where("polls_type = 'Course' and polls_group_id = #{@course.id} and polls_status = 2") + end + @polls = paginateHelper polls,20 #分页 respond_to do |format| format.js end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1face5c38..8254c5313 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1963,6 +1963,15 @@ module ApplicationHelper end def get_technical_title user - #user.user_extensions.technical_title + if user.user_extensions.technical_title == "Professor" || user.user_extensions.technical_title == "教授" + technical_title = l(:label_technicl_title_professor) + elsif user.user_extensions.technical_title == "Associate professor" || user.user_extensions.technical_title == "副教授" + technical_title = l(:label_technicl_title_associate_professor) + elsif user.user_extensions.technical_title == "Lecturer" || user.user_extensions.technical_title == "讲师" + technical_title = l(:label_technicl_title_lecturer) + elsif user.user_extensions.technical_title == "Teaching assistant" || user.user_extensions.technical_title == "助教" + technical_title = l(:label_technicl_title_teaching_assistant) + end + technical_title end end diff --git a/app/views/layouts/base_homework.html.erb b/app/views/layouts/base_homework.html.erb index b583fcad6..f1840c2fd 100644 --- a/app/views/layouts/base_homework.html.erb +++ b/app/views/layouts/base_homework.html.erb @@ -31,6 +31,7 @@ text-align: center; padding-left: 5px !important; padding-right: 5px !important; + line-height: 1.9; } .span_wping a:hover{ background-color:#03a1b3;} diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index dbd6503b0..3b2bd8dfe 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -21,8 +21,6 @@ <%= call_hook :view_layouts_base_html_head %> <%= yield :header_tags -%> - <% title1 = @user.user_extensions.technical_title %> - <% language1 = @user.language %> - +
@@ -283,10 +233,14 @@ <% if @user.user_extensions.identity == 0 %> - <%= l(:label_technical_title) %>: + + <%= l(:label_technical_title) %>: + - + + <%= get_technical_title @user %> + <% end %> diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index f76aaad88..5e5cdf532 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -3,12 +3,25 @@ <%= @project ? l(:label_news_new) : l(:bale_news_notice) %>
-

<%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %>

-

(60个字符以内)

+

+ <%= f.text_field :title, :required => true, :size => 60, :style => "width:488px;", :onkeyup => "regexTitle();" %> +

+

+ (60个字符以内) +

-

<%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onkeyup => "regexDescription();" %>

-

-

<%= render :partial => 'attachments/form', :locals => {:container => @news} %>

+

+ <%= f.text_area :description, :required => true, :cols => 60, :rows => 11, :class => 'wiki-edit', :style => "width:490px;", :onkeyup => "regexDescription();" %> +

+

+ +

+

+ + <%= render :partial => 'attachments/form', :locals => {:container => @news} %> +

<%= wikitoolbar_for 'news_description' %> diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 526c7a1a5..b18c2abd8 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -83,7 +83,7 @@ <%= render :partial => 'news/form', :locals => {:f => f} %> <%#= submit_tag l(:button_create), :class => 'whiteButton m3p10 h30', :name => nil %> <%= link_to l(:button_create), "#", :onclick => 'submitNews();',:onmouseover => 'submitFocus(this);', :class => 'ButtonColor m3p10' %> - | + <%#= preview_link preview_news_path(:project_id => @project), 'news-form', target='preview', {:class => 'whiteButton m3p10'} %> <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %> diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index f89407247..19a1e1e89 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -39,7 +39,7 @@