change template

This commit is contained in:
Rueshyna 2012-11-28 23:43:39 +08:00
parent 7853aec886
commit 6ed1dd0cc6
2 changed files with 26 additions and 28 deletions

View File

@ -14,7 +14,7 @@
<div class="s_menu sm_v" content-type="menu"> <div class="s_menu sm_v" content-type="menu">
<ul id='setting_left_nav'> <ul id='setting_left_nav'>
<li><a href="<%= desktop_journal_pages_path %>" callback-method="list" load="true" class="hh2 w2 hp thmc1 thmtxt xx" onclick='return false;'>List</a></li> <li><a href="<%= desktop_journal_pages_path %>" callback-method="list" load="true" class="hh2 w2 hp thmc1 thmtxt xx" onclick='return false;'>List</a></li>
<li><a href="<%= new_desktop_journal_page_path %>" callback-method="addpaper" custom-load="addpaper" class="admtxt hh2 w2 hp xx" onclick='return false;'>Add/Edit</a></li> <li><a href="<%= new_desktop_journal_page_path %>" custom-load="addpaper" callback-method="addpaper" custom-load="addpaper" class="admtxt hh2 w2 hp xx" onclick='return false;'>Add/Edit</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Journals</a></li>
<li><a href="<%= new_desktop_co_author_path %>" class="admtxt hh2 w2 hp" callback-method="coauthor" onclick='return false;'>Co-Authors</a></li> <li><a href="<%= new_desktop_co_author_path %>" class="admtxt hh2 w2 hp" callback-method="coauthor" onclick='return false;'>Co-Authors</a></li>
<li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li> <li><a href="" class="admtxt hh2 w2 hp" onclick='return false;'>Tags &amp; Keywords</a></li>

View File

@ -1,10 +1,9 @@
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class='list_item'> <tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class='list_item'>
<td> <td>
<div class="control-group"> <div class="control-group">
<div class="controls"> <div class="controls">
<%= f.file_field :file %> <%= f.file_field :file, class: "s_grid_1 s_grid" %>
<%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn', :target => '_blank', :title => t(:view)} ) : '' %> <%= form_file.file.file ? ( link_to t(:view), form_file.file.url, {:class => 'btn s_grid_1 s_grid', :target => '_blank', :title => t(:view)} ) : '' %>
</div> </div>
</div> </div>
</td> </td>
@ -13,29 +12,28 @@
<div class="tab-content"> <div class="tab-content">
<% @site_valid_locales.each_with_index do |locale, i| %> <% @site_valid_locales.each_with_index do |locale, i| %>
<div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>"> <div class="<%= locale %> fade tab-pane <%= ( i == 0 ) ? "in active" : '' %>">
<%= f.fields_for :file_title_translations do |f| %> <%= f.fields_for :file_title_translations do |f| %>
<div class="control-group"> <div class="control-group">
<label for="link-<%= locale %>" class="control-label"><%= I18nVariable.from_locale(locale) %></label> <label for="link-<%= locale %>" class="control-label"><%= I18nVariable.from_locale(locale) %></label>
<div class="controls"> <div class="controls">
<%= f.text_field locale, :class=>'post-file_title', :value => (form_file.file_title_translations[locale] rescue nil) %> <%= f.text_field locale, :class=>'s_grid_1 s_grid', :value => (form_file.file_title_translations[locale] rescue nil) %>
</div>
</div> </div>
<% end %> </div>
</div> <% end %>
<% end %> </div>
</div> <% end %>
</td> </div>
</td>
<td>
<span class="action">
<% if form_file.new_record? %>
<a class="delete"><i class="icon-remove"></i></a>
<% else %>
<%= f.hidden_field :id %>
<a class="remove_existing_record"><i class="icon-remove"></i></a>
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>
</span>
</td>
</tr>
<td>
<span class="action">
<% if form_file.new_record? %>
<a class="delete"><i class="icon-remove"></i></a>
<% else %>
<%= f.hidden_field :id %>
<a class="remove_existing_record"><i class="icon-remove"></i></a>
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
<% end %>
</span>
</td>
</tr>