correct personal journal language, but now hava no language config

This commit is contained in:
Rueshyna 2013-01-11 16:11:46 +08:00 committed by chris
parent 1b6bfdb80f
commit da283e136b
3 changed files with 52 additions and 50 deletions

View File

@ -1,2 +0,0 @@
class Panel::PersonalJournal::Desktop::JournalListsController < ApplicationController
end

View File

@ -6,23 +6,6 @@
<%= submit_tag "Cancel", :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %>
<% end %>
</div>
<!--<div class="hh2 hp sdm">
<div class="sdm_t hh2">Entry Year</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">2012</a></li>
</ul>
</div>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Language</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">English</a></li>
<li><a class="hp hh2 admtxt" href="">Chinese</a></li>
</ul>
</div>
</div>-->
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Share</div>
<div class="admbg sdm_o">
@ -46,15 +29,28 @@
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row">
<%= f.text_area :paper_title, size: "20x2", placeholder: "Paper Title", class: "s_grid_6 s_grid"%>
<%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_6 s_grid",
size: "20x2",
placeholder: t("personal_journal.paper_title"),
value: (@writing_journal.paper_title_translations[locale] rescue nil) %>
<% end %>
</li>
<li class="s_grid_row">
<%= f.text_field :journal_title, size: "20", placeholder: "Journal Title", class: "s_grid_6 s_grid", "autocomplete-list" => "journal_title_autocomplete_list" %>
<%= f.fields_for :journal_title_translations do |f| %>
<%= f.text_field locale,
size: "20",
placeholder: t("personal_journal.journal_title"),
class: "s_grid_6 s_grid",
"autocomplete-list" => "journal_title_autocomplete_list",
value: (@writing_journal.journal_title_translations[locale] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
</li>
<li class="s_grid_row">
<div class="check_box_g">
<%= label_tag("", "Journal Level") %>
<%= label_tag("", t("personal_journal.level_type")) %>
<ul>
<% @level_types.each_with_index do |level_type, i| %>
<li>
@ -66,23 +62,19 @@
</li>
<% end %>
</ul>
<!--<label for="">Journal Level</label>
<ul>
<li><input type="checkbox"><label for="">SCI</label></li>
</ul>-->
</div>
</li>
<li class="s_grid_row">
<%= label_tag("", "ISSN(ISBN)", class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
<%= label_tag("", t("personal_journal.isbn"), class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", "Volume No.", class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
<%= label_tag("", t("personal_journal.vol_no"), class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", "Issue No.", class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%>
<%= label_tag("", t("personal_journal.issue_no"), class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
@ -90,20 +82,28 @@
</li>
<li class="s_grid_row">
<%= label_tag("", "Pages", class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%>
<%= label_tag("", t("personal_journal.total_pages"), class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%>
</li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row">
<%= f.text_area :authors, size: "20x2", placeholder: "Authors", class: "s_grid_6 s_grid", "autocomplete-list" => "coauthor_autocomplete_list"%>
<%= f.fields_for :authors_translations do |f| %>
<%= f.text_area locale,
class: "s_grid_6 s_grid",
size: "20x2",
placeholder: t("web_resource.authors"),
"autocomplete-list" => "coauthor_autocomplete_list",
value: (@writing_journal.authors_translations[locale] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
</li>
<li class="s_grid_row">
<select name="writing_journal[journal_author_type_ids][]" id="" class="s_grid s_grid_4">
<%= options_for_select(
[t("personal_journal.author_type")] +
@author_types.map do |author_type|
[author_type.title, author_type.id]
end
@ -113,34 +113,32 @@
<select name="writing_journal[journal_paper_type_ids][]" id="" class="s_grid s_grid_2">
<%= options_for_select(
@paper_types.map do |paper_type|
[paper_type.title, paper_type.id]
end
)
%>
[t("personal_journal.level_type")] +
@paper_types.map do |paper_type|
[paper_type.title, paper_type.id]
end
)
%>
</select>
</li>
<li class="s_grid_row">
<%= label_tag("", "Date of Publication", class: "s_grid_3 s_grid") %>
<%= label_tag("", t("personal_journal.publication_date"), class: "s_grid_3 s_grid") %>
<%= f.date_select :publication_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
</li>
<li class="s_grid_row">
<%= f.text_field :keywords, size: "20", value: @writing_journal.keywords ||= "Keywords", class: "s_grid_6 s_grid"%>
<%= f.text_field :keywords, size: "20", placeholder: t("personal_journal.keywords"), class: "s_grid_6 s_grid"%>
</li>
<li class="s_grid_row">
<%= f.label :year ,:class => "s_grid_2 s_grid" %>
<%= f.label :year, t("personal_journal.year"), :class => "s_grid_2 s_grid" %>
<%= select_year((@writing_journal.year ? @writing_journal.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_journal[year]', :class => "s_grid_4 s_grid"} ) %>
</li>
<li class="s_grid_row">
<%= f.label :language ,:class => "s_grid_2 s_grid" %>
<select name="writing_journal[language][]" id="" class="s_grid s_grid_4">
<%= options_for_select(
[["Chinese", "Chinese"],
["English", "English"]]
)
%>
<%= f.label :language, t("personal_journal.language"),:class => "s_grid_2 s_grid" %>
<%= f.select :language,
WritingJournal::LANGUAGE_TYPES,
class: "s_grid s_grid_4" %>
</select>
</li>
@ -214,8 +212,6 @@
orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
</script>
<%= javascript_include_tag "archive_plugin_form" %>
<script>
$('#add_plugin_file a.add').click(function(){
var new_id = $(this).prev().attr('value');

View File

@ -1,11 +1,18 @@
<tr id="<%= "plugin_file_#{form_file.id}" if !form_file.new_record? %>" class="list_item">
<td>
<div>
<%= f.file_field :file, class: "s_grid_2 s_grid" %>
<% if form_file.new_record? %>
<%= f.file_field :file, class: "s_grid_2 s_grid" %>
<% end %>
</div>
</td>
<td>
<%= f.text_field :title, :class=>'s_grid_3 s_grid' %>
<%= f.text_field :title %>
<%= f.fields_for :file_title_translations do |f| %>
<%= f.text_field locale,
class: 's_grid_3 s_grid',
value: (form_file.file_title_translations[locale] rescue nil) %>
<% end %>
</td>
<td>
@ -21,3 +28,4 @@
</span>
</td>
</tr>