diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/app/assets/javascripts/desktop/journal_pages.js.erb index 4af5715c..a3880acc 100644 --- a/app/assets/javascripts/desktop/journal_pages.js.erb +++ b/app/assets/javascripts/desktop/journal_pages.js.erb @@ -116,7 +116,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // li; $.each(journalData,function(i,journal){ $.each(journal.papers,function(j,paper){ - li = $('
  • '+journal.title+'
    '+paper.title+'
    Edit Delete
  • '); + li = $('
  • '+journal.title+'
    '+paper.title+'
    Edit Delete
  • '); column.find("ul").append(li); if(counter%5==0){ $("#journal_p div#paper_list div.overview").append(column); @@ -145,7 +145,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // var img = $('
    '+thistitle+'
    '); li.append(img); }) - li.append('Edit Delete'); + li.append('
    Edit Delete
    '); column.find("ul").append(li); if(counter%5==0){ $("#journal_p div#paper_list div.overview").append(column); @@ -164,7 +164,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // li; $.each(journalData,function(i,journal){ $.each(journal.papers,function(j,paper){ - li = $('
  • '+paper.title+'
    '+paper.keywords+'
    Edit Delete
  • '); + li = $('
  • '+paper.title+'
    '+paper.keywords+'
    Edit Delete
  • '); column.find("ul").append(li); if(counter%5==0){ $("#journal_p div#paper_list div.overview").append(column); @@ -184,7 +184,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // li; $.each(journalData,function(i,journal){ $.each(journal.papers,function(j,paper){ - li = $('
  • '+paper.title+'
    Edit Delete
  • '); + li = $('
  • '+paper.title+'
    Edit Delete
  • '); column.find("ul").append(li); if(counter%5==0){ $("#journal_p div#paper_list div.overview").append(column); @@ -203,7 +203,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // li; $.each(journalData,function(i,journal){ $.each(journal.papers,function(j,paper){ - li = $('
  • '+paper.title+'
    '+paper.abstract+'
    Edit Delete
  • '); + li = $('
  • '+paper.title+'
    '+paper.abstract+'
    Edit Delete
  • '); column.find("ul").append(li); $("#journal_p div#paper_list div.overview").append(column); column = $('
    '); @@ -238,10 +238,9 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.journal = function(){ // to open add pages in journal papers page var bindHandlers = function(){ // to bind handlers for add page o.simple_drop_down(); - o.tinyscrollbar_ext({ main: '.tinycanvas', - fill: '.s_grid_con' + fill: '.g_col' }) } bindHandlers(); @@ -261,9 +260,9 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // o.tinyscrollbar_ext({ main: '.tinycanvas', - fill: '.s_grid_con' + fill: '.g_col' }) - $("a.bt-edit").click(function(){ + $("div[container=true]").unbind(".editcoauthor").on("click.editcoauthor", "a.bt-edit", function(){ $.ajax({ url : $(this).attr("href"), type : "get", @@ -281,7 +280,25 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // }) return false; }) + $("div[container=true]").unbind(".editype").on("click.edittype", "a.bt-edit-type", function(){ + var parent = $(this).parent().parent(); + parent.find('.list_item_function').hide(); + $.ajax({ + url : $(this).attr("href"), + type : "get", + success : function(data){ + var prev_data = parent.find(".form_space").html(); + parent.find(".form_space").html(data); + $(".bt-cancel-type").click(function(){ + parent.find(".form_space").html(prev_data); + parent.find('.list_item_function').show(); + }); + } + }) + return false; + }) $("div[container=true]").unbind(".delete").on("click.delete","a.bt-delete",function(){ + var delurl = $(this).attr("href"); var parent = $(this).parent().parent(); o.confirm({ @@ -346,7 +363,15 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // this.initializeJournalPapers.coauthorRelationForm = function(data){ if(data.success){ o.notify(data.msg,"success"); - $("#co_author_relation_table tbody").prepend(data.newvalue); + $("#co_author_relation_table").html(data.newvalue); + }else{ + o.notify(data.msg,"alert"); + } + } + this.initializeJournalPapers.coauthorRelationEditForm = function(data){ + if(data.success){ + o.notify(data.msg,"success"); + $("#co_author_relation_table").html(data.newvalue); }else{ o.notify(data.msg,"alert"); } diff --git a/app/assets/javascripts/orbitdesktopAPI.js b/app/assets/javascripts/orbitdesktopAPI.js index 57065c4d..66308860 100644 --- a/app/assets/javascripts/orbitdesktopAPI.js +++ b/app/assets/javascripts/orbitdesktopAPI.js @@ -26,7 +26,7 @@ var orbitDesktopAPI = function(){ break; } $notify.find("img#note_img").attr("src",o.notifyImgPath+img); - $notify.find(".note_message").text(msg); + $notify.find(".note_message").html(msg); n_height = $notify.outerHeight(); if(!time)time=5000; else time=time*1000; $notify diff --git a/app/assets/stylesheets/desktopmain.css b/app/assets/stylesheets/desktopmain.css index 8f591e1f..48fd709c 100644 --- a/app/assets/stylesheets/desktopmain.css +++ b/app/assets/stylesheets/desktopmain.css @@ -26,7 +26,7 @@ time, mark, audio, video { #container input, #container textarea, #container select, #container input:focus, #container textarea:focus { border-radius: 0; box-shadow: none; - font: inherit; + font-family: inherit; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, @@ -126,10 +126,13 @@ a:focus { outline: none; } .ini_input { margin: 0; padding: 0; - border: none; + border: 0; } .ini_input:focus { outline: none; } -#search_app { position: relative; background-color: #fff; } +#search_app { + position: relative; + background-color: #fff; +} #search_app .form { position: absolute; left: 0; @@ -139,6 +142,7 @@ a:focus { outline: none; } height: 28px; line-height: 28px; background: none; + border: 0; } #search_app .submit { position: absolute; @@ -289,7 +293,7 @@ a:focus { outline: none; } position: relative; z-index: 9; } -.toolbar .sdm, .toolbar .fn_g { display: inline-block; } +.toolbar .sdm, .toolbar .fn_g { display: inline-block; vertical-align: top; } .toolbar .sdm_o { top: 36px; background-color: #f0f0f0; } .toolbar button { border: none; @@ -300,7 +304,10 @@ a:focus { outline: none; } font-size: 15px; vertical-align: top; } - +.toolbar .fn_btn { + display: inline-block; + vertical-align: top; +} /* Setting Page */ .theme_list {} @@ -344,6 +351,7 @@ a:focus { outline: none; } font-size: 15px; line-height: 36px; text-align: center; + border: 0; } /* theme color opacity */ @@ -452,7 +460,7 @@ a:focus { outline: none; } height: 100%; left: 0; top: 0; - z-index: 9; + z-index: 10; } #orbitdiag .tile { background-color: #000; } .diag_holder { background-color: #000; } @@ -535,7 +543,7 @@ a:focus { outline: none; } .s_form input[type=text], .s_form input[type=password], .s_form textarea{ outline: solid 3px #f6f6f6; border: solid 1px #eee; - font-size: 18px; + font-size: 15px; font-family: Arial !important; margin: 0; padding: 6px; @@ -578,14 +586,14 @@ a:focus { outline: none; } height: 30px; line-height: 30px; right: 5px; - top: 4px; + top: 5px; display: block; background-color: #fff; } .s_form.s_grid_con { width: 416px; } .s_form .s_grid_row { width: 410px; } .s_form .s_grid_row .s_grid:first-child { margin-left: 0; } -.s_form input[type=text].s_grid, .s_form input[type=passowrd].s_grid, .s_form textarea.s_grid, .s_form label.s_grid { float: none; display: inline-block; margin-left: 10px; } +.s_form input[type=text].s_grid, .s_form input[type=passowrd].s_grid, .s_form textarea.s_grid, .s_form label.s_grid, .s_form select.s_grid { /*float: none; display: inline-block;*/ margin-left: 10px; } .s_form input[type=text].s_grid_1, .s_form input[type=passowrd].s_grid_1, .s_form textarea.s_grid_1 { width: 46px; } .s_form input[type=text].s_grid_2, .s_form input[type=passowrd].s_grid_2, .s_form textarea.s_grid_2 { width: 116px; } .s_form input[type=text].s_grid_3, .s_form input[type=passowrd].s_grid_3, .s_form textarea.s_grid_3 { width: 186px; } @@ -598,7 +606,30 @@ a:focus { outline: none; } .s_form select.s_grid_4 { width: 270px; } .s_form select.s_grid_5 { width: 340px; } .s_form select.s_grid_6 { width: 410px; } - +.s_form label.s_grid { line-height: 34px; } +.s_form select.s_grid { + height: 26px; + margin-top: 4px; + margin-bottom: 4px; +} +.s_form textarea.full_height { + height: 436px; +} +.s_form .s_table { + width: 100%; +} +.s_form .s_table th, .s_form .s_table td { + padding: 6px 0; +} +.s_form .s_table th { + text-align: left; +} +.s_form .s_table td { + vertical-align: middle; +} +.s_form .s_table thead th { + border-bottom: solid 1px #eee; +} #group_wrapper {} @@ -616,7 +647,7 @@ a:focus { outline: none; } .list_t_title { font-size: 15px; font-family: Arial; - margin-bottom: 10px; + margin-bottom: 6px; color: #333; } .list_t_des { @@ -624,7 +655,7 @@ a:focus { outline: none; } line-height: 1.5em; color: #999; font-family: Arial, sans-serif; - margin-bottom: 10px; + margin-bottom: 4px; } /* Connection Page */ @@ -684,6 +715,12 @@ a:focus { outline: none; } float: left; margin-left: -30px; } +#paper_list .list_item_function a { + display: inline-block; + padding: 4px; + font-family: Arial, sans-serif; + font-size: 11px; +} .list_item_action a { display: block; width: 20px; @@ -708,6 +745,110 @@ a:focus { outline: none; } #paper_add .f_w { width: 336px; } #paper_add label { margin-right: 0; } +/* Journal Journal list */ +#journal_list .g_col { + width: 416px; +} +#journal_list .g_col { + float: left; + height: 456px; + margin-left: 12px; + padding-left: 12px; + border-left: solid 1px #EEE; +} +#journal_list .g_col:first-child { + margin-left: 0; + padding-left: 0; + border: none; +} +#journal_list .g_col .list_t_item { + padding-left: 30px; + height: 86px; +} +#journal_list .list_item_action { + font-size: 12px; + float: left; + margin-left: -30px; +} +#journal_list .list_item_action i { + color: #999; + font-size: 20px; + display: block; + width: 20px; + height: 20px; + line-height: 20px; + margin: 1px 1px 6px 1px; +} + +/* Journal Co-Author */ +#co_author {} +#co_author .list_t_item { + height: 110px; +} +#co_author .list_item_function {} +#co_author .list_item_function a { + display: inline-block; + padding: 4px; + font-family: Arial, sans-serif; + font-size: 11px; +} +#co_author .g_col:first-child { + margin-left: 0; + padding-left: 10px; + border: none; +} +#co_author .g_col { + width: 300px; + height: 456px; + margin-left: 12px; + padding-left: 12px; + border-left: solid 1px #EEE; +} +#co_author .info { + font-family: Arial, sans-serif; +} +#co_author .info li { + margin-bottom: 8px; + color: #999; +} +#co_author .info .name { + font-size: 18px; + line-height: 24px; + color: #333; +} +/* Journal Co-Author Relationship*/ +#co_author_relation_table .s_grid_con { + float: left; + width: 346px; + height: 456px; + margin-left: 12px; + padding-left: 12px; + border-left: solid 1px #EEE; +} +#co_author_relation_table .s_grid_con:first-child { + margin-left: 0; + padding-left: 0; + border: 0; +} +#co_author_relation_table .s_grid_row { + width: auto; + height: 64px; +} +#co_author_relation_table .edit_co_author_relation { + margin-left: -10px; +} +#co_author_relation_table .list_item_function a { + display: inline-block; + padding: 4px; + font-family: Arial, sans-serif; + font-size: 11px; +} +#co_author_relation_table .form_space { + margin-bottom: 10px; + font-size: 15px; + font-family: Arial, sans-serif; +} + /* App */ .app_frame { margin: 48px 96px 48px 156px; diff --git a/app/assets/stylesheets/orbit-bar.css.erb b/app/assets/stylesheets/orbit-bar.css.erb index 38441260..154f1158 100644 --- a/app/assets/stylesheets/orbit-bar.css.erb +++ b/app/assets/stylesheets/orbit-bar.css.erb @@ -143,6 +143,7 @@ display: inline-block; line-height: 22px; padding: 0 10px; + vertical-align: top; } #orbit-bar .nav img.member-img { display: inline-block; diff --git a/app/controllers/admin/infos_controller.rb b/app/controllers/admin/infos_controller.rb index c08d1386..e79fba7b 100644 --- a/app/controllers/admin/infos_controller.rb +++ b/app/controllers/admin/infos_controller.rb @@ -8,6 +8,9 @@ class Admin::InfosController < ApplicationController def index @attributes = Info.all.entries + + @roles = Role.excludes('disabled' => true) + render :template => 'admin/attributes/index' end @@ -22,7 +25,7 @@ class Admin::InfosController < ApplicationController def edit @attribute = Info.find(params[:id]) - @attribute_fields_upper_object = [@attribute] + # @attribute_fields_upper_object = [@attribute] render :template => 'admin/attributes/edit' end @@ -49,10 +52,20 @@ class Admin::InfosController < ApplicationController end def add_attribute_field + attribute = Info.find(params[:info_id]) rescue nil @attribute_field_counter = attribute.attribute_fields.count @attribute_field = attribute.attribute_fields.build @attribute_field.save + + @attribute_field[:af_count] = @attribute_field_counter + + @attribute = Info.find(params[:info_id]) + + respond_to do |format| + format.js { render 'admin/attributes/add_attribute_field' } + end + end protected diff --git a/app/controllers/desktop/co_author_relations_controller.rb b/app/controllers/desktop/co_author_relations_controller.rb index f35391dd..bc3eb451 100644 --- a/app/controllers/desktop/co_author_relations_controller.rb +++ b/app/controllers/desktop/co_author_relations_controller.rb @@ -8,18 +8,38 @@ class Desktop::CoAuthorRelationsController < ApplicationController end end + def edit + @co_author_relation = CoAuthorRelation.find(params[:id]) + respond_to do |format| + format.html { render :layout => false} + end + end + def new - @new_relation = CoAuthorRelation.new + @co_author_relation = CoAuthorRelation.new end def create - @new_relation = CoAuthorRelation.new(params[:co_author_relation]) + @co_author_relation = CoAuthorRelation.new(params[:co_author_relation]) + @co_author_relations = CoAuthorRelation.all - if @new_relation.save - newv = render_to_string :partial=>"show_form", :object=>@new_relation - render json: {success:true, msg: "New Relation successfully saved!","newvalue"=>newv}.to_json + if @co_author_relation.save + newv = render_to_string partial: "show_form", object: @co_author_relations + render json: {success: true, msg: "New Relation successfully saved!", newvalue: newvm}.to_json else - error_msg = @new_relation.errors.full_messages.join("
    ") + error_msg = @co_author_relation.errors.full_messages.join("
    ") + render json: {success: false, msg: error_msg}.to_json + end + end + + def update + @co_author_relation = CoAuthorRelation.find(params[:id]) + if @co_author_relation.update_attributes(params[:co_author_relation]) + @co_author_relations = CoAuthorRelation.all + newv = render_to_string partial: "show_form", object: @co_author_relations + render json: {success: true, msg: "New Relation successfully updated!", newvalue: newv}.to_json + else + error_msg = @co_author.errors.full_messages.join("
    ") render json: {success: false, msg: error_msg}.to_json end end @@ -27,7 +47,17 @@ class Desktop::CoAuthorRelationsController < ApplicationController def destroy @co_author_relation = CoAuthorRelation.find(params[:id]) @co_author_relation.destroy + reset_co_author_relation render :json => {success: true, msg: "deleted successfully!"} end + + private + + def reset_co_author_relation + co_author = CoAuthor.where(co_author_relations_id: @co_author_relation.id) + co_author.map do |c| + c.update_attributes(co_author_relations_id: nil) + end + end end diff --git a/app/controllers/desktop/co_authors_controller.rb b/app/controllers/desktop/co_authors_controller.rb index c027a162..6d7b41d6 100644 --- a/app/controllers/desktop/co_authors_controller.rb +++ b/app/controllers/desktop/co_authors_controller.rb @@ -1,6 +1,8 @@ class Desktop::CoAuthorsController < ApplicationController def index - @co_authors = CoAuthor.where(name_id: current_user.id) + nils, not_nils = CoAuthor.where(name_id: current_user.id)\ + .asc(:co_author).partition{|p| p.email.nil?} + @co_authors = not_nils + nils @co_author_relations = CoAuthorRelation.all respond_to do |format| @@ -8,15 +10,6 @@ class Desktop::CoAuthorsController < ApplicationController end end - def show - @co_author = CoAuthor.find(params[:id]) - - respond_to do |format| - format.html { redirect_to desktop_co_authors_url, :layout => false } - format.json { render json: @co_author } - end - end - def new @co_author = CoAuthor.new @co_author_relations = CoAuthorRelation.all diff --git a/app/controllers/desktop/journal_lists_controller.rb b/app/controllers/desktop/journal_lists_controller.rb index 8605b47d..2667a5a7 100644 --- a/app/controllers/desktop/journal_lists_controller.rb +++ b/app/controllers/desktop/journal_lists_controller.rb @@ -1,5 +1,4 @@ class Desktop::JournalListsController < ApplicationController - def index level_types = JournalLevelType.all all_journal_lists = WritingJournal.where(create_user_id: current_user.id) @@ -7,8 +6,7 @@ class Desktop::JournalListsController < ApplicationController [ j.journal_title, j.journal_level_type_ids.map do |type| level_types.find(type).title - end.join(",") - ].join(" -- ") + end] end @journal_lists = all_journal_lists.uniq diff --git a/app/controllers/desktop/journal_pages_controller.rb b/app/controllers/desktop/journal_pages_controller.rb index 5775be0a..8a2312b8 100644 --- a/app/controllers/desktop/journal_pages_controller.rb +++ b/app/controllers/desktop/journal_pages_controller.rb @@ -1,6 +1,4 @@ class Desktop::JournalPagesController < ApplicationController - #before_filter :check_for_cancel, :only => [:create, :update] - def index @writing_journal = WritingJournal.where(create_user_id: current_user.id) @level_types = JournalLevelType.all @@ -10,9 +8,6 @@ class Desktop::JournalPagesController < ApplicationController end end - def show - end - def new @writing_journal = WritingJournal.new @level_types = JournalLevelType.all @@ -109,10 +104,4 @@ class Desktop::JournalPagesController < ApplicationController render json: JSON.pretty_generate(data) end - private - - def check_for_cancel - if params[:commit] == "Cancel" - end - end end diff --git a/app/models/desktop/section.rb b/app/models/desktop/section.rb index f9035c69..1a4c0c4d 100644 --- a/app/models/desktop/section.rb +++ b/app/models/desktop/section.rb @@ -11,7 +11,6 @@ class Section def initialize_group self.groups.build - self.groups.build end -end \ No newline at end of file +end diff --git a/app/models/user/attribute_field.rb b/app/models/user/attribute_field.rb index c0aabb9c..d486ccd0 100644 --- a/app/models/user/attribute_field.rb +++ b/app/models/user/attribute_field.rb @@ -4,6 +4,7 @@ class AttributeField include ::AttributeFieldsHelper field :key + field :af_count field :markup ,:default=>"text_field" field :option_list ,:type => Hash,:default => {} field :markup_options,:type => Hash diff --git a/app/views/admin/attributes/add_attribute_field.js.erb b/app/views/admin/attributes/add_attribute_field.js.erb new file mode 100644 index 00000000..dd3d7198 --- /dev/null +++ b/app/views/admin/attributes/add_attribute_field.js.erb @@ -0,0 +1 @@ +$('<%= j render :partial => 'shared/attribute_field/attribute_field', :collection => [@attribute_field] %>').appendTo('#attribute_field_list').hide().fadeIn(); diff --git a/app/views/admin/attributes/edit.html.erb b/app/views/admin/attributes/edit.html.erb index 6c980863..301bf18b 100644 --- a/app/views/admin/attributes/edit.html.erb +++ b/app/views/admin/attributes/edit.html.erb @@ -18,13 +18,14 @@ - - <% @attribute_fields_upper_object.each do |attribute|%> -
    -

    <%= attribute.title+ t(:attributes)%>

    - <%= render :partial=>"shared/attribute_field/attribute_field",:collection=>attribute.attribute_fields%> -
    - <% end %> + +
    +

    <%= @attribute.title+ t(:attributes)%>

    +
    + <%= render :partial=>"shared/attribute_field/attribute_field",:collection=>@attribute.attribute_fields%> +
    +
    +
    <%= link_to content_tag(:i,t(:add_attribute_field),:class=>"icon-plus icon-white"),admin_info_add_attribute_field_path(@attribute),:class=>"btn btn-primary",:remote => true%> diff --git a/app/views/desktop/app_manager.html.erb b/app/views/desktop/app_manager.html.erb old mode 100755 new mode 100644 diff --git a/app/views/desktop/co_author_relations/_form.html.erb b/app/views/desktop/co_author_relations/_form.html.erb index a6d2b68e..83be814e 100644 --- a/app/views/desktop/co_author_relations/_form.html.erb +++ b/app/views/desktop/co_author_relations/_form.html.erb @@ -1,4 +1,5 @@ -<%= form_for(@new_relation , url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> - <%= f.text_field :relation %> - <%= f.submit "Save" %> +<%= f.text_field :relation, class: "ini_input" %> +<%= f.submit "Save", class: "ini_input hp hh2 thmtxt thmc2", style: "margin-left: 10px;" %> +<% if not @co_author_relation.new_record? %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel-type ini_input hp hh2 thmtxt" %> <% end %> diff --git a/app/views/desktop/co_author_relations/_new.html.erb b/app/views/desktop/co_author_relations/_new.html.erb new file mode 100644 index 00000000..fc0d0891 --- /dev/null +++ b/app/views/desktop/co_author_relations/_new.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@co_author_relation, url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> + <%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/app/views/desktop/co_author_relations/_show_form.html.erb b/app/views/desktop/co_author_relations/_show_form.html.erb index 28ded992..a5d931a0 100644 --- a/app/views/desktop/co_author_relations/_show_form.html.erb +++ b/app/views/desktop/co_author_relations/_show_form.html.erb @@ -1,6 +1,17 @@ -<%# @co_author_relations.each do |co_author_relation| %> - - <%= show_form.relation %> - <%= link_to 'Destroy', desktop_co_author_relation_path(show_form), confirm: 'Are you sure?', method: :delete, :class=>"bt-delete" %> - -<%# end %> + <% @co_author_relations.each_with_index do |co_author_relation,i| %> + <% if ( i % 6 ) == 0 %> +
    + +
    + <% end %> + <% end %> \ No newline at end of file diff --git a/app/views/desktop/co_author_relations/edit.html.erb b/app/views/desktop/co_author_relations/edit.html.erb new file mode 100644 index 00000000..0132d45b --- /dev/null +++ b/app/views/desktop/co_author_relations/edit.html.erb @@ -0,0 +1,3 @@ +<%= form_for(@co_author_relation, url: desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> + <%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%> +<% end %> diff --git a/app/views/desktop/co_author_relations/index.html.erb b/app/views/desktop/co_author_relations/index.html.erb index 106418ac..d457cbee 100644 --- a/app/views/desktop/co_author_relations/index.html.erb +++ b/app/views/desktop/co_author_relations/index.html.erb @@ -1,17 +1,22 @@ -

    Listing co_author_relations

    +
    +
    +
    +
    Create
    +
    +
      +
    • <%= render 'new' %>
    • +
    +
    +
    + <%= submit_tag "Back", :type => "button", class: "bt-cancel fn_btn ini_input hp hh2 thmtxt" %> +
    +
    -<%= submit_tag "Back", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %> -<%= render 'form' %> - - - - - - - - - - - <%= render :partial => 'show_form', :collection => @co_author_relations %> - -
    Relation
    +
    +
    +
    +
    + <%= render :partial => 'show_form'%> +
    +
    +
    diff --git a/app/views/desktop/co_authors/_form.html.erb b/app/views/desktop/co_authors/_form.html.erb index b087be95..2d8aa2d9 100644 --- a/app/views/desktop/co_authors/_form.html.erb +++ b/app/views/desktop/co_authors/_form.html.erb @@ -1,6 +1,6 @@
    <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn hh2 thmc2 thmtxt" %> - <%= submit_tag "Cancel", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %>
    diff --git a/app/views/desktop/co_authors/edit.html.erb b/app/views/desktop/co_authors/edit.html.erb index 015f6321..b2581353 100644 --- a/app/views/desktop/co_authors/edit.html.erb +++ b/app/views/desktop/co_authors/edit.html.erb @@ -1,3 +1,3 @@ -<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author) do |f| %> +<%= form_for @co_author_relation, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author_relation) do |f| %> <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> <% end %> diff --git a/app/views/desktop/co_authors/index.html.erb b/app/views/desktop/co_authors/index.html.erb index b01b2569..ec9e156d 100644 --- a/app/views/desktop/co_authors/index.html.erb +++ b/app/views/desktop/co_authors/index.html.erb @@ -1,28 +1,34 @@ -

    list all coauthor

    -<%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author" %> -<%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type" %> - - - - - - - - - - - - -<% @co_authors.each do |co_author| %> - - - - - - - -<% end %> - -
    NameEMailType
    <%= co_author.co_author %><%= co_author.email %><%= @co_author_relations.find(co_author.co_author_relations_id).relation \ - unless co_author.co_author_relations_id.nil?%><%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit" %><%= link_to 'Destroy', desktop_co_author_path(co_author), method: :delete, confirm: 'Are you sure?', :class=>"bt-delete" %>
    -
    +
    +
    + <%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt" %> + <%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt" %> +
    +
    +
    +
    +
    +
    + <% @co_authors.each_with_index do |co_author,i| %> + <% if ( i % 4 ) == 0 %> +
    +
      + <% end %> +
    • +
        +
      • <%= co_author.co_author %>
      • +
      • +
      • <%= @co_author_relations.find(co_author.co_author_relations_id).relation unless co_author.co_author_relations_id.nil?%>
      • +
      +
      + <%= link_to 'Edit', edit_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt" %> + <%= link_to 'Destroy', desktop_co_author_path(co_author), method: :delete, confirm: 'Are you sure?', :class=>"bt-delete admbg2 admtxt" %> +
      +
    • + <% if ( i % 4 ) == 3 %> +
    +
    + <% end %> + <% end %> +
    +
    +
    \ No newline at end of file diff --git a/app/views/desktop/co_authors/new.html.erb b/app/views/desktop/co_authors/new.html.erb index 1a4ec2d5..3fd7d2e1 100644 --- a/app/views/desktop/co_authors/new.html.erb +++ b/app/views/desktop/co_authors/new.html.erb @@ -1,3 +1,3 @@ <%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_authors_path do |f| %> - <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> + <%= render partial: 'desktop/co_author_relations/form', locals: {:f => f} %> <% end %> diff --git a/app/views/desktop/desktop.html.erb b/app/views/desktop/desktop.html.erb old mode 100755 new mode 100644 diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb old mode 100755 new mode 100644 diff --git a/app/views/desktop/journal_lists/_form.html.erb b/app/views/desktop/journal_lists/_form.html.erb deleted file mode 100644 index ac7f7ac6..00000000 --- a/app/views/desktop/journal_lists/_form.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -<%= form_for(@desktop_journal_list) do |f| %> - <% if @desktop_journal_list.errors.any? %> -
    -

    <%= pluralize(@desktop_journal_list.errors.count, "error") %> prohibited this desktop_journal_list from being saved:

    - - -
    - <% end %> - -
    - <%= f.submit %> -
    -<% end %> diff --git a/app/views/desktop/journal_lists/edit.html.erb b/app/views/desktop/journal_lists/edit.html.erb deleted file mode 100644 index d628e895..00000000 --- a/app/views/desktop/journal_lists/edit.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -

    Editing desktop_journal_list

    - -<%= render 'form' %> - -<%= link_to 'Show', @desktop_journal_list %> | -<%= link_to 'Back', desktop_journal_lists_path %> diff --git a/app/views/desktop/journal_lists/index.html.erb b/app/views/desktop/journal_lists/index.html.erb index fad6ca66..44c8ab9f 100644 --- a/app/views/desktop/journal_lists/index.html.erb +++ b/app/views/desktop/journal_lists/index.html.erb @@ -1,24 +1,40 @@ -

    journal_title -- journal_level

    - -
    -
    -
    -
    - - <% @journal_lists.each_with_index do |journal_list,i| %> - <% if ( i % 5 ) == 0 %> -
    -
      +
      +
      +
      Share
      +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + <% @journal_lists.each_with_index do |journal_list,i| %> + <% if ( i % 5 ) == 0 %> +
      +
        + <% end %> +
      • +
        + +
        + <% title, level = journal_list %> +
        <%= title %>
        +
        <%= level.join(",") %>
        +
      • + <% if ( i % 5 ) == 4 %> +
      +
      + <% end %> <% end %> -
    • - <%= journal_list %> -
    • - <% if ( i % 5 ) == 4 %> -
    -
    - <% end %> - <% end %> -
    diff --git a/app/views/desktop/journal_lists/new.html.erb b/app/views/desktop/journal_lists/new.html.erb deleted file mode 100644 index 95017361..00000000 --- a/app/views/desktop/journal_lists/new.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

    New desktop_journal_list

    - -<%= render 'form' %> - -<%= link_to 'Back', desktop_journal_lists_path %> diff --git a/app/views/desktop/journal_lists/show.html.erb b/app/views/desktop/journal_lists/show.html.erb deleted file mode 100644 index d454b78f..00000000 --- a/app/views/desktop/journal_lists/show.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -

    <%= notice %>

    - - -<%= link_to 'Edit', edit_desktop_journal_list_path(@desktop_journal_list) %> | -<%= link_to 'Back', desktop_journal_lists_path %> diff --git a/app/views/desktop/journal_pages/_form.html.erb b/app/views/desktop/journal_pages/_form.html.erb index 3a513034..c67745c4 100644 --- a/app/views/desktop/journal_pages/_form.html.erb +++ b/app/views/desktop/journal_pages/_form.html.erb @@ -1,33 +1,28 @@
    - <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn hh2 thmc2 thmtxt" %> + <%= f.submit "Save", name: "commit", value: "Save", class: "fn_btn ini_input hp hh2 thmc2 thmtxt" %> <% if not @writing_journal.new_record? %> - <%= submit_tag "Cancel", :type => "button", class: "bt-cancel fn_btn hh2 thmc2 thmtxt" %> + <%= submit_tag "Cancel", :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %> <% end %>
    -
    +
    Language
    -
    +
    -->
    Share
    @@ -74,15 +69,6 @@
    @@ -138,28 +124,21 @@ %> - - - - +
  • + <%= label_tag("", "Date of Publication", 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'} %> +
  • <%= f.text_field :keywords, size: "20", value: @writing_journal.keywords ||= "Keywords", class: "s_grid_6 s_grid"%>
  • -
    <%= f.label :year ,:class => "s_grid_2 s_grid" %>
    -
    <%= select_year((@writing_journal.year ? @writing_journal.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_journal[year]', :class => "s_grid_4 s_grid"} ) %>
    + <%= f.label :year ,:class => "s_grid_2 s_grid" %> + <%= select_year((@writing_journal.year ? @writing_journal.year.to_i : DateTime.now.year), {:start_year => DateTime.now.year, :end_year => 1930}, {:name => 'writing_journal[year]', :class => "s_grid_4 s_grid"} ) %>
  • -
    <%= f.label :language ,:class => "s_grid_2 s_grid" %>
    + <%= f.label :language ,:class => "s_grid_2 s_grid" %> - - - - - +
  • -