diff --git a/.metadata/.log b/.metadata/.log index fbbe00cbe..ea77ea8b9 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -209,16 +209,16 @@ java.lang.UnsupportedOperationException: Not supported yet. at com.aptana.index.core.IndexRequestJob.indexFileStores(IndexRequestJob.java:205) at com.aptana.index.core.IndexContainerJob.run(IndexContainerJob.java:114) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) -!SESSION 2015-01-05 10:21:34.093 ----------------------------------------------- +!SESSION 2015-01-17 11:30:30.655 ----------------------------------------------- eclipse.buildId=unknown java.version=1.6.0_24 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN Command-line arguments: -os win32 -ws win32 -arch x86 -!ENTRY org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435 +!ENTRY org.eclipse.core.resources 4 567 2015-01-17 11:30:37.624 !MESSAGE Workspace restored, but some problems occurred. -!SUBENTRY 1 org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435 +!SUBENTRY 1 org.eclipse.core.resources 4 567 2015-01-17 11:30:37.624 !MESSAGE Could not read metadata for 'demo'. !STACK 1 org.eclipse.core.internal.resources.ResourceException: The project description file (.project) for 'demo' is missing. This file contains important information about the project. The project will not function properly until this file is restored. @@ -261,59 +261,8 @@ org.eclipse.core.internal.resources.ResourceException: The project description f at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) at org.eclipse.equinox.launcher.Main.run(Main.java:1410) -!SUBENTRY 2 org.eclipse.core.resources 4 567 2015-01-05 10:21:56.435 +!SUBENTRY 2 org.eclipse.core.resources 4 567 2015-01-17 11:30:37.626 !MESSAGE The project description file (.project) for 'demo' is missing. This file contains important information about the project. The project will not function properly until this file is restored. -!ENTRY com.aptana.terminal 1 0 2015-01-05 10:22:03.546 -!MESSAGE Starting terminal process failed. -!STACK 1 -org.eclipse.core.runtime.CoreException: Shell executable could not be found. - at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113) - at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40) - at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38) - at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220) - at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208) - at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102) -!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:22:03.546 -!MESSAGE Shell executable could not be found. - -!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:30.988 -!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.tm.internal.terminal.emulator.VT100TerminalControl$1 - -!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:30.989 +!ENTRY org.eclipse.core.jobs 2 2 2015-01-17 11:33:58.913 !MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: com.aptana.usage.internal.DefaultAnalyticsEventHandler$1 -!SESSION 2015-01-05 10:27:31.720 ----------------------------------------------- -eclipse.buildId=3.4.2.201308081805 -java.version=1.6.0_24 -java.vendor=Sun Microsystems Inc. -BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN -Command-line arguments: -os win32 -ws win32 -arch x86 - -!ENTRY com.aptana.terminal 1 0 2015-01-05 10:27:34.915 -!MESSAGE Starting terminal process failed. -!STACK 1 -org.eclipse.core.runtime.CoreException: Shell executable could not be found. - at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113) - at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40) - at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38) - at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220) - at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208) - at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102) -!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:27:34.915 -!MESSAGE Shell executable could not be found. - -!ENTRY com.aptana.terminal 1 0 2015-01-05 10:27:37.984 -!MESSAGE Starting terminal process failed. -!STACK 1 -org.eclipse.core.runtime.CoreException: Shell executable could not be found. - at com.aptana.core.ShellExecutable.getPath(ShellExecutable.java:113) - at com.aptana.terminal.internal.configurations.WindowsMingwConfiguration.getCommandLine(WindowsMingwConfiguration.java:40) - at com.aptana.terminal.internal.ProcessLauncher.launch(ProcessLauncher.java:38) - at com.aptana.terminal.connector.LocalTerminalConnector.startProcess(LocalTerminalConnector.java:220) - at com.aptana.terminal.connector.LocalTerminalConnector.access$0(LocalTerminalConnector.java:208) - at com.aptana.terminal.connector.LocalTerminalConnector$1.run(LocalTerminalConnector.java:102) -!SUBENTRY 1 com.aptana.core 4 0 2015-01-05 10:27:37.984 -!MESSAGE Shell executable could not be found. - -!ENTRY org.eclipse.core.jobs 2 2 2015-01-05 10:27:55.438 -!MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.tm.internal.terminal.emulator.VT100TerminalControl$1 diff --git a/.metadata/.plugins/com.aptana.core.io/connections.15 b/.metadata/.plugins/com.aptana.core.io/connections.15 deleted file mode 100644 index 46f15223a..000000000 --- a/.metadata/.plugins/com.aptana.core.io/connections.15 +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.15 b/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.15 deleted file mode 100644 index 7f1a49fed..000000000 --- a/.metadata/.plugins/com.aptana.syncing.core/defaultConnection.15 +++ /dev/null @@ -1,7 +0,0 @@ - - - -Default -file:/C:/Users/Administrator - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.syncing.core/sites.15 b/.metadata/.plugins/com.aptana.syncing.core/sites.15 deleted file mode 100644 index dc24d7a57..000000000 --- a/.metadata/.plugins/com.aptana.syncing.core/sites.15 +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/.metadata/.plugins/com.aptana.webserver.core/webservers.12 b/.metadata/.plugins/com.aptana.webserver.core/webservers.12 deleted file mode 100644 index 2979c56a7..000000000 --- a/.metadata/.plugins/com.aptana.webserver.core/webservers.12 +++ /dev/null @@ -1,6 +0,0 @@ - - - -demo - - \ No newline at end of file diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/demo/6.tree b/.metadata/.plugins/org.eclipse.core.resources/.projects/demo/6.tree deleted file mode 100644 index 215d06c77..000000000 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.projects/demo/6.tree and /dev/null differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index index 167d2542c..83f5328be 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index and b/.metadata/.plugins/org.eclipse.core.resources/.root/.indexes/properties.index differ diff --git a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources index de5f19a7c..b756a6952 100644 Binary files a/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources and b/.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources differ diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs index 752d73cf4..992cdf2bf 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.explorer.prefs @@ -1,2 +1,2 @@ -activeProject=demo +activeProject=trustie eclipse.preferences.version=1 diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs index b13d8f53c..bc6c0d7c7 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.aptana.theme.prefs @@ -1,7 +1,7 @@ ACTIVE_HYPERLINK_COLOR=84,143,160 ACTIVE_THEME=Aptana Studio HYPERLINK_COLOR=84,143,160 -THEME_CHANGED=1420424854199 +THEME_CHANGED=1421465443240 eclipse.preferences.version=1 hyperlinkColor=84,143,160 hyperlinkColor.SystemDefault=false diff --git a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs index 6624ec57e..310adab05 100644 --- a/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs +++ b/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -2,6 +2,6 @@ PROBLEMS_FILTERS_MIGRATE=true SHOW_COOLBAR=true SHOW_PERSPECTIVEBAR=true eclipse.preferences.version=1 -platformState=1420424495377 +platformState=1420528131671 quickStart=false tipsAndTricks=true diff --git a/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch b/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch index 678ced8a0..08a9581b9 100644 --- a/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch +++ b/.metadata/.plugins/org.eclipse.debug.core/.launches/Firefox - Internal Server.launch @@ -3,7 +3,7 @@ - + diff --git a/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml index 3467fd0f7..cd47216f4 100644 --- a/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml +++ b/.metadata/.plugins/org.eclipse.ui.workbench/workbench.xml @@ -1,5 +1,5 @@ - + @@ -37,7 +37,7 @@ demo -C:\Users\Administrator +C:\Users\zh @@ -46,7 +46,7 @@ Terminal -C:\Users\Administrator +C:\Users\nudt @@ -66,13 +66,19 @@ - + + + + + + + - + @@ -118,14 +124,19 @@ - - - - + + + + + + + + + - + @@ -144,7 +155,7 @@ - + @@ -160,15 +171,11 @@ - - - - - - - - - + + + + + @@ -182,6 +189,9 @@ + + + diff --git a/app/controllers/applied_project_controller.rb b/app/controllers/applied_project_controller.rb index 3d061ef74..f5c42f7b4 100644 --- a/app/controllers/applied_project_controller.rb +++ b/app/controllers/applied_project_controller.rb @@ -3,7 +3,26 @@ class AppliedProjectController < ApplicationController #申请加入项目 def applied_join_project @user_id = params[:user_id] - @project = Project.find(params[:project_id]) + @project = Project.find_by_id(params[:project_id]) + if params[:project_join] + if @project + @applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id]) + if @applieds.count == 0 + appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id]) + Mailer.applied_project(appliedproject).deliver + @status = 2 + else + @status = 1 + end + else + @status = 0 + end + respond_to do |format| + format.js + end + return + end + @applieds = AppliedProject.where("user_id = ? and project_id = ?", params[:user_id],params[:project_id]) if @applieds.count == 0 appliedproject = AppliedProject.create(:user_id => params[:user_id], :project_id => params[:project_id]) diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 4abddaa5e..394c52f13 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -1,8 +1,8 @@ class PollController < ApplicationController - before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result] + before_filter :find_poll_and_course, :only => [:edit,:update,:destroy,:show,:statistics_result,:create_poll_question,:commit_poll,:commit_answer,:publish_poll,:republish_poll,:poll_result,:close_poll] before_filter :find_container, :only => [:new,:create, :index] before_filter :is_member_of_course, :only => [:index,:show,:poll_result] - before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll] + before_filter :is_course_teacher, :only => [:new,:create,:edit,:update,:destroy,:publish_poll,:republish_poll,:close_poll] include PollHelper def index if @course @@ -47,6 +47,7 @@ class PollController < ApplicationController :user_id => User.current.id, :published_at => Time.now, :closed_at => Time.now, + :show_result => 1, :polls_description => "" } @poll = Poll.create option @@ -69,8 +70,8 @@ class PollController < ApplicationController end def update - @poll.polls_name = params[:polls_name].empty? ? l(:label_poll_title) : params[:polls_name] - @poll.polls_description = params[:polls_description].empty? ? l(:label_poll_description) : params[:polls_description] + @poll.polls_name = params[:polls_name] + @poll.polls_description = params[:polls_description] if @poll.save respond_to do |format| format.js @@ -338,6 +339,17 @@ class PollController < ApplicationController end end + #关闭问卷 + def close_poll + @poll.polls_status = 3 + @poll.closed_at = Time.now + if @poll.save + respond_to do |format| + format.js + end + end + end + private def find_poll_and_course @poll = Poll.find params[:id] diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7efa02503..caf29ba90 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -494,7 +494,7 @@ module ApplicationHelper def principals_check_box_tags_ex(name, principals) s = '' principals.each do |principal| - s << "\n" + s << "\n" end s.html_safe end diff --git a/app/helpers/poll_helper.rb b/app/helpers/poll_helper.rb index 60d82c096..3156f1b3a 100644 --- a/app/helpers/poll_helper.rb +++ b/app/helpers/poll_helper.rb @@ -64,13 +64,13 @@ module PollHelper def options_show pq case pq when 1 - "单选题" + l(:label_MC) when 2 - "多选题" + l(:label_MCQ) when 3 - "单行主观题" + l(:label_single) else - "多行主观题" + l(:label_mulit) end end diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 1760d9004..f42c20acc 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -36,7 +36,7 @@ class Mailer < ActionMailer::Base @author = forum.creator recipients = forum.creator.mail # cc = wiki_content.page.wiki.watcher_recipients - recipients - + @issue_author_url = url_for(user_activities_url(@author)) @forum_url = url_for(:controller => 'forums', :action => 'show', :id => forum.id) mail :to => recipients,:subject => "[ #{l(:label_forum)} : #{forum.name} #{l(:notice_successful_create)}]" @@ -47,6 +47,8 @@ class Mailer < ActionMailer::Base redmine_headers 'Memo' => memo.id @forum = memo.forum @author = memo.author + @forum_url = url_for(:controller => 'forums', :action => 'show', :id => @forum.id) + @issue_author_url = url_for(user_activities_url(@author)) recipients ||= [] mems = memo.self_and_siblings mems.each do |mem| @@ -69,7 +71,7 @@ class Mailer < ActionMailer::Base @mail = journals_for_message.at_user if journals_for_message.at_user @message = journals_for_message.notes @title = "#@user #{t(:label_leave_your_message, :locale => 'zh')}" - + @issue_author_url = url_for(user_activities_url(@user)) @url = case journals_for_message.jour.class.to_s.to_sym # 判断留言的对象所属类型 when :Bid course_for_bid_url(journals_for_message.jour, anchor: "word_li_#{journals_for_message.id}") @@ -289,6 +291,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Project' => document.project.identifier @author = User.current @document = document + @issue_author_url = url_for(user_activities_url(@author)) @document_url = url_for(:controller => 'documents', :action => 'show', :id => document) mail :to => document.recipients, :subject => "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}" @@ -304,6 +307,7 @@ class Mailer < ActionMailer::Base added_to = '' added_to_url = '' @author = attachments.first.author + @issue_author_url = url_for(user_activities_url(@author)) case container.class.name when 'Project' added_to_url = url_for(:controller => 'files', :action => 'index', :project_id => container) @@ -356,6 +360,7 @@ class Mailer < ActionMailer::Base if news.project redmine_headers 'Project' => news.project.identifier @author = news.author + @issue_author_url = url_for(user_activities_url(@author)) message_id news @news = news @news_url = url_for(:controller => 'news', :action => 'show', :id => news) @@ -364,6 +369,7 @@ class Mailer < ActionMailer::Base elsif news.course redmine_headers 'Course' => news.course.id @author = news.author + @issue_author_url = url_for(user_activities_url(@author)) message_id news @news = news recipients = news.course.notified_users.select { |user| user.allowed_to?(:view_files, news.course) }.collect { |u| u.mail } @@ -383,6 +389,7 @@ class Mailer < ActionMailer::Base if news.project redmine_headers 'Project' => news.project.identifier @author = comment.author + @issue_author_url = url_for(user_activities_url(@author)) message_id comment @news = news @comment = comment @@ -393,6 +400,7 @@ class Mailer < ActionMailer::Base elsif news.course redmine_headers 'Course' => news.course.id @author = comment.author + @issue_author_url = url_for(user_activities_url(@author)) message_id comment @news = news @comment = comment @@ -414,6 +422,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Project' => message.project.identifier, 'Topic-Id' => (message.parent_id || message.id) @author = message.author + @issue_author_url = url_for(user_activities_url(@author)) message_id message references message.parent unless message.parent.nil? recipients = message.recipients @@ -427,6 +436,7 @@ class Mailer < ActionMailer::Base redmine_headers 'Course' => message.course.id, 'Topic-Id' => (message.parent_id || message.id) @author = message.author + @issue_author_url = url_for(user_activities_url(@author)) message_id message references message.parent unless message.parent.nil? recipients = message.course.notified_users.select { |user| user.allowed_to?(:view_files, message.course) }.collect { |u| u.mail } diff --git a/app/views/applied_project/applied_join_project.js.erb b/app/views/applied_project/applied_join_project.js.erb new file mode 100644 index 000000000..deac2c9ce --- /dev/null +++ b/app/views/applied_project/applied_join_project.js.erb @@ -0,0 +1,9 @@ +<% if @status == 0%> + alert("您申请的项目不存在"); +<% elsif @status == 1%> + alert("请勿重复申请加入该项目"); +<% elsif @status == 2%> + alert("申请成功"); +<%else%> + alert("申请失败"); +<%end%> \ No newline at end of file diff --git a/app/views/courses/_course_form.html.erb b/app/views/courses/_course_form.html.erb index d293f9ed1..85ca24c1b 100644 --- a/app/views/courses/_course_form.html.erb +++ b/app/views/courses/_course_form.html.erb @@ -29,7 +29,7 @@ <%= l(:label_tags_course_name) %> *   - +

<%= f.fields_for @course do |m| %> @@ -38,11 +38,11 @@
- + <%= l(:label_class_period) %> *   - + <%= text_field_tag :class_period, @course.class_period, :placeholder => "#{l(:lable_input_class)}", :maxlength => 5 %>   @@ -118,7 +118,7 @@

- + <%= l(:text_command) %> <% end %> diff --git a/app/views/courses/_set_course_time.html.erb b/app/views/courses/_set_course_time.html.erb index f1eec891f..0c28b90a7 100644 --- a/app/views/courses/_set_course_time.html.erb +++ b/app/views/courses/_set_course_time.html.erb @@ -5,9 +5,9 @@ <% if display #如果课程已结束%> <% linkPath = course_endTime_timeout?(course) ? restartcourse_course_path(course) : finishcourse_course_path(course, format: :js) %> - <% desc = course_endTime_timeout?(course) ? '重启' : '关闭' %> + <% desc = course_endTime_timeout?(course) ? l(:label_course_reload) : l(:label_course_closed) %> - <%= link_to "#{desc}", linkPath, :remote => true, :method => :post, :id => id, :confirm => ("确定要#{desc}课程?") %> + <%= link_to "#{desc}", linkPath, :remote => true, :method => :post, :id => id, :confirm => l(:label_course_closed_tips, :desc => desc) %> <% else %> <% end %> diff --git a/app/views/courses/new.html.erb b/app/views/courses/new.html.erb index 77f041322..b9422ba64 100644 --- a/app/views/courses/new.html.erb +++ b/app/views/courses/new.html.erb @@ -6,7 +6,7 @@ <%= labelled_form_for @course do |f| %>
<%= render :partial => 'course_form', :locals => { :f => f } %> - + <%= submit_tag l(:button_create), :class => "enterprise"%> diff --git a/app/views/files/_attachement_list.html.erb b/app/views/files/_attachement_list.html.erb index f65ba8d41..85739f7c3 100644 --- a/app/views/files/_attachement_list.html.erb +++ b/app/views/files/_attachement_list.html.erb @@ -22,7 +22,7 @@
- + <%= file_field_tag 'attachments[dummy][file]', :id => '_file', :class => 'file_selector', diff --git a/app/views/files/_upload_show.html.erb b/app/views/files/_upload_show.html.erb index 13bcd043e..65a662f10 100644 --- a/app/views/files/_upload_show.html.erb +++ b/app/views/files/_upload_show.html.erb @@ -1,15 +1,15 @@
-

上传资源

+

<%= l(:label_upload_files)%>

<%= error_messages_for 'attachment' %> - + <%= form_tag(course_files_path(course), :multipart => true,:remote => true,:method => :post,:name=>"upload_form") do %> - + <%= render :partial => 'attachement_list',:locals => {:course => course} %>
- 确  认 - 取  消 + <%= l(:button_confirm)%> + <%= l(:button_cancel)%> <% end %>
diff --git a/app/views/layouts/_base_feedback.html.erb b/app/views/layouts/_base_feedback.html.erb index f1c829c1f..bf4b12daf 100644 --- a/app/views/layouts/_base_feedback.html.erb +++ b/app/views/layouts/_base_feedback.html.erb @@ -135,7 +135,6 @@ function f_submit() - 意见反馈 diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 466e711c2..06626c155 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -305,7 +305,7 @@ .polls_btn a{font-size:14px; color:#444444;font-weight:bold;} .polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;} .polls_btn a{ float:left;} - .polls_n{float: left;background: #ff5d31;color: #fff;width: 12px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; } + .polls_n{float: left;background: #ff5d31;color: #fff;width: 32px;padding-left: 2px;height: 7px;padding-bottom: 5px;padding-top: 3px;margin-top: -4px;margin-left: 3px; } .polls_n p{ margin-top:-4px;} .cl{ clear:both; overflow:hidden; } @@ -313,7 +313,7 @@ <%= link_to l(:label_poll), poll_index_path(:polls_type => "Course", :polls_group_id => @course.id)%>
-

N

+

NEW

diff --git a/app/views/layouts/base_newcontest.html.erb b/app/views/layouts/base_newcontest.html.erb index 0d234a69c..d525f65a2 100644 --- a/app/views/layouts/base_newcontest.html.erb +++ b/app/views/layouts/base_newcontest.html.erb @@ -102,7 +102,7 @@ <% if User.current.login? %> diff --git a/app/views/layouts/base_projects.html.erb b/app/views/layouts/base_projects.html.erb index 67e4da0f4..b8cc2ddc9 100644 --- a/app/views/layouts/base_projects.html.erb +++ b/app/views/layouts/base_projects.html.erb @@ -132,8 +132,9 @@ + diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb index abb896b61..c5be3f4fd 100644 --- a/app/views/layouts/mailer.html.erb +++ b/app/views/layouts/mailer.html.erb @@ -44,9 +44,7 @@ a:hover.mail_reply{ background:#06a9bc; text-decoration:none;}

<%= l(:mail_issue_greetings)%>

<%= yield %> -
- <%= Redmine::WikiFormatting.to_html(Setting.text_formatting, Setting.emails_footer).html_safe %> - + diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb index 0ec585868..5145dbb2c 100644 --- a/app/views/mailer/_issue.html.erb +++ b/app/views/mailer/_issue.html.erb @@ -1,26 +1,29 @@

+ <%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> <%= l(:mail_issue_title_userin)%> <%= link_to(h("#{@issue.project.name}"), @project_url, :style=>'color:#1b55a7; font-weight:bold;') %><%= l(:mail_issue_title_active)%>

    -
  • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %>
  • -
  • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
  • -
  • <%= l(:mail_issue_content)%> +
  • <%= l(:mail_issue_subject)%><%= link_to(issue.subject, issue_url, :style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%><%= issue.project.name %><%= l(:mail_issue_from_project)%>
  • +
  • <%= l(:mail_issue_content)%> + <% if @journal.nil? %> - <%= issue.description %> + <%= issue.description=='' ? l(:label_none) : issue.description %> <% else %> - <%= @journal.notes %> + <%= @journal.notes=='' ? l(:label_none) : @journal.notes %> <% end%>
  • -
  • - - <% unless @issue.attachments.nil? %> - <%= l(:mail_issue_attachments)%> +
  • + <%= l(:mail_issue_attachments)%> + <% if @issue.attachments.count == 0 %> + <%= l(:label_none)%> + <% else %> <% @issue.attachments.each do |attach| %>

    <%= link_to_attachment(attach, :download => true, :token => @token.value, :only_path => false, :style=>'color:#1b55a7; font-weight:bold;')%>

    diff --git a/app/views/mailer/forum_add.html.erb b/app/views/mailer/forum_add.html.erb index 8da8b7891..7e26fd0df 100644 --- a/app/views/mailer/forum_add.html.erb +++ b/app/views/mailer/forum_add.html.erb @@ -1,4 +1,29 @@ -

    <%= link_to(h(@forum.name), @forum_url) %>

    -<%=h @forum.creator.name %> -<%= @forum.description.html_safe %> \ No newline at end of file +

    + + <%= link_to(h("#{@forum.creator.login}(#{@forum.creator.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:label_forum_new)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • + +
    • <%= l(:mail_issue_content)%> + + <%= @forum.description.html_safe %> + +
    • + +
    +
    + +
    +
    + + + diff --git a/app/views/mailer/forum_message_added.html.erb b/app/views/mailer/forum_message_added.html.erb index 743c06ae7..58657d46b 100644 --- a/app/views/mailer/forum_message_added.html.erb +++ b/app/views/mailer/forum_message_added.html.erb @@ -1,4 +1,32 @@ -

    <%= link_to(h(@memo.subject), @memo_url) %>

    -<%=h @memo.author.name %> -<%= @memo.content.html_safe %> \ No newline at end of file +

    + + <%= link_to(h("#{@author.login}(#{@author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> + + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_active)%>

    +
    +
      +
    • <%= l(:mail_issue_subject)%> + <%= link_to(h(@memo.subject), @memo_url,:style=>'color:#1b55a7; font-weight:bold;') %>
    • +
    • <%= l(:mail_issue_sent_from)%> + <%= link_to(h(@forum.name), @forum_url,:style=>'color:#1b55a7; font-weight:bold;') %> +
    • +
    • <%= l(:mail_issue_content)%> + + <%= @memo.content.html_safe %> + +
    • + +
    +
    + +
    +
    + + + diff --git a/app/views/mailer/issue_edit.html.erb b/app/views/mailer/issue_edit.html.erb index f7412402c..35b963b41 100644 --- a/app/views/mailer/issue_edit.html.erb +++ b/app/views/mailer/issue_edit.html.erb @@ -1,10 +1,6 @@ -
    - <%= l(:text_issue_updated, :id => "##{@issue.project_index}", :author => h(@journal.user)) %> - -
    -
    + <%= render :partial => 'issue', :formats => [:html], :locals => { :issue => @issue, :issue_url => @issue_url } %>
    <%= link_to( l(:mail_issue_footer), @user_url, :style=>'font-size:12px; font-weight:normal; color:#1b55a7;') %>
    diff --git a/app/views/mailer/journals_for_message_add.html.erb b/app/views/mailer/journals_for_message_add.html.erb index f39b49026..cfb288d9d 100644 --- a/app/views/mailer/journals_for_message_add.html.erb +++ b/app/views/mailer/journals_for_message_add.html.erb @@ -1,5 +1,25 @@ -尊敬的用户,<%= @user %>给你留言了: -
    <%= @message %>
    -

    点击链接查看最新回复<%= link_to(@url, @url) %> -         <%= link_to(l(:lable_not_receive_mail),"http://" + Setting.host_name + "/my/account")%>

    + +

    + + + <%= link_to(h("#{@user.login}(#{@user.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + 给你留言了 +

    +
    +
      + +
    • <%= l(:mail_issue_content)%> + + <%= @message %> + +
    • + +
    +
    + +
    +
    + diff --git a/app/views/mailer/message_posted.html.erb b/app/views/mailer/message_posted.html.erb index 1fe28e04f..dbe41976a 100644 --- a/app/views/mailer/message_posted.html.erb +++ b/app/views/mailer/message_posted.html.erb @@ -1,7 +1,8 @@

    - <%= h @message.author %>(<%= @message.author.show_name %>) + <%= link_to(h("#{@message.author.login}(#{@message.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + <%= l(:mail_issue_title_userin)%> <% if @message.project %> @@ -29,7 +30,7 @@

diff --git a/app/views/mailer/news_added.html.erb b/app/views/mailer/news_added.html.erb index 758ebccb8..ca8f3c1b0 100644 --- a/app/views/mailer/news_added.html.erb +++ b/app/views/mailer/news_added.html.erb @@ -1,4 +1,41 @@ -

<%= link_to(h(@news.title), @news_url) %>

-<%=h @news.author.name %> -<%= textilizable(@news, :description, :only_path => false) %> +

+ + + <%= link_to(h("#{@news.author.login}(#{@news.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% if @news.project %> + <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% elsif @news.course %> + <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% end %> + <%= l(:mail_issue_title_active)%>

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
  • +
  • <%= l(:mail_issue_content)%> + + <%= @news.description %> + +
  • + +
+
+ +
+
+ + + diff --git a/app/views/mailer/news_comment_added.html.erb b/app/views/mailer/news_comment_added.html.erb index ef2be0f65..3e0118849 100644 --- a/app/views/mailer/news_comment_added.html.erb +++ b/app/views/mailer/news_comment_added.html.erb @@ -1,5 +1,40 @@ -

<%= link_to(h(@news.title), @news_url) %>

-

<%= l(:text_user_wrote, :value => h(@comment.author)) %>

+

+ + <%= link_to(h("#{@comment.author.login}(#{@comment.author.show_name})"), @issue_author_url , :style=>'color:#1b55a7; font-weight:bold;') %> + + <%= l(:mail_issue_title_userin)%> + + <% if @news.project %> + <%=h @news.project.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% elsif @news.course %> + <%=h @news.course.name %> : <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %> + <% end %> + <%= l(:mail_issue_title_active)%>

+
+
    +
  • <%= l(:mail_issue_subject)%> + <%= link_to(h(@news.title), @news_url,:style=>'color:#1b55a7; font-weight:bold;') %>
  • +
  • <%= l(:mail_issue_sent_from)%> + <% if @news.project %> + <%=h @news.project.name %> + <% elsif @news.course %> + <%=h @news.course.name %> + <% end %> +
  • +
  • <%= l(:mail_issue_content)%> + + <%= @comment.comments %> + +
  • + +
+
+ +
+
+ + -<%= textilizable @comment, :comments, :only_path => false %> diff --git a/app/views/memos/edit.html.erb b/app/views/memos/edit.html.erb index 09e4262fe..008522316 100644 --- a/app/views/memos/edit.html.erb +++ b/app/views/memos/edit.html.erb @@ -1,5 +1,6 @@ <% @replying = !@memo.parent.nil? %> +

<%=l(:label_memo_edit)%>

<%= labelled_form_for(@memo, :url => forum_memo_path(@memo.forum_id, @memo)) do |f| %> <% if @memo.errors.any? %> @@ -19,8 +20,12 @@ <% end %>

- <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => @replying, :maxlength => 50%> -

+ <% if @memo.parent.nil? && @memo.children.first.nil? %> + <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => false, :maxlength => 50%> + <% else %> + <%= f.text_field :subject, :required => true, :size => 96 ,:readonly => true, :style => "border: 1px solid gray", :maxlength => 50%> + <% end %> +

<% if User.current.admin?%>

<% unless @replying %> diff --git a/app/views/news/_project_news.html.erb b/app/views/news/_project_news.html.erb index 79217f1fe..526c7a1a5 100644 --- a/app/views/news/_project_news.html.erb +++ b/app/views/news/_project_news.html.erb @@ -82,11 +82,11 @@ :html => {:id => 'news-form', :multipart => true} do |f| %> <%= 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 => 'whiteButton m3p10' %> + <%= 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 => 'whiteButton m3p10' %> + <%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()', :class => 'ButtonColor m3p10' %> <% end if @project %>

diff --git a/app/views/poll/_edit_MC.html.erb b/app/views/poll/_edit_MC.html.erb index 066eafe0d..f89407247 100644 --- a/app/views/poll/_edit_MC.html.erb +++ b/app/views/poll/_edit_MC.html.erb @@ -39,8 +39,12 @@
diff --git a/app/views/poll/_edit_MCQ.html.erb b/app/views/poll/_edit_MCQ.html.erb index 129f50e94..d6045f965 100644 --- a/app/views/poll/_edit_MCQ.html.erb +++ b/app/views/poll/_edit_MCQ.html.erb @@ -36,8 +36,12 @@
diff --git a/app/views/poll/_edit_head.html.erb b/app/views/poll/_edit_head.html.erb index 802832601..dfa5b5cfc 100644 --- a/app/views/poll/_edit_head.html.erb +++ b/app/views/poll/_edit_head.html.erb @@ -7,8 +7,12 @@
diff --git a/app/views/poll/_edit_mulit.html.erb b/app/views/poll/_edit_mulit.html.erb index d498169f4..5c694ff05 100644 --- a/app/views/poll/_edit_mulit.html.erb +++ b/app/views/poll/_edit_mulit.html.erb @@ -20,8 +20,12 @@
diff --git a/app/views/poll/_edit_single.html.erb b/app/views/poll/_edit_single.html.erb index 2c2d41e0f..5aff29984 100644 --- a/app/views/poll/_edit_single.html.erb +++ b/app/views/poll/_edit_single.html.erb @@ -16,8 +16,12 @@
diff --git a/app/views/poll/_new_MC.html.erb b/app/views/poll/_new_MC.html.erb index a7f9e441b..294c058f8 100644 --- a/app/views/poll/_new_MC.html.erb +++ b/app/views/poll/_new_MC.html.erb @@ -34,8 +34,12 @@
diff --git a/app/views/poll/_new_MCQ.html.erb b/app/views/poll/_new_MCQ.html.erb index 027a1c1f6..1478f9918 100644 --- a/app/views/poll/_new_MCQ.html.erb +++ b/app/views/poll/_new_MCQ.html.erb @@ -33,8 +33,12 @@
diff --git a/app/views/poll/_new_mulit.html.erb b/app/views/poll/_new_mulit.html.erb index 02f7a71a7..23ffb3d64 100644 --- a/app/views/poll/_new_mulit.html.erb +++ b/app/views/poll/_new_mulit.html.erb @@ -13,8 +13,12 @@
diff --git a/app/views/poll/_new_single.html.erb b/app/views/poll/_new_single.html.erb index ffc525546..4ee185070 100644 --- a/app/views/poll/_new_single.html.erb +++ b/app/views/poll/_new_single.html.erb @@ -8,8 +8,12 @@
diff --git a/app/views/poll/_poll.html.erb b/app/views/poll/_poll.html.erb index c53f09361..fdf534405 100644 --- a/app/views/poll/_poll.html.erb +++ b/app/views/poll/_poll.html.erb @@ -22,7 +22,7 @@ <% end %> <%if @is_teacher%> - <% if poll.polls_status == 1 %> + <% if poll.polls_status == 1 || poll.polls_status == 3 %>
  • 统计结果
  • <% elsif poll.polls_status == 2%>
  • @@ -31,38 +31,61 @@ <% end%> <% end%> -
  • - <%if @is_teacher %> + +<%if @is_teacher %> <% if poll.polls_status == 1 %> - 发布问卷 +
  • + + 发布问卷 + +
  • <% elsif poll.polls_status == 2%> - 取消发布 +
  • + + 取消发布 + +
  • + <% else%> +
  • + 发布问卷 +
  • <% end%> - <% end%> - +<% end%> +
  • <% if @is_teacher %> <%= link_to(l(:button_delete), poll, - method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml20 mr10") %> + method: :delete, :confirm => l(:text_are_you_sure), :remote => true, :class => "polls_de fr ml15 mr10") %> <% end%>
  • -
  • - <% if @is_teacher%> - <% if poll.polls_status == 1 %> - <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml20"%> - <% elsif poll.polls_status == 2%> -
  • 编辑
  • - <% end%> + +<% if @is_teacher%> + <% if poll.polls_status == 1 %> +
  • + <%= link_to l(:button_edit), edit_poll_path(poll.id), :class => "polls_de fr ml15"%> +
  • + <% else%> +
  • + 编辑 +
  • <% end%> - - - - - - - - +<% end%> + +<% if @is_teacher%> + <% if poll.polls_status == 2 %> +
  • + 关闭 +
  • + <% else %> +
  • + 关闭 +
  • + <% end%> + +<% end %> + +
  • <%= format_time poll.created_at%>
  • \ No newline at end of file diff --git a/app/views/poll/_poll_form.html.erb b/app/views/poll/_poll_form.html.erb index df4859613..4742028d5 100644 --- a/app/views/poll/_poll_form.html.erb +++ b/app/views/poll/_poll_form.html.erb @@ -25,6 +25,10 @@ } //问卷头 function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();} + function pollsSubmit(doc){ + var title = $.trim($("#polls_title").val()); + if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();} + } function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();} // function pollQuestionCancel(question_id){ @@ -57,15 +61,22 @@ function poll_submit() { - $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); - showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); - $('#ajax-modal').siblings().remove(); - $('#ajax-modal').before("" + - ""); - $('#ajax-modal').parent().removeClass("alert_praise"); - $('#ajax-modal').parent().css("top","").css("left",""); - $('#ajax-modal').parent().addClass("popbox_polls"); + var title = $.trim($("#polls_name_h").html()); + if(title.length == 0) + { + alert("问卷标题不能为空"); + } + else{ + $('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>'); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','120px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } } diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index 7ab16b24d..ce74dc10a 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

    - <%= poll.polls_name.empty? ? l(:label_poll_new) : poll.polls_name%> + <%= poll.polls_name%>

    <%= @poll.polls_description%> diff --git a/app/views/poll/close_poll.js.erb b/app/views/poll/close_poll.js.erb new file mode 100644 index 000000000..222ea7976 --- /dev/null +++ b/app/views/poll/close_poll.js.erb @@ -0,0 +1,2 @@ +$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); +alert("关闭成功"); \ No newline at end of file diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index a8aca1308..3db4d7caa 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -15,7 +15,7 @@ "

    " + ""); showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); + $('#ajax-modal').css('height','120px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); @@ -26,22 +26,53 @@ function clickCanel(){hideModal("#popbox02");} - function poll_submit(poll_id) + function poll_submit(poll_id,poll_name) { - $('#ajax-modal').html("
    " + - "
    " + - "
    " + + if(poll_name == 0) + { + alert("问卷标题不能为空"); + } + else + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + "

    问卷发布后将不能对问卷进行修改,
    是否确定发布该问卷?

    " + "
    " + - "确  定" + - "取  消" + + "确  定" + + "取  消" + "
    " + "
    " + + "
    " + + "
    " + + "
    "); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','120px'); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before("" + + ""); + $('#ajax-modal').parent().removeClass("alert_praise"); + $('#ajax-modal').parent().css("top","").css("left",""); + $('#ajax-modal').parent().addClass("popbox_polls"); + } + } + + function close_poll(poll_id) + { + $('#ajax-modal').html("
    " + + "
    " + + "
    " + + "

    问卷关闭后学生将不能继续提交问卷,
    是否确定关闭该问卷?

    " + + "
    " + + "确  定" + + "取  消" + "
    " + - "
    " + - "
    "); + "
    " + + "
    " + + "
    " + + "
    "); showModal('ajax-modal', '310px'); - $('#ajax-modal').css('height','115px'); + $('#ajax-modal').css('height','120px'); $('#ajax-modal').siblings().remove(); $('#ajax-modal').before("" + ""); diff --git a/app/views/poll/statistics_result.html.erb b/app/views/poll/statistics_result.html.erb index a33daacfb..fd78d9230 100644 --- a/app/views/poll/statistics_result.html.erb +++ b/app/views/poll/statistics_result.html.erb @@ -2,34 +2,43 @@ - <%= l(:label_poll_result) %> + + <%= l(:label_poll_result) %> + <%= stylesheet_link_tag 'polls', :media => 'all' %>
    -

    <%= @poll.polls_name %> <%= l(:label_poll) %>

    +

    + <%= @poll.polls_name %> + <%= l(:label_poll) %> +

    -
    - <% @poll_questions.each do |poll_question| %> -
      -
    1. -
      - 第<%= poll_question.question_number %>题:<%= poll_question.question_title %> [<%= options_show(poll_question.question_type) %>] -
      - <% if poll_question.question_type == 1 || poll_question.question_type == 2 %> - <%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %> - <% else %> - <%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %> - <% end %> -
    2. -
    - <% end %> -
      - <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> -
    -
    -
    +
    + <% @poll_questions.each do |poll_question| %> +
      +
    1. +
      + + 第<%= poll_question.question_number %>题: + + <%= poll_question.question_title %> + + [<%= options_show(poll_question.question_type) %>] + +
      + <% if poll_question.question_type == 1 || poll_question.question_type == 2 %> + <%= render :partial =>'choice_show', :locals =>{ :poll_question => poll_question } %> + <% else %> + <%= render :partial =>'quiz_answers', :locals =>{ :poll_question => poll_question } %> + <% end %> +
    2. +
    + <% end %> +
      + <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> +
    diff --git a/app/views/projects/_join_project.html.erb b/app/views/projects/_join_project.html.erb index c7ce29dae..fdc60904d 100644 --- a/app/views/projects/_join_project.html.erb +++ b/app/views/projects/_join_project.html.erb @@ -1,4 +1,3 @@ - @@ -34,7 +33,7 @@ { hideModal(obj); $("#new-watcher-form").submit(); - alert("申请成功"); +// alert("申请成功"); } function hidden_join_course_form() @@ -60,6 +59,7 @@
    - <%= link_to @contest.name, show_contest_contest_path(@contest) %> + <%= link_to @contest.name, contest_contestnotifications_path(@contest) %>
    <%=link_to @project.watcher_users.count, :controller=>"projects", :action=>"watcherlist", :id => @project %> - <%=link_to "#{@project.issues.count}", project_issues_path(@project) %> + <%=link_to "#{@project.issues.where('status_id in (1,2,4,6)').count}", project_issues_path(@project) %>