add add/edit form page and controller

This commit is contained in:
Rueshyna 2013-02-05 18:53:58 +08:00 committed by chris
parent 54b12a193a
commit 1c4b696052
2 changed files with 113 additions and 0 deletions

View File

@ -1,14 +1,37 @@
class Panel::PersonalConference::Desktop::ConferencePagesController < ApplicationController class Panel::PersonalConference::Desktop::ConferencePagesController < ApplicationController
def index def index
@writing_conferences = WritingConference.all
@level_types = ConferencePaperType.all
respond_to do |format| respond_to do |format|
format.html { render :layout => false} format.html { render :layout => false}
end end
end end
def show
end
def new def new
@writing_conference = WritingConference.new
@paper_types = ConferencePaperType.all
#@co_author_candidate =
# CoAuthor.where(name_id: current_user.id).map{|c|c.co_author}
#@conference_candidate =
# WritingConference.where(create_user_id: current_user.id).map{|j|j.conference_title}.uniq
respond_to do |format| respond_to do |format|
format.html { render :layout => false} format.html { render :layout => false}
end end
end end
def edit
@writing_conference = WritingConference.new
end
def create
end
def destroy
end
end end

View File

@ -0,0 +1,90 @@
<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"><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_journal.paper_title"),
value: (@writing_journal.paper_title_translations[locale] rescue nil) %>
<% end %>
<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>