convert html template to html.erb

This commit is contained in:
Rueshyna 2012-11-16 12:54:21 +08:00 committed by chris
parent 1c6badfb10
commit ae10a2b8a2
2 changed files with 96 additions and 31 deletions

View File

@ -11,6 +11,7 @@ class DesktopPublicationsController< ApplicationController
def journal_p_add def journal_p_add
@writing_journal = WritingJournal.new @writing_journal = WritingJournal.new
@level_types = JournalLevelType.all
# respond_to do |format| # respond_to do |format|
# format.html # new.html.erb # format.html # new.html.erb

View File

@ -44,18 +44,33 @@
<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">
<%= form_for @writing_journal, url: desktop_publications_journal_p_add_path do |f| %>
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<%= form_for @writing_journal, url: desktop_publications_journal_p_add_path, :html => { :class=>"s_grid_6 s_grid"} do |f| %>
<ul> <ul>
<li class="s_grid_row"> <li class="s_grid_row">
<%= f.text_area :paper_title, :size => "20x2", :value => "Paper Title", :class => "s_grid_6 s_grid"%> <%= f.text_area :paper_title, size: "20x2", value: "Paper Title", class: "s_grid_6 s_grid"%>
</li>
<li class="s_grid_row">
<%= f.text_field :journal_title, size: "20" ,value: "Journal Title", class: "s_grid_6 s_grid"%>
<span class="icon-plus input_append"></span>
</li> </li>
<li class="s_grid_row"><input class="s_grid_6 s_grid" type="text" value="Journal Title"><span class="icon-plus input_append"></span></li>
<li class="s_grid_row"> <li class="s_grid_row">
<div class="check_box_g"> <div class="check_box_g">
<label for="">Journal Level</label> <%= f.label :level_type ,t("personal_journal.level_type")%>
<ul>
<% @level_types.each_with_index do |level_type, i| %>
<li>
<%= check_box_tag "field-#{i}",
level_type.id,
@writing_journal.journal_level_type_ids.include?(level_type.id)
%>
<%= label_tag("field-#{i}", level_type.title) %>
<%= hidden_field_tag "field-#{i}", '' %>
</li>
<% end %>
</ul>
<!--<label for="">Journal Level</label>
<ul> <ul>
<li><input type="checkbox"><label for="">SCI</label></li> <li><input type="checkbox"><label for="">SCI</label></li>
<li><input type="checkbox"><label for="">SCIE</label></li> <li><input type="checkbox"><label for="">SCIE</label></li>
<li><input type="checkbox"><label for="">SSCI</label></li> <li><input type="checkbox"><label for="">SSCI</label></li>
@ -66,49 +81,98 @@
<li><input type="checkbox"><label for="">TSCI</label></li> <li><input type="checkbox"><label for="">TSCI</label></li>
<li><input type="checkbox"><label for="">TSSCI</label></li> <li><input type="checkbox"><label for="">TSSCI</label></li>
<li><input type="checkbox"><label for="">THCI</label></li> <li><input type="checkbox"><label for="">THCI</label></li>
</ul> </ul>-->
</div> </div>
</li> </li>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">ISSN(ISBN)</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">ISI No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li> <li class="s_grid_row">
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Volume No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li> <%= label_tag("", "ISSN(ISBN)", class: "s_grid_2 s_grid") %>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Issue No.</label><input type="text" class="s_grid_4 s_grid" value="829872987"></li> <%= f.text_field :isbn, size: "15" ,value: "829872987", class: "s_grid_4 s_grid"%>
<li class="s_grid_row"><label class="s_grid_2 s_grid" for="">Pages</label></li> </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>
<li class="s_grid_row">
<%= label_tag("", "ISI No.", class: "s_grid_2 s_grid") %>
<%= f.text_field :isi, size: "20" ,value: "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" ,value: "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" ,value: "829872987", class: "s_grid_4 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", "Pages", class: "s_grid_2 s_grid") %>
<%= f.text_field :form_to_start, size: "10" ,value: "1", class: "s_grid_1 s_grid"%>
<%= label_tag("", "to", class: "s_grid_1 s_grid") %>
<%= f.text_field :form_to_end, size: "10" ,value: "20", class: "s_grid_1 s_grid"%>
</li>
<li class="s_grid_row">
<%= label_tag("", "Reference URL", class: "s_grid_2 s_grid") %>
<%= f.text_field :url, size: "20" ,value: "www.sample.com", class: "s_grid_4 s_grid"%>
</li>
</ul> </ul>
</div> </div>
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <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"> <li class="s_grid_row">
<select name="" id="" class="s_grid s_grid_4"> <%= f.text_area :authors, size: "20x2", value: "Author", class: "s_grid_6 s_grid"%>
<option value="">Author Type</option> </li>
<option value="">First Author</option> <li class="s_grid_row">
<option value="">Corresponding Author</option>
<option value="">Second Author</option> <select name="" id="" class="s_grid s_grid_4">
<option value="">Third Author</option> <%= options_for_select([["Author Type", 1],
<option value="">Fourth Author</option> ["First Author", 2],
["Corresponding Author", 3],
["Second Author", 4],
["Third Author", 5],
["Fourth Author", 6]], 1)
%>
</select> </select>
<select name="" id="" class="s_grid s_grid_2"> <select name="" id="" class="s_grid s_grid_2">
<option value="">Status</option> <%= options_for_select([['Status', 1],
<option value="">Published</option> ['Published', 2],
<option value="">Pending</option> ['Pending', 3],
<option value="">Writing</option> ['Writing', 4]], 1)
%>
</select> </select>
</li> </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"><textarea name="" id="" rows="10" class="s_grid s_grid_6"></textarea></li> <li class="s_grid_row">
<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> <%= label_tag("", "Date of Publication", class: "s_grid_2 s_grid") %>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Abstract</label><input type="file"></li> <%= f.text_field :url, size: "20", value: "2012 / 05 / 01", class: "s_grid_4 s_grid"%>
<li class="s_grid_row"><label class="s_grid s_grid_2" for="">Full Text</label><input type="file"></li> </li>
<li class="s_grid_row">
<%= f.text_area :keyword, size: "20x10", value: "May Keywords", class: "s_grid_6 s_grid"%>
</li>
<li class="s_grid_row">
<%= f.text_field :associated_project, size: "20", value: "Associated Project", class: "s_grid s_grid_6" %>
<span class="icon-plus input_append"></span>
</li>
<li class="s_grid_row">
<%= label_tag("", "Full Text", class: "s_grid_2 s_grid") %>
<%= f.file_field :file, size: "20", class: "s_grid_4 s_grid"%>
</li>
</ul> </ul>
</div> </div>
<div class="s_grid_con s_form"> <div class="s_grid_con s_form">
<ul> <ul>
<li class="s_grid_row"><textarea name="" id="" rows="26" class="s_grid s_grid_6">Abstract</textarea></li> <%= f.text_area :abstract, size: "20x10", class: "s_grid_6 s_grid"%>
<li class="s_grid_row">
<%= f.text_area :abstract, size: "20x26", value: "Abstract", class: "s_grid_6 s_grid"%>
</li>
</ul> </ul>
<%end%>
</div> </div>
<%end%>
</div> </div>
</div> </div>
</div> </div>