Move the audit block to the bottom

This commit is contained in:
Christophe Vilayphiou 2012-04-05 14:08:03 +08:00
parent 1b79400f44
commit 7bf50d6c52
1 changed files with 32 additions and 42 deletions

View File

@ -4,38 +4,6 @@
<%= f.error_messages %> <%= f.error_messages %>
<div id="sub-wiget"> <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? %>
<div class="controls">
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
<%= content_tag :label,:class => "radio inline" do -%>
<%= f.radio_button :is_checked, true , {:class => 'privacy'} %>
<%= t('announcement.bulletin.fact_check_pass') %>
<% end -%>
<%= content_tag :label,:class => "radio inline" do -%>
<%= f.radio_button :is_checked, false, (@bulletin.is_checked.nil?? {:checked => true, :class => 'privacy'} : {})%>
<%= t('announcement.bulletin.fact_check_not_pass') %>
<% end -%>
<div class="select-role">
<%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %>
<%= f.text_field :not_checked_reason %>
</div>
</div>
<% end %>
</div>
</div>
<% elsif current_user.admin? %>
<%= f.hidden_field :is_checked,:value => true%>
<% end %>
<div id="widget-picture" class="widget-box widget-size-300"> <div id="widget-picture" class="widget-box widget-size-300">
<div class="widget-action clear"> <div class="widget-action clear">
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a> <a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
@ -121,7 +89,38 @@
<% end %> <% end %>
</div> </div>
</div> </div>
<% 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? %>
<div class="controls">
<%= f.label :fact_check_stat, t('announcement.bulletin.fact_check_stat') %>
<%= content_tag :label,:class => "radio inline" do -%>
<%= f.radio_button :is_checked, true , {:class => 'privacy'} %>
<%= t('announcement.bulletin.fact_check_pass') %>
<% end -%>
<%= content_tag :label,:class => "radio inline" do -%>
<%= f.radio_button :is_checked, false, (@bulletin.is_checked.nil?? {:checked => true, :class => 'privacy'} : {})%>
<%= t('announcement.bulletin.fact_check_not_pass') %>
<% end -%>
<div class="select-role">
<%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %>
<%= f.text_field :not_checked_reason %>
</div>
</div>
<% end %>
</div>
</div>
<% elsif current_user.admin? %>
<%= f.hidden_field :is_checked,:value => true%>
<% end %>
</div> </div>
@ -130,15 +129,6 @@
<div id="post-body"> <div id="post-body">
<div id="post-body-content" class="clear"> <div id="post-body-content" class="clear">
<div class="field">
<%= f.label :image, t('announcement.image') %><br />
<%= f.file_field :image %>
<% if @bulletin.image.file %>
<%= check_box_tag 'bulletin[image_del]' %>
<%= t('announcement.刪除已上傳檔案') %>
<% end %>
</div>
<%= f.label :category %> <%= f.label :category %>
<%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> <%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %>