Add missing translations in announcement and change announcement behavior for passed and rejected

This commit is contained in:
Christophe Vilayphiou 2012-04-24 15:27:46 +08:00
parent c0abaa643c
commit d247f05d2e
6 changed files with 43 additions and 28 deletions

View File

@ -89,7 +89,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
# GET /bulletins/1/edit # GET /bulletins/1/edit
def edit def edit
@bulletin = Bulletin.find(params[:id]) @bulletin = Bulletin.find(params[:id])
if @bulletin.is_rejected? if !current_user.admin? && (@bulletin.is_rejected? || @bulletin.is_checked?)
redirect_to :action => :index redirect_to :action => :index
else else
# @summary_variable = @bulletin.summary_variable # @summary_variable = @bulletin.summary_variable

View File

@ -14,7 +14,7 @@
<span class="label"><%= t(:pending) %></span> <span class="label"><%= t(:pending) %></span>
<% end %> <% end %>
<% if bulletin.is_checked? %> <% if bulletin.is_checked? %>
<span class="label"><%= t(:checked) %></span> <span class="label"><%= t(:passed) %></span>
<% end %> <% end %>
<% if bulletin.is_rejected? %> <% if bulletin.is_rejected? %>
<span class="label"><%= t(:rejected) %></span> <span class="label"><%= t(:rejected) %></span>
@ -25,7 +25,7 @@
<%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%> <%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%>
<div class="quick-edit"> <div class="quick-edit">
<ul class="nav nav-pills hide"> <ul class="nav nav-pills hide">
<% unless bulletin.is_rejected?%> <% if current_user.admin? || (!bulletin.is_rejected? && !bulletin.is_checked?) %>
<li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li> <li><%= link_to t('bulletin.edit'), edit_panel_announcement_back_end_bulletin_path(bulletin) %></li>
<li class="dropdown"> <li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a> <a href="#" data-toggle="dropdown" class="dropdown-toggle"><%= t(:quick_edit) %><b class="caret"></b></a>

View File

@ -208,7 +208,7 @@
<td style="text-align:center" colspan="4"> <td style="text-align:center" colspan="4">
<div id='add_bulletin_link' class="info_input bulletin_links_block"> <div id='add_bulletin_link' class="info_input bulletin_links_block">
<%= hidden_field_tag 'bulletin_link_field_count', @bulletin.bulletin_links.count %> <%= hidden_field_tag 'bulletin_link_field_count', @bulletin.bulletin_links.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a> <a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
</div> </div>
</td> </td>
</tr> </tr>
@ -253,7 +253,7 @@
<td style="text-align:center" colspan="4"> <td style="text-align:center" colspan="4">
<div id='add_bulletin_file' class="info_input bulletin_files_block"> <div id='add_bulletin_file' class="info_input bulletin_files_block">
<%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %> <%= hidden_field_tag 'bulletin_file_field_count', @bulletin.bulletin_files.count %>
<a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i> ADD/新增</span></a> <a class="add"><span class="btn btn-primary btn-small"><i class="icon-plus icon-white"></i><%= t(:add) %></span></a>
</div> </div>
</td> </td>
</tr> </tr>

View File

@ -4,6 +4,7 @@
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<%= f.file_field :file %> <%= f.file_field :file %>
<%= form_bulletin_file.file.file ? ( link_to t(:view), form_bulletin_file.file.url, {:target => '_blank', :title => t(:view)} ) : '' %>
</div> </div>
</div> </div>
</td> </td>

View File

@ -5,6 +5,12 @@ en:
_locale: English _locale: English
basic: Basic
picture: Piture
tags: Tag
link: Link
file: File
add: Add add: Add
back: Back back: Back
create: Create create: Create
@ -23,6 +29,14 @@ en:
update: Update update: Update
yes_: "Yes" yes_: "Yes"
hot: Hot
top: Top
hidden: Hidden
passed: Passed
pending: Pending
rejected: Rejected
clear: Clear
announcement: announcement:
sure?: Sure? sure?: Sure?
campus_news: Campus News campus_news: Campus News

View File

@ -24,12 +24,12 @@ zh_tw:
update: 更新 update: 更新
yes_: "Yes" yes_: "Yes"
is_hot: 熱門 hot: 熱門
is_top: 置頂 top: 置頂
is_hidden: 隱藏 hidden: 隱藏
is_checked: 通過 passed: 通過
is_pending: 待審核 pending: 待審核
is_rejected: 不通過 rejected: 不通過
clear: 清除 clear: 清除
quick_edit: 快速編輯 quick_edit: 快速編輯