done personal conference add/edit page

This commit is contained in:
Rueshyna 2013-02-20 16:02:54 +08:00 committed by chris
parent 6d65af0312
commit 16fda25ace
6 changed files with 142 additions and 183 deletions

View File

@ -14,6 +14,7 @@ class Panel::PersonalConference::Desktop::ConferencePagesController < Applicatio
def new def new
@writing_conference = WritingConference.new @writing_conference = WritingConference.new
@paper_types = ConferencePaperType.all @paper_types = ConferencePaperType.all
@author_types = ConferenceAuthorType.all
#@co_author_candidate = #@co_author_candidate =
# CoAuthor.where(name_id: current_user.id).map{|c|c.co_author} # CoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
#@conference_candidate = #@conference_candidate =

View File

@ -1,90 +1,149 @@
<div class="toolbar hh2"> <div class="toolbar hh2">
<div class="fn_g hp"> <div class="fn_g hp">
<%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> <%= f.submit t("save"), name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %>
<!-- class: bt-cancle can't be remove --> <!-- class: bt-cancle can't be remove -->
<% if not @writing_conference.new_record? %> <% if not @writing_conference.new_record? %>
<%= submit_tag t("cancel"), :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %> <%= submit_tag t("cancel"), :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %>
<% end %> <% end %>
</div> </div>
<div class="hh2 hp sdm"> <div class="hh2 hp sdm">
<div class="sdm_t hh2"><span class="icon-question-sign"></span></div> <div class="sdm_t hh2">Share</div>
</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>
<div id="paper_add" class="tinycanvas vp"> <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="scrollbar sb_h vp"><div class="track"><div class="thumb thmc2"><div class="end"></div></div></div></div>
<div class="viewport"> <div class="viewport">
<div class="overview"> <div class="overview">
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.fields_for :paper_title_translations do |f| %> <%= f.fields_for :paper_title_translations do |f| %>
<%= f.text_area locale, <%= f.text_area locale,
class: "s_grid_6 s_grid", class: "s_grid_6 s_grid",
size: "20x2", size: "20x2",
placeholder: t("personal_journal.paper_title"), placeholder: t("personal_conference.paper_title"),
value: (@writing_journal.paper_title_translations[locale] rescue nil) %> value: (@writing_conference.paper_title_translations[locale] rescue nil) %>
<% end %> <% end %>
<textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li> </li>
<li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Year</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Month</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Day</label>
</li>
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Sponsor"></li> <li class="s_grid_row">
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Reference URL</label><input class="s_grid_4 s_grid" type="text" value="www.sample.com"></li> <%= 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.conferece_title_translations[locale] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
</li>
</ul> <div>
</div> <%= label_tag("", t("personal_conference.paper_type")) %>
<div class="s_grid_con s_form"> <ul>
<ul> <% @paper_types.each_with_index do |paper_type, i| %>
<li class="s_grid_row"><textarea class="s_grid s_grid_6" name="" id="">Author</textarea><span class="icon-plus input_append"></span></li> <li class="s_grid_row">
<li class="s_grid_row"> <%= radio_button_tag "writing_conference[conference_paper_type_ids][]",
<select name="" id="" class="s_grid s_grid_4"> paper_type.id,
<option value="">Author Type</option> @writing_conference.conference_paper_type_ids.include?(paper_type.id),
<option value="">First Author</option> id: "field-#{i}"
<option value="">Corresponding Author</option> %><%= label_tag("field-#{i}", paper_type.title) %>
<option value="">Second Author</option> </li>
<option value="">Third Author</option> <% end %>
<option value="">Fourth Author</option> </ul>
</select> </div>
<select name="" id="" class="s_grid s_grid_2">
<option value="">Status</option>
<option value="">Published</option>
<option value="">Pending</option>
<option value="">Writing</option>
</select>
</li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Date of Publication</label><input class="s_grid s_grid_4" type="text" value="2012 / 05 / 01"></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"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li> <div>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Keywords"><span class="icon-plus input_append"></li> <%= label_tag("", t("personal_conference.conference_time")) %>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Associated Project"><span class="icon-plus input_append"></span></li> <ul>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li> <li class="s_grid_row">
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li> <%= 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>
</ul> <li class="s_grid_row">
</div> <%= 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"%>
<div class="s_grid_con s_form"> </li>
<ul> <li class="s_grid_row">
<li class="s_grid_row"><textarea name="" id="" rows="20" class="s_grid s_grid_6">Abstract</textarea></li> <%= 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 class="s_grid_row"><textarea name="" id="" rows="6" class="s_grid s_grid_6">Note</textarea></li> </li>
</ul>
</div> <li class="s_grid_row">
</div> <%= 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 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] rescue nil) %>
<% end %>
<span class="icon-plus input_append"></span>
<select name="writing_conference[conference_author_type_ids][]" id="" class="s_grid s_grid_4">
<%= options_for_select(
[t("personal_conference.author_type")] +
@author_types.map do |author_type|
[author_type.title, author_type.id]
end
)
%>
</select>
<select name="" id="" class="s_grid s_grid_2">
<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"><input class="s_grid s_grid_6" type="text" value="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">
<li class="s_grid_row">
<ul>
<%= f.text_area :note, size: "20x22", placeholder: t("personal_journal.note"), class: "s_grid_6 s_grid full_height"%>
</ul>
</li>
</div>
</div> </div>
</div> </div>

View File

@ -1,107 +1,4 @@
<div class="toolbar hh2"> <%= form_for @writing_conference, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_conference_desktop_conference_pages_path do |f| %>
<div class="fn_g hp"> <%= render partial: 'panel/personal_conference/desktop/conference_pages/form', locals: {:f => f} %>
<button class="fn_btn hh2 thmc2 thmtxt">Save</button> <%end%>
<button class="fn_btn hh2 admbg2">Cancel</button>
</div>
<div class="hh2 hp sdm">
<div class="sdm_t hh2">Year</div>
<div class="admbg sdm_o">
<ul>
<li><a class="hp hh2 admtxt" href="">2012</a></li>
<li><a class="hp hh2 admtxt" href="">2011</a></li>
<li><a class="hp hh2 admtxt" href="">2010</a></li>
<li><a class="hp hh2 admtxt" href="">2009</a></li>
<li><a class="hp hh2 admtxt" href="">2008</a></li>
<li><a class="hp hh2 admtxt" href="">2007</a></li>
<li><a class="hp hh2 admtxt" href="">2006</a></li>
<li><a class="hp hh2 admtxt" href="">2005</a></li>
<li><a class="hp hh2 admtxt" href="">2004</a></li>
<li><a class="hp hh2 admtxt" href="">2003</a></li>
<li><a class="hp hh2 admtxt" href="">2002</a></li>
<li><a class="hp hh2 admtxt" href="">2001</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"><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"><textarea class="s_grid_6 s_grid" name="" id="">Conference Title</textarea></li>
<li class="s_grid_row">
<label>Paper type</label><input type="radio" name="" value="Books" />Oral<input type="radio" name="" value="Chapter" />Poster</li>
<li class="s_grid_row"><label>Conference time</label></li>
<li class="s_grid_row"><select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Year</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Month</label>
<select name="" id="" class="s_grid s_grid_1">
<option value=""></option>
</select>
<label class="s_grid s_grid_1">Day</label>
</li>
<li class="s_grid_row"><input class="s_grid s_grid_2" type="text" value="Location"><input class="s_grid s_grid_2" type="text" value="Sponsor"></li>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Reference URL</label><input class="s_grid_4 s_grid" type="text" value="www.sample.com"></li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row"><textarea class="s_grid s_grid_6" name="" id="">Author</textarea><span class="icon-plus input_append"></span></li>
<li class="s_grid_row">
<select name="" id="" class="s_grid s_grid_4">
<option value="">Author Type</option>
<option value="">First Author</option>
<option value="">Corresponding Author</option>
<option value="">Second Author</option>
<option value="">Third Author</option>
<option value="">Fourth Author</option>
</select>
<select name="" id="" class="s_grid s_grid_2">
<option value="">Status</option>
<option value="">Published</option>
<option value="">Pending</option>
<option value="">Writing</option>
</select>
</li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Date of Publication</label><input class="s_grid s_grid_4" type="text" value="2012 / 05 / 01"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Tags"><span class="icon-plus input_append"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Keywords"><span class="icon-plus input_append"></li>
<li class="s_grid_row"><input class="s_grid s_grid_6" type="text" value="Associated Project"><span class="icon-plus input_append"></span></li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li>
</ul>
</div>
<div class="s_grid_con s_form">
<ul>
<li class="s_grid_row"><textarea name="" id="" rows="20" class="s_grid s_grid_6">Abstract</textarea></li>
<li class="s_grid_row"><textarea name="" id="" rows="6" class="s_grid s_grid_6">Note</textarea></li>
</ul>
</div>
</div>
</div>
</div>

View File

@ -13,7 +13,7 @@
<div id="panel_l" class="ph"> <div id="panel_l" class="ph">
<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="<%= panel_personal_conference_desktop_conference_pages_path %>" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li> <li><a href="<%= panel_personal_conference_desktop_conference_pages_path %>" load="true" callback-method="list" class="hh2 w2 hp active thmc1 thmtxt" onclick='return false;'>List</a></li>
<li><a href="<%= new_panel_personal_conference_desktop_conference_page_path %>" callback-method="addconference" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li> <li><a href="<%= new_panel_personal_conference_desktop_conference_page_path %>" callback-method="addconference" custom-load="add" class="admtxt hh2 w2 hp" onclick='return false;'>Add/Edit</a></li>
<li><a href="" callback-method="conference" class="admtxt hh2 w2 hp" onclick='return false;'>Conference</a></li> <li><a href="" callback-method="conference" class="admtxt hh2 w2 hp" onclick='return false;'>Conference</a></li>
<li><a href="" callback-method="coauthor" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li> <li><a href="" callback-method="coauthor" class="admtxt hh2 w2 hp" onclick='return false;'>Co-Authors</a></li>

View File

@ -6,6 +6,7 @@ en:
paper_title : "Paper Title" paper_title : "Paper Title"
paper_type : "Paper Type" paper_type : "Paper Type"
conference_title : "Conference Name" conference_title : "Conference Name"
conference_time: "Conference Time"
period_start_date : "Start Date" period_start_date : "Start Date"
period_end_date : "End Date" period_end_date : "End Date"
location : "Location" location : "Location"
@ -22,7 +23,7 @@ en:
publication_date : "Date of Publication" publication_date : "Date of Publication"
url : "Reference URL" url : "Reference URL"
note : "Note" note : "Note"
# author_type : "Author Type" author_type : "Author Type"
file : "File" file : "File"
file_name : "File Name" file_name : "File Name"
description : "File Description" description : "File Description"

View File

@ -6,6 +6,7 @@ zh_tw:
paper_title : "論文名稱" paper_title : "論文名稱"
paper_type : "論文型態" paper_type : "論文型態"
conference_title : " 會議名稱" conference_title : " 會議名稱"
conference_time: "會議時間"
period_start_date : "起" period_start_date : "起"
period_end_date : "訖" period_end_date : "訖"
location : "地點" location : "地點"
@ -22,7 +23,7 @@ zh_tw:
publication_date : "發表日期" publication_date : "發表日期"
url : "參考連結" url : "參考連結"
note : "記事" note : "記事"
# author_type : "作者類別" author_type : "作者類別"
file : "檔案" file : "檔案"
file_name : "檔案名稱" file_name : "檔案名稱"
description : "描述" description : "描述"