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
def edit
@bulletin = Bulletin.find(params[:id])
if @bulletin.is_rejected?
if !current_user.admin? && (@bulletin.is_rejected? || @bulletin.is_checked?)
redirect_to :action => :index
else
# @summary_variable = @bulletin.summary_variable

View File

@ -14,7 +14,7 @@
<span class="label"><%= t(:pending) %></span>
<% end %>
<% if bulletin.is_checked? %>
<span class="label"><%= t(:checked) %></span>
<span class="label"><%= t(:passed) %></span>
<% end %>
<% if bulletin.is_rejected? %>
<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 ''%>
<div class="quick-edit">
<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 class="dropdown">
<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">
<div id='add_bulletin_link' class="info_input bulletin_links_block">
<%= 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>
</td>
</tr>
@ -253,7 +253,7 @@
<td style="text-align:center" colspan="4">
<div id='add_bulletin_file' class="info_input bulletin_files_block">
<%= 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>
</td>
</tr>

View File

@ -4,6 +4,7 @@
<div class="control-group">
<div class="controls">
<%= 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>
</td>

View File

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

View File

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