From ae10a2b8a29ad4a523f75333278e9be23ec47e75 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 16 Nov 2012 12:54:21 +0800 Subject: [PATCH] convert html template to html.erb --- .../desktop_publications_controller.rb | 1 + app/views/desktop/journal_pages/add.html.erb | 126 +++++++++++++----- 2 files changed, 96 insertions(+), 31 deletions(-) diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index 0ea46451..c55f348e 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -11,6 +11,7 @@ class DesktopPublicationsController< ApplicationController def journal_p_add @writing_journal = WritingJournal.new + @level_types = JournalLevelType.all # respond_to do |format| # format.html # new.html.erb diff --git a/app/views/desktop/journal_pages/add.html.erb b/app/views/desktop/journal_pages/add.html.erb index 7378af64..73c68114 100644 --- a/app/views/desktop/journal_pages/add.html.erb +++ b/app/views/desktop/journal_pages/add.html.erb @@ -44,18 +44,33 @@
+ <%= form_for @writing_journal, url: desktop_publications_journal_p_add_path do |f| %>
- <%= form_for @writing_journal, url: desktop_publications_journal_p_add_path, :html => { :class=>"s_grid_6 s_grid"} do |f| %>
  • - <%= 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"%> +
  • +
  • + <%= f.text_field :journal_title, size: "20" ,value: "Journal Title", class: "s_grid_6 s_grid"%> +
  • -
  • - + <%= f.label :level_type ,t("personal_journal.level_type")%> +
      + <% @level_types.each_with_index do |level_type, i| %> +
    • + <%= 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}", '' %> +
    • + <% end %> +
    +
  • -
  • -
  • -
  • -
  • -
  • -
  • + +
  • + <%= label_tag("", "ISSN(ISBN)", class: "s_grid_2 s_grid") %> + <%= f.text_field :isbn, size: "15" ,value: "829872987", class: "s_grid_4 s_grid"%> +
  • + +
  • + <%= label_tag("", "ISI No.", class: "s_grid_2 s_grid") %> + <%= f.text_field :isi, size: "20" ,value: "829872987", class: "s_grid_4 s_grid"%> +
  • + +
  • + <%= 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"%> +
  • + +
  • + <%= 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"%> +
  • + +
  • + <%= 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"%> +
  • + +
  • + <%= 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"%> +
    -
  • - + <%= options_for_select([["Author Type", 1], + ["First Author", 2], + ["Corresponding Author", 3], + ["Second Author", 4], + ["Third Author", 5], + ["Fourth Author", 6]], 1) + %> +
  • -
  • -
  • -
  • -
  • -
  • + +
  • + <%= label_tag("", "Date of Publication", class: "s_grid_2 s_grid") %> + <%= f.text_field :url, size: "20", value: "2012 / 05 / 01", class: "s_grid_4 s_grid"%> +
  • + +
  • + <%= f.text_area :keyword, size: "20x10", value: "May Keywords", class: "s_grid_6 s_grid"%> +
  • + +
  • + <%= f.text_field :associated_project, size: "20", value: "Associated Project", class: "s_grid s_grid_6" %> + +
  • + +
  • + <%= label_tag("", "Full Text", class: "s_grid_2 s_grid") %> + <%= f.file_field :file, size: "20", class: "s_grid_4 s_grid"%> +
    -
  • + <%= f.text_area :abstract, size: "20x10", class: "s_grid_6 s_grid"%> +
  • + <%= f.text_area :abstract, size: "20x26", value: "Abstract", class: "s_grid_6 s_grid"%> +
-<%end%>
+ <%end%>