<%= link_to(l(:button_edit), edit_contest_contestnotification_path(@contest, @contestnotification), :class => 'icon icon-edit', :accesskey => accesskey(:edit), :onclick => '$("#edit-contestnotifications").show(); return true;') if (User.current.admin? && User.current.logged? )||(User.current == @contest.author && User.current.logged?)%> <%= delete_link contest_contestnotification_path(@contest, @contestnotification) if (User.current.admin? && User.current.logged? )||(User.current == @contest.author && User.current.logged?) %>

<%=h @contestnotification.title %>

<%= textilizable(@contestnotification, :description) %>
<%#= link_to_attachments @contestnotification %>
<% if User.current.logged? %>

<%= toggle_link l(:label_comment_add), "add_notificationcomment_form", :focus => "notificationcomment_notificationcomments" %>

<% 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 %>
<%= text_area 'notificationcomment', 'notificationcomments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> <%= wikitoolbar_for 'notificationcomment_notificationcomments' %>

<%= submit_tag l(:button_add) %> <%= submit_tag l(:button_cancel), :onclick => "cancel();" %>

<% end %> <% html_title @contestnotification.title -%> <% content_for :header_tags do %> <%= stylesheet_link_tag 'scm' %> <% end %>

<%= l(:label_comment_plural) %>

<% notificationcomments = @notificationcomments.reverse %> <% notificationcomments.each do |notificationcomment| %> <% next if notificationcomment.new_record? %>
<%= image_tag(url_to_avatar(notificationcomment.author), :class => "avatar")%>
<%= link_to_user(notificationcomment.author) if notificationcomment.respond_to?(:author) %> <%= l(:label_project_newadd) %> <%= l(:label_comment_plural) %> <% if notificationcomment.author==User.current|| User.current.admin? %> <%= link_to(l(:label_bid_respond_delete), contest_contestnotification_notificationcomment_path(@contest, @contestnotification,notificationcomment), :method => :delete,:confirm => l(:text_are_you_sure), :title => l(:button_delete)) %> <% end %>

<%= textilizable(notificationcomment.notificationcomments) %>

<%= format_time(notificationcomment.created_at) %> <%#= link_to_if_authorized_contest image_tag('delete.png'), {:controller => 'notificationcomments', :action => 'destroy', :id => @contestnotifications, :notificationcomment_id => notificationcomment}, :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
<% end if @notificationcomments.any? %>