为竞赛通知评论添加登录权限

This commit is contained in:
wanglinchun 2014-06-12 11:11:12 +08:00
parent 60bdff86a1
commit d76eec27cc
4 changed files with 20 additions and 3 deletions

View File

@ -2,10 +2,19 @@
<%= l(:label_notification) %> <%= l(:label_notification) %>
</span> </span>
<% if User.current.logged? %>
<%= link_to(l(:bale_news_notice), <%= link_to(l(:bale_news_notice),
new_contest_contestnotification_path(@contest), new_contest_contestnotification_path(@contest),
:class => 'icon icon-add', :class => 'icon icon-add',
:onclick => 'showAndScrollTo("add-contestnotifications", "contestnotifications_title"); return false;') %> :onclick => 'showAndScrollTo("add-contestnotifications", "contestnotifications_title"); return false;') %>
<% else %>
<%= l(:label_user_login_attending_contest) %>
<%= link_to l(:label_user_login_new), signin_path %>
<% end %>
<% if @contest && User.current.allowed_to?(:manage_contestnotifications, @contest) %> <% if @contest && User.current.allowed_to?(:manage_contestnotifications, @contest) %>
<div id="add-contestnotifications" class="add_frame" style="display:none;"> <div id="add-contestnotifications" class="add_frame" style="display:none;">

View File

@ -31,9 +31,15 @@
<br/> <br/>
<!--add comment--> <!--add comment-->
<% if User.current.logged? %>
<p> <p>
<%= toggle_link l(:label_comment_add), "add_notificationcomment_form", :focus => "notificationcomment_notificationcomments" %> <%= toggle_link l(:label_comment_add), "add_notificationcomment_form", :focus => "notificationcomment_notificationcomments" %>
</p> </p>
<% else %>
<%= l(:label_user_login_notificationcomment) %>
<%= link_to l(:label_user_login_new), signin_path %>
<% end %>
<%= form_tag( contest_contestnotification_notificationcomments_path(@contest, @contestnotification) , :id => "add_notificationcomment_form", :style => "display:none;") do %> <%= form_tag( contest_contestnotification_notificationcomments_path(@contest, @contestnotification) , :id => "add_notificationcomment_form", :style => "display:none;") do %>
<div class="box"> <div class="box">
<%= text_area 'notificationcomment', 'notificationcomments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> <%= text_area 'notificationcomment', 'notificationcomments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>

View File

@ -1734,6 +1734,7 @@ en:
label_contest_innovate_community: Competition community label_contest_innovate_community: Competition community
label_user_login_score_and_comment: You are not logged in, please log in and then score and comment the work! label_user_login_score_and_comment: You are not logged in, please log in and then score and comment the work!
label_user_login_notificationcomment: You are not logged in, please log in and then comment the notification!
label_contest_work_list: Competition work list label_contest_work_list: Competition work list

View File

@ -563,6 +563,7 @@ zh:
label_user_login_project_board: 您还没有登录,请登录后参与项目讨论 label_user_login_project_board: 您还没有登录,请登录后参与项目讨论
label_user_login_attending_contest: 您还没有登录,请登录后参赛 label_user_login_attending_contest: 您还没有登录,请登录后参赛
label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价 label_user_login_score_and_comment: 您还没有登录,请登录后对作品进行打分评价
label_user_login_notificationcomment: 您还没有登录,请登录后参加评论
#end #end
#by huang # modified by bai #by huang # modified by bai
label_college: 高校进入 label_college: 高校进入