221 lines
9.6 KiB
Plaintext
221 lines
9.6 KiB
Plaintext
<div class="toolbar hh2">
|
|
<div class="fn_g hp">
|
|
<%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %>
|
|
<!-- class: bt-cancle can't be remove -->
|
|
<% if not @writing_conference.new_record? %>
|
|
<%= submit_tag t("cancel"), :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %>
|
|
<% end %>
|
|
</div>
|
|
<div class="hh2 hp sdm">
|
|
<div class="sdm_t hh2">Share</div>
|
|
<div class="admbg sdm_o">
|
|
<ul>
|
|
<li><a class="hp hh2 admtxt" href="">Full</a></li>
|
|
<li><a class="hp hh2 admtxt" href="">Abstract</a></li>
|
|
<li><a class="hp hh2 admtxt" href="">Friends</a></li>
|
|
<li><a class="hp hh2 admtxt" href="">Private</a></li>
|
|
<li><a class="hp hh2 admtxt" href="">Group</a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="hh2 hp sdm">
|
|
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div>
|
|
</div>
|
|
</div>
|
|
<div id="paper_add" class="tinycanvas vp">
|
|
<div class="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
|
|
<div class="viewport">
|
|
<div class="overview">
|
|
<div class="s_grid_con s_form">
|
|
<ul>
|
|
<li class="s_grid_row">
|
|
<%= f.fields_for :paper_title_translations do |f| %>
|
|
<%= f.text_area locale,
|
|
class: "s_grid_6 s_grid",
|
|
size: "20x2",
|
|
placeholder: t("personal_conference.paper_title"),
|
|
value: (@writing_conference.paper_title_translations[locale.to_s] rescue nil) %>
|
|
<% end %>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= f.fields_for :conference_title_translations do |f| %>
|
|
<%= f.text_field locale,
|
|
size: "20",
|
|
placeholder: t("personal_conference.conference_title"),
|
|
class: "s_grid_6 s_grid",
|
|
# "autocomplete-list" => "conference_title_autocomplete_list",
|
|
value: (@writing_conference.conference_title_translations[locale.to_s] rescue nil) %>
|
|
<% end %>
|
|
<span class="icon-plus input_append"></span>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<div>
|
|
<%= label_tag("", t("personal_conference.paper_type")) %>
|
|
<ul>
|
|
<% @paper_types.each_with_index do |paper_type, i| %>
|
|
<li class="s_grid_row">
|
|
<%= radio_button_tag "writing_conference[conference_paper_type_ids][]",
|
|
paper_type.id,
|
|
@writing_conference.conference_paper_type_ids.include?(paper_type.id),
|
|
id: "field-#{i}"
|
|
%><%= label_tag("field-#{i}", paper_type.title) %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= f.text_field :keywords, size: "20", placeholder: t("personal_conference.keywords"), class: "s_grid_6 s_grid"%>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<div>
|
|
<%= label_tag("", t("personal_conference.conference_time")) %>
|
|
<ul>
|
|
<li class="s_grid_row">
|
|
<%= label_tag("", t("personal_conference.period_start_date"), class: "s_grid_1 s_grid") %>
|
|
<%= f.date_select :period_start_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">
|
|
<%= label_tag("", t("personal_conference.period_end_date"), class: "s_grid_1 s_grid") %>
|
|
<%= f.date_select :period_end_date, {:use_month_numbers => true, :start_year => Time.now.year, :end_year => 1930, :order => [:year, :month, :day] }, {:class => 's_grid_1 s_grid'} %>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= label_tag("", t("personal_conference.sponsor"), class: "s_grid_2 s_grid") %><%= f.text_field :sponsor, size: "20", placeholder: "Sponsor", class: "s_grid_4 s_grid"%>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= label_tag("", t("personal_conference.location"), class: "s_grid_2 s_grid") %><%= f.text_field :location, size: "20", placeholder: "Location", class: "s_grid_4 s_grid"%>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= label_tag("", t("personal_conference.url"), class: "s_grid_2 s_grid") %><%= f.text_field :url, size: "20", placeholder: "www.sample.com", class: "s_grid_4 s_grid"%>
|
|
</li>
|
|
|
|
</div>
|
|
<div class="s_grid_con s_form">
|
|
<ul>
|
|
<li class="s_grid_row">
|
|
<%= f.fields_for :authors_translations do |f| %>
|
|
<%= f.text_area locale,
|
|
class: "s_grid_6 s_grid",
|
|
size: "20x2",
|
|
placeholder: t("personal_conference.authors"),
|
|
# "autocomplete-list" => "coauthor_autocomplete_list",
|
|
value: (@writing_conference.authors_translations[locale.to_s] rescue nil) %>
|
|
<% end %>
|
|
<span class="icon-plus input_append"></span>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<select name="writing_conference[conference_author_type_ids][]" id="" class="s_grid s_grid_6">
|
|
<%= options_for_select(
|
|
[t("personal_conference.author_type")] +
|
|
@author_types.map do |author_type|
|
|
[author_type.title, author_type.id]
|
|
end
|
|
)
|
|
%>
|
|
</select>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<select name="" id="" class="s_grid s_grid_6">
|
|
<option value="">Status</option>
|
|
<option value="">Published</option>
|
|
<option value="">Pending</option>
|
|
<option value="">Writing</option>
|
|
</select>
|
|
</li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= label_tag("", t("personal_conference.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.label :year, t("personal_conference.year"), :class => "s_grid_2 s_grid" %>
|
|
<%= select_year((@writing_conference.year ? @writing_conference.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_conference[year]', :class => "s_grid_4 s_grid"} ) %>
|
|
</li>
|
|
|
|
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" placeholder=<%= t("personal_conference.tags") %>><span class="icon-plus input_append"></li>
|
|
|
|
<li class="s_grid_row">
|
|
<%= f.text_area :abstract, size: "20x22", placeholder: t("personal_conference.abstract"), class: "s_grid_6 s_grid full_height"%>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="s_grid_con s_form">
|
|
<ul>
|
|
<li class="s_grid_row">
|
|
<table class="s_table">
|
|
<thead>
|
|
<tr>
|
|
<th class="s_grid_2"><%= t("personal_conference.file")%></th>
|
|
<th class="s_grid_3"><%= t("personal_conference.file_name")%></th>
|
|
<th class="s_grid_1"><%= t("personal_conference.description") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="3">
|
|
<div id='add_plugin_file' class="info_input plugin_files_block s_action">
|
|
<%= hidden_field_tag 'plugin_file_field_count', @writing_conference.writing_conference_files.count %>
|
|
<a class="add setting_btn thmc1 thmtxt w1 hh2 hp" href=""><i class="icon-plus icon-white"></i> add</a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
<tbody>
|
|
<% @writing_conference.writing_conference_files.each_with_index do |writing_conference_file, i| %>
|
|
<%= f.fields_for :writing_conference_files, writing_conference_file do |f| %>
|
|
<%= render :partial => 'form_file', :object => writing_conference_file, :locals => {:f => f, :i => i} %>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</li>
|
|
</div>
|
|
<div class="s_grid_con s_form">
|
|
<li class="s_grid_row">
|
|
<ul>
|
|
<%= f.text_area :note, size: "20x22", placeholder: t("personal_conference.note"), class: "s_grid_6 s_grid full_height"%>
|
|
</ul>
|
|
</li>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
orbitDesktop.prototype.initializeJournalPapers.conference_title_autocomplete_list = <%= @conference_candidate.to_json.html_safe %>;
|
|
orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>;
|
|
</script>
|
|
|
|
<script>
|
|
$('#add_plugin_file a.add').click(function(){
|
|
var new_id = $(this).prev().attr('value');
|
|
var old_id = new RegExp("new_writing_conference_files", "g");
|
|
$(this).prev().attr('value', parseInt(new_id) + 1);
|
|
var newfield = $(("<%= escape_javascript(add_attribute 'form_file', f, :writing_conference_files) %>").replace(old_id, new_id));
|
|
$(this).parents('table').append(newfield);
|
|
newfield.find('.action a.delete').click(function(){
|
|
newfield.remove();
|
|
});
|
|
return false;
|
|
});
|
|
|
|
$('.action a.remove_existing_record').click(function(){
|
|
$(this).next('.should_destroy').attr('value', 1);
|
|
$("tr#add_plugin_file_" + $(this).prev().attr('value')).hide();
|
|
});
|
|
|
|
</script>
|