From 97adf94e15ad3d714fc1af0a0bea6b0e28083db9 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Fri, 23 Mar 2012 12:00:48 +0800 Subject: [PATCH] fix with what ray needs for the fact_check form --- .../back_end/bulletins/_form.html.erb | 94 +++++++++++++------ 1 file changed, 64 insertions(+), 30 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 983ae5b2..f24ad40b 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -14,11 +14,37 @@ <%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %> <%= f.text_field :not_checked_reason %> - + + <%= f.error_messages %>
- +
+
+ +
+

Audit

+
+ <% if is_manager? || @bulletin.bulletin_category.authed_users('fact_check').include?(current_user) || current_user.admin?%> +
+ <%= 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 -%> +
+ <%= label :is_checked_false, t('announcement.bulletin.fact_check_not_pass_reason') %> + <%= f.text_field :not_checked_reason %> +
+ +
+ <% end %> +
+
@@ -102,24 +128,36 @@
+ +
+ <%= f.label :image, t('announcement.image') %>
+ <%= f.file_field :image %> + <% if @bulletin.image.file %> + <%= check_box_tag 'bulletin[image_del]' %> + <%= t('announcement.刪除已上傳檔案') %> + <% end %> +
<%= f.label :category %> <%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> -
- - English - - - + +
+
+
+ +
+
+
+
+ +
+
+
+
@@ -127,14 +165,14 @@ <%= f.fields_for :title, (@bulletin.new_record? ? @bulletin.build_title : @bulletin.title ) do |f| %> <% @site_valid_locales.each do |locale| %> - <%= I18nVariable.from_locale(locale) %> - <%= f.text_field locale, :class=>'post-title' %> - + <%= I18nVariable.from_locale(locale) %> + <%= f.text_field locale, :class=>'post-title' %> + <% end %> <% end %> -
+
-
+
<%= f.label :subtitle %> <%= f.fields_for :subtitle, (@bulletin.new_record? ? @bulletin.build_subtitle : @bulletin.subtitle ) do |f| %> <% @site_valid_locales.each do |locale| %> @@ -146,7 +184,7 @@ <% end %>
-
+
<%= f.label :text %> <%= f.fields_for :text, (@bulletin.new_record? ? @bulletin.build_text : @bulletin.text ) do |f| %> <% @site_valid_locales.each do |locale| %> @@ -158,7 +196,6 @@ <% end %>
-
-
- - -
@@ -257,10 +291,10 @@
-
- +
- +
+
<%= f.submit t('submit'), :class=>'btn btn-primary' %> <%= link_to t('cancel'), get_go_back, :class=>"btn" %>