优化view层代码

This commit is contained in:
sw 2014-09-16 14:23:13 +08:00
parent e9a72b56cb
commit 5ac7304858
1 changed files with 0 additions and 5 deletions

View File

@ -1,16 +1,12 @@
<span style="font-size: 16px; border-bottom:1px solid #f0f0f0; margin-right: 15px;"> <span style="font-size: 16px; border-bottom:1px solid #f0f0f0; margin-right: 15px;">
<%= l(:label_notification) %> <%= l(:label_notification) %>
</span> </span>
<% if User.current.logged? && (User.current.admin? ||User.current == @contest.author) %> <% if User.current.logged? && (User.current.admin? ||User.current == @contest.author) %>
<%= 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;') %>
<% end %> <% end %>
<% if @contest %> <% if @contest %>
<div id="add-contestnotifications" class="add_frame" style="display:none;"> <div id="add-contestnotifications" class="add_frame" style="display:none;">
<%= labelled_form_for @contestnotification, :url => contest_contestnotifications_path(@contest), <%= labelled_form_for @contestnotification, :url => contest_contestnotifications_path(@contest),
@ -31,7 +27,6 @@
</p> </p>
<% else %> <% else %>
<% @contestnotificationss.each do |contestnotifications| %> <% @contestnotificationss.each do |contestnotifications| %>
<table class="content-text-list"> <table class="content-text-list">
<tr> <tr>
<td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(contestnotifications.author), :class => "avatar"), user_path(contestnotifications.author) %></td> <td colspan="2" valign="top" width="50"><%= link_to image_tag(url_to_avatar(contestnotifications.author), :class => "avatar"), user_path(contestnotifications.author) %></td>