diff --git a/app/controllers/poll_controller.rb b/app/controllers/poll_controller.rb index 6890b8dd7..42ab98e10 100644 --- a/app/controllers/poll_controller.rb +++ b/app/controllers/poll_controller.rb @@ -40,7 +40,7 @@ class PollController < ApplicationController def new if @course option = { - :polls_name => l(:label_poll_new), + :polls_name => "", :polls_type => @course.class.to_s, :polls_group_id => @course.id, :polls_status => 1, @@ -187,7 +187,13 @@ class PollController < ApplicationController @poll.polls_status = 2 @poll.published_at = Time.now if @poll.save - redirect_to poll_index_url(:polls_type => "Course", :polls_group_id => @course.id) + if params[:is_remote] + redirect_to poll_index_url(:polls_type => "Course", :polls_group_id => @course.id) + else + respond_to do |format| + format.js + end + end end end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index d3df57982..24a3ff19f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -558,6 +558,11 @@ class ProjectsController < ApplicationController # Show @project def show + if(@project && !@project.is_public && !User.current.member_of?(@project)) + render_403 + return + end + @project_type = params[:project_type] # try to redirect to the requested menu item diff --git a/app/views/courses/member.html.erb b/app/views/courses/member.html.erb index 2599760ad..803be3731 100644 --- a/app/views/courses/member.html.erb +++ b/app/views/courses/member.html.erb @@ -56,7 +56,7 @@ <%= stylesheet_link_tag 'course_group', :media => 'all' %> -
+
-
diff --git a/app/views/poll/_show_head.html.erb b/app/views/poll/_show_head.html.erb index ce74dc10a..7ab16b24d 100644 --- a/app/views/poll/_show_head.html.erb +++ b/app/views/poll/_show_head.html.erb @@ -1,7 +1,7 @@

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

<%= @poll.polls_description%> diff --git a/app/views/poll/index.html.erb b/app/views/poll/index.html.erb index 043e6898b..de30b5deb 100644 --- a/app/views/poll/index.html.erb +++ b/app/views/poll/index.html.erb @@ -25,6 +25,30 @@ } function clickCanel(){hideModal("#popbox02");} + + function poll_submit(poll_id) + { + $('#ajax-modal').html("

" + + "
" + + "
" + + "

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

" + + "
" + + "确  定" + + "取  消" + + "
" + + "
" + + "
" + + "
" + + "
"); + showModal('ajax-modal', '310px'); + $('#ajax-modal').css('height','110px'); + $('#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/publish_poll.js.erb b/app/views/poll/publish_poll.js.erb new file mode 100644 index 000000000..ad052f8f2 --- /dev/null +++ b/app/views/poll/publish_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/republish_poll.js.erb b/app/views/poll/republish_poll.js.erb index a7399af5b..a2d8e28fa 100644 --- a/app/views/poll/republish_poll.js.erb +++ b/app/views/poll/republish_poll.js.erb @@ -1 +1,2 @@ -$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); \ No newline at end of file +$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>"); +alert("取消成功"); \ No newline at end of file diff --git a/app/views/users/_mail_notifications.html.erb b/app/views/users/_mail_notifications.html.erb index a8d3edc55..7dd4ad77f 100644 --- a/app/views/users/_mail_notifications.html.erb +++ b/app/views/users/_mail_notifications.html.erb @@ -1,5 +1,5 @@

-<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted_bak" %> +<%= label_tag "user_mail_notification", l(:description_user_mail_notification), :class => "hidden-for-sighted_bak" , :style=> 'margin-right: 5px;'%> <%= select_tag( 'user[mail_notification]', options_for_select( diff --git a/config/locales/en.yml b/config/locales/en.yml index ab248a062..a7d98a21c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -235,7 +235,21 @@ en: mail_body_wiki_content_added: "The '%{id}' wiki page has been added by %{author}." mail_subject_wiki_content_updated: "'%{id}' wiki page has been updated" mail_body_wiki_content_updated: "The '%{id}' wiki page has been updated by %{author}." - + + # edit by meng + # emailer + mail_issue_greetings: "Dear user , Greetings from Trustie" + mail_issue_footer: "Unsubscribe this message?" + mail_issue_title_userin: "in" + mail_issue_title_active: "has a new activity which relevants to you , please pay more attention to this!" + mail_issue_subject: "Title:" + mail_issue_content: "Content:" + mail_issue_sent_from: "From:" + mail_issue_from_project: "project issue" + mail_issue_attachments: "Attachments:" + mail_issue_reply: "Want reply" + #end + field_name: Name field_description: Description field_summary: Summary diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 815dd6fa1..33dde7276 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -250,6 +250,21 @@ zh: mail_body_wiki_content_added: "'%{id}' wiki页面已由 %{author} 添加。" mail_subject_wiki_content_updated: "'%{id}' wiki页面已更新。" mail_body_wiki_content_updated: "'%{id}' wiki页面已由 %{author} 更新。" + + # edit by meng + # emailer + mail_issue_greetings: "亲爱的Trustie用户,您好!" + mail_issue_footer: "退订该邮件!" + mail_issue_title_userin: "在" + mail_issue_title_active: "中有了一个与您相关的最新活动,请您关注!" + mail_issue_subject: "标题:" + mail_issue_content: "内容:" + mail_issue_sent_from: "来源:" + mail_issue_from_project: "项目问题跟踪" + mail_issue_attachments: "附件:" + mail_issue_reply: "我要回复" + #end + field_name: 名称 #added by huang field_tea_name: 教师 diff --git a/public/stylesheets/course_group.css b/public/stylesheets/course_group.css index b6c7f4f8c..c160e1730 100644 --- a/public/stylesheets/course_group.css +++ b/public/stylesheets/course_group.css @@ -1,4 +1,4 @@ -body{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;} +#member_of_course{ font-size:12px; font-family:"微软雅黑","宋体"; line-height:1.9; background:#fff; font-style:normal;} div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span,textarea,form{ margin:0; padding:0;} div,img,tr,td,textarea,form{ border:0;} table,tr,td{border:0; cellspacing:0; cellpadding:0;} diff --git a/public/stylesheets/images/icons.png b/public/stylesheets/images/icons.png index 2d2b33fe1..e0ba4f4e6 100644 Binary files a/public/stylesheets/images/icons.png and b/public/stylesheets/images/icons.png differ diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css index 4141164c4..e601d231d 100644 --- a/public/stylesheets/polls.css +++ b/public/stylesheets/polls.css @@ -19,15 +19,15 @@ div,html,img,ul,li,p,body,h1,h2,h3,h4,p,a,table,tr,td,fieldset,input,span{ margi .polls_btn span{ color:#15bed1; font-size:12px; font-weight:normal;} /*问卷列表*/ -.polls_content{ width:615px;} +.polls_content{ width:615px;padding-left: 6px;} .polls_head{ width:677px; height:48px; background:#eaeaea;} .polls_head h2{ float:left; font-size:14px; color:#585858; margin:11px 0 0 10px;} .polls_head span{ font-weight:normal; color:#15bccf;} a.newbtn{ float:right; display:block; width:80px; height:30px; background:#64bdd9; color:#fff; font-size:14px; margin:10px; text-align:center;} a:hover.newbtn{ background:#55a1b9; text-decoration:none;} .polls_list ul{ padding-left:10px; border-bottom:1px dashed #c9c9c9; height:32px; padding-top:8px;} -a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 350px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} -.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 350px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} +a.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} +.polls_title{ font-weight:bold; color:#3e6d8e;max-width: 300px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;} a.pollsbtn{ display:block; width:66px; height:22px; text-align:center; border:1px solid #64bdd9; color:#64bdd9;} a:hover.pollsbtn{ background:#64bdd9; color:#fff; text-decoration:none;} .polls_date{ color:#666666;} @@ -134,3 +134,14 @@ a:hover.upload_btn_grey{background:#8a8a8a;} .upload_con a:hover{ text-decoration:none;} .polls_btn_box{ width:145px; margin:0 auto; padding-left:10px;} .polls_btn_box02{ width:80px; margin:0 auto; padding-left:10px;} + +/***新增20150120***/ +.pollsbtn_tip{ width:30px; height:17px; display:block;background:url(images/icons.png) 0 -372px no-repeat;padding-left:7px; color:#fff;} +a.btn_de{ border:1px solid #ff5d31; color:#ff5d31; } +a:hover.btn_de{ background:#ff5d31;} +a.btn_pu{ border:1px solid #3cb761; color:#3cb761; } +a:hover.btn_pu{ background:#3cb761;} +.pollsbtn_grey{ border:1px solid #b1b1b1; color:#b1b1b1; padding:0px 9px; } +.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;} +.polls_de_grey{ color:#b1b1b1;} +.ml5{ margin-left:5px;}