Ray's changes in announcenment back-end

This commit is contained in:
Christophe Vilayphiou authored and Christophe Vilayphiou committed 2012-03-27 18:58:03 +08:00
1 parent 97adf94e15
commit 55d12e50f2
14 files changed
+150 -44

No files matched your search

@@ -10,7 +10,10 @@
<% if bulletin.is_hidden? %>
<span class="label"><%= t(:hidden) %></span>
<% end %>
</td>
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
<td>
<%= 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_check_rejected?%>
@@ -34,16 +37,17 @@
<li class="dropdown"><%= link_to t('bulletin.delete'), panel_announcement_back_end_bulletin_path(bulletin), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
</ul>
</div>
</td>
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
<td><%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%></td>
<td><%= bulletin.postdate %></td>
<td><%= (bulletin.deadline) ? bulletin.deadline : t('bulletin.no_deadline') %></td>
<td>
<% bulletin.sorted_tags.each do |tag| %>
<span class="label label-tags"><%= tag[I18n.locale] %></span>
<% end %>
<div class="label-group">
<div class="label-td">
<% bulletin.sorted_tags.each do |tag| %>
<span class="label label-tags"><%= tag[I18n.locale] %></span>
<% end %>
</div>
</div>
</td>
<td><%= User.from_id(bulletin.update_user_id).name rescue ''%></td>
</tr>
@@ -1,4 +1,4 @@
<thead>
<!--<thead>
<tr class="sort-header">
<th class="span1 strong">
<input type="checkbox">
@@ -33,6 +33,18 @@
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
</th>
</tr>
</thead>-->
<thead>
<tr>
<th class="span1"></th>
<th class="span1-2"></th>
<th class="span1-2"></th>
<th class="span7"></th>
<th class="span1-2"></th>
<th class="span1-2"></th>
<th class="span1-2"></th>
<th class="span1-2"></th>
</tr>
</thead>
<tbody class="sort-holder">
<%= render :partial => 'bulletin', :collection => @bulletins %>
@@ -53,5 +53,45 @@
<a href="#" class="btn"><i class="icons-brush-large"></i>Clear/重置</a>
</div>
</div>
<div class="table-label">
<table class="table main-list">
<thead>
<tr class="sort-header">
<th class="span1 strong">
<input type="checkbox">
<a href class="list-remove"><i class="icon-trash"></i></a>
</th>
<th class="sort span1-2 <%= is_sort_active?('status') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('status')) %>">
<%= t('bulletin.status') %>
<%= content_tag(:b, nil, :class => is_sort?('status')) %>
</th>
<th class="sort span1-2 <%= is_sort_active?('category') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('category')) %>">
<%= t('bulletin.category') %>
<%= content_tag(:b, nil, :class => is_sort?('category')) %>
</th>
<th class="sort span7 <%= is_sort_active?('title') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('title')) %>">
<%= t('bulletin.title') %>
<%= content_tag(:b, nil, :class => is_sort?('title')) %>
</th>
<th class="sort span1-2 <%= is_sort_active?('postdate') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('postdate')) %>">
<%= t('bulletin.start_date') %>
<%= content_tag(:b, nil, :class => is_sort?('postdate')) %>
</th>
<th class="sort span1-2 <%= is_sort_active?('deadline') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('deadline')) %>">
<%= t('bulletin.end_date') %>
<%= content_tag(:b, nil, :class => is_sort?('deadline')) %>
</th>
<th class="sort span1-2 <%= is_sort_active?('tags') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('tags')) %>">
<%= t('bulletin.tags') %>
<%= content_tag(:b, nil, :class => is_sort?('tags')) %>
</th>
<th class="sort span1-2 <%= is_sort_active?('update_user_id') %>" rel="<%= panel_announcement_back_end_bulletins_path(sortable('update_user_id')) %>">
<%= t('bulletin.last_modified') %>
<%= content_tag(:b, nil, :class => is_sort?('update_user_id')) %>
</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
@@ -19,13 +19,16 @@
<%= f.error_messages %>
<div id="sub-wiget">
<% if params[:action] != 'new' %>
<div id="widget-audit" class="widget-box">
<div class="widget-action clear">
<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-link icons-white"></i>Audit</h3>
<div class="widget-content">
<% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin?%>
<% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin? %>
<div class="controls">
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
<%= content_tag :label,:class => "radio inline" do -%>
@@ -45,6 +48,7 @@
<% end %>
</div>
</div>
<% end %>
<div id="widget-picture" class="widget-box widget-size-300">
<div class="widget-action clear">
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
@@ -100,9 +104,18 @@
<h3 class="widget-title"><i class="icons-star-thin icons-white"></i>Status</h3>
<div class="widget-content clear">
<div class="controls">
<%= f.check_box :is_top %><%= t('top') %>
<%= f.check_box :is_hot %><%= t('hot') %>
<%= f.check_box :is_hidden %><%= t('hide') %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= f.check_box :is_top %>
<%= t('top') %>
<% end -%>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= f.check_box :is_hot %>
<%= t('hot') %>
<% end -%>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= f.check_box :is_hidden %>
<%= t('hide') %>
<% end -%>
</div>
</div>
</div>
@@ -114,8 +127,10 @@
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<%= content_tag :label,:class => "checkbox inline" do -%>
<%= check_box_tag 'bulletin[tag_ids][]', tag.id, @bulletin.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<% end %>
<% end %>
</div>
</div>
@@ -1,7 +1,10 @@
<h1><%= t('announcement.editing_announcement') %></h1>
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%#= link_back %>
<ul class="breadcrumb">
<li><span>Home</span><span class="divider">/</span></li>
<li><span>Library</span><span class="divider">/</span></li>
<li class="text-blue"><%= t('announcement.editing_announcement') %></li>
</ul>
<div id="poststuff">
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
</div>
@@ -1,5 +1,5 @@
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path, :html => {:class => 'clear'} do |f| %>
<div id="poststuff">
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletins_path do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%#= link_back %>
</div>