From 6d159a3a9ef9b6484b15bc28f29541f80ad6545f Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 28 Nov 2012 18:12:37 +0800 Subject: [PATCH] add templete --- .../desktop/journal_pages/_form_file.html.erb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 app/views/desktop/journal_pages/_form_file.html.erb diff --git a/app/views/desktop/journal_pages/_form_file.html.erb b/app/views/desktop/journal_pages/_form_file.html.erb new file mode 100644 index 00000000..b034589a --- /dev/null +++ b/app/views/desktop/journal_pages/_form_file.html.erb @@ -0,0 +1,41 @@ + +" class='list_item'> + +
+
+ <%= f.file_field :file %> + <%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn', :target => '_blank', :title => t(:view)} ) : '' %> +
+
+ + + +
+ <% @site_valid_locales.each_with_index do |locale, i| %> +
"> + <%= f.fields_for :file_title_translations do |f| %> +
+ +
+ <%= f.text_field locale, :class=>'post-file_title', :value => (form_file.file_title_translations[locale] rescue nil) %> +
+
+ <% end %> +
+ <% end %> +
+ + + + + <% if form_file.new_record? %> + + <% else %> + <%= f.hidden_field :id %> + + <%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %> + <% end %> + + + +