From ded445aae35748ce2dfcdf904777bc3cd1acd2f2 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 8 Jan 2013 11:01:23 +0800 Subject: [PATCH 1/8] amend file value to correct format --- app/controllers/desktop_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index 4eef26be..bb3e12dc 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -117,8 +117,8 @@ class DesktopController< ApplicationController widge = DesktopWidget.find(tile.desktop_widget_id.to_s) # data_content = widge.widget_layout.file data_content = "/desktop/widget_layout?id="+tile.desktop_widget_id.to_s - jsfile = widge.javascripts.collect{|js| js.file} - cssfile = widge.css_default.file + jsfile = widge.javascripts.collect{|js| js.file.as_json[:file]} + cssfile = widge.css_default.file.as_json[:file] shape = widge.shape title = widge.name else @@ -212,4 +212,4 @@ class DesktopController< ApplicationController render :xml=>feed end -end \ No newline at end of file +end From 96ef70aba4491ca0a719f51d14c91ecd21b357f8 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 8 Jan 2013 15:53:02 +0800 Subject: [PATCH 2/8] move journal code to persional_journal modulaar --- app/helpers/desktop/co_author_relations_helper.rb | 2 -- app/helpers/desktop/journal_lists_helper.rb | 2 -- .../app}/assets/javascripts/desktop/journal_pages.js.erb | 0 .../personal_journal}/desktop/co_author_relations_controller.rb | 0 .../panel/personal_journal}/desktop/co_authors_controller.rb | 0 .../panel/personal_journal}/desktop/journal_lists_controller.rb | 0 .../panel/personal_journal}/desktop/journal_pages_controller.rb | 0 .../built_in_modules/personal_journal/app/models}/co_author.rb | 0 .../personal_journal/app/models}/co_author_relation.rb | 0 .../desktop/co_author_relations/_form.html.erb | 0 .../personal_journal}/desktop/co_author_relations/_new.html.erb | 0 .../desktop/co_author_relations/_show_form.html.erb | 0 .../personal_journal}/desktop/co_author_relations/edit.html.erb | 0 .../desktop/co_author_relations/index.html.erb | 0 .../panel/personal_journal}/desktop/co_authors/_form.html.erb | 0 .../panel/personal_journal}/desktop/co_authors/edit.html.erb | 0 .../panel/personal_journal}/desktop/co_authors/index.html.erb | 0 .../panel/personal_journal}/desktop/co_authors/new.html.erb | 0 .../panel/personal_journal}/desktop/co_authors/show.html.erb | 0 .../personal_journal}/desktop/journal_lists/index.html.erb | 0 .../views/panel/personal_journal}/desktop/journal_p.html.erb | 0 .../personal_journal}/desktop/journal_pages/_form.html.erb | 0 .../personal_journal}/desktop/journal_pages/_form_file.html.erb | 0 .../panel/personal_journal}/desktop/journal_pages/edit.html.erb | 0 .../personal_journal}/desktop/journal_pages/index.html.erb | 0 .../panel/personal_journal}/desktop/journal_pages/new.html.erb | 0 .../panel/personal_journal}/desktop/journal_pages/show.html.erb | 0 27 files changed, 4 deletions(-) delete mode 100644 app/helpers/desktop/co_author_relations_helper.rb delete mode 100644 app/helpers/desktop/journal_lists_helper.rb rename {app => vendor/built_in_modules/personal_journal/app}/assets/javascripts/desktop/journal_pages.js.erb (100%) rename {app/controllers => vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal}/desktop/co_author_relations_controller.rb (100%) rename {app/controllers => vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal}/desktop/co_authors_controller.rb (100%) rename {app/controllers => vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal}/desktop/journal_lists_controller.rb (100%) rename {app/controllers => vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal}/desktop/journal_pages_controller.rb (100%) rename {app/models/user => vendor/built_in_modules/personal_journal/app/models}/co_author.rb (100%) rename {app/models/user => vendor/built_in_modules/personal_journal/app/models}/co_author_relation.rb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_author_relations/_form.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_author_relations/_new.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_author_relations/_show_form.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_author_relations/edit.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_author_relations/index.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_authors/_form.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_authors/edit.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_authors/index.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_authors/new.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/co_authors/show.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_lists/index.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_p.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/_form.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/_form_file.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/edit.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/index.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/new.html.erb (100%) rename {app/views => vendor/built_in_modules/personal_journal/app/views/panel/personal_journal}/desktop/journal_pages/show.html.erb (100%) diff --git a/app/helpers/desktop/co_author_relations_helper.rb b/app/helpers/desktop/co_author_relations_helper.rb deleted file mode 100644 index fa03bbae..00000000 --- a/app/helpers/desktop/co_author_relations_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Desktop::CoAuthorRelationsHelper -end diff --git a/app/helpers/desktop/journal_lists_helper.rb b/app/helpers/desktop/journal_lists_helper.rb deleted file mode 100644 index e21dc09f..00000000 --- a/app/helpers/desktop/journal_lists_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module Desktop::JournalListsHelper -end diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb similarity index 100% rename from app/assets/javascripts/desktop/journal_pages.js.erb rename to vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb diff --git a/app/controllers/desktop/co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb similarity index 100% rename from app/controllers/desktop/co_author_relations_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb diff --git a/app/controllers/desktop/co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb similarity index 100% rename from app/controllers/desktop/co_authors_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb diff --git a/app/controllers/desktop/journal_lists_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb similarity index 100% rename from app/controllers/desktop/journal_lists_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb diff --git a/app/controllers/desktop/journal_pages_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb similarity index 100% rename from app/controllers/desktop/journal_pages_controller.rb rename to vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb diff --git a/app/models/user/co_author.rb b/vendor/built_in_modules/personal_journal/app/models/co_author.rb similarity index 100% rename from app/models/user/co_author.rb rename to vendor/built_in_modules/personal_journal/app/models/co_author.rb diff --git a/app/models/user/co_author_relation.rb b/vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb similarity index 100% rename from app/models/user/co_author_relation.rb rename to vendor/built_in_modules/personal_journal/app/models/co_author_relation.rb diff --git a/app/views/desktop/co_author_relations/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_form.html.erb diff --git a/app/views/desktop/co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/_new.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb diff --git a/app/views/desktop/co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/_show_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb diff --git a/app/views/desktop/co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/edit.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb diff --git a/app/views/desktop/co_author_relations/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb similarity index 100% rename from app/views/desktop/co_author_relations/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/index.html.erb diff --git a/app/views/desktop/co_authors/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb similarity index 100% rename from app/views/desktop/co_authors/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/_form.html.erb diff --git a/app/views/desktop/co_authors/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb similarity index 100% rename from app/views/desktop/co_authors/edit.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb diff --git a/app/views/desktop/co_authors/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb similarity index 100% rename from app/views/desktop/co_authors/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb diff --git a/app/views/desktop/co_authors/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb similarity index 100% rename from app/views/desktop/co_authors/new.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb diff --git a/app/views/desktop/co_authors/show.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/show.html.erb similarity index 100% rename from app/views/desktop/co_authors/show.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/show.html.erb diff --git a/app/views/desktop/journal_lists/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_lists/index.html.erb similarity index 100% rename from app/views/desktop/journal_lists/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_lists/index.html.erb diff --git a/app/views/desktop/journal_p.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb similarity index 100% rename from app/views/desktop/journal_p.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb diff --git a/app/views/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb similarity index 100% rename from app/views/desktop/journal_pages/_form.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb diff --git a/app/views/desktop/journal_pages/_form_file.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form_file.html.erb similarity index 100% rename from app/views/desktop/journal_pages/_form_file.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form_file.html.erb diff --git a/app/views/desktop/journal_pages/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb similarity index 100% rename from app/views/desktop/journal_pages/edit.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb diff --git a/app/views/desktop/journal_pages/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb similarity index 100% rename from app/views/desktop/journal_pages/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/index.html.erb diff --git a/app/views/desktop/journal_pages/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb similarity index 100% rename from app/views/desktop/journal_pages/new.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb diff --git a/app/views/desktop/journal_pages/show.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb similarity index 100% rename from app/views/desktop/journal_pages/show.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb From 49381983570b6a5665ef2a4b98c1a58c63ec5b4b Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Tue, 8 Jan 2013 18:12:28 +0800 Subject: [PATCH 3/8] modularized personal journal --- .../desktop_publications_controller.rb | 6 +- app/views/desktop/index.html.erb | 174 +++++++++--------- config/routes.rb | 36 ++-- .../javascripts/desktop/journal_pages.js.erb | 4 +- .../desktop/co_author_relations_controller.rb | 2 +- .../desktop/co_authors_controller.rb | 2 +- .../desktop/journal_lists_controller.rb | 18 +- .../desktop/journal_p_controller.rb | 5 + .../desktop/journal_pages_controller.rb | 22 ++- .../desktop/co_author_relations/_new.html.erb | 4 +- .../co_author_relations/_show_form.html.erb | 22 +-- .../desktop/co_author_relations/edit.html.erb | 4 +- .../desktop/co_authors/edit.html.erb | 4 +- .../desktop/co_authors/index.html.erb | 8 +- .../desktop/co_authors/new.html.erb | 4 +- .../desktop/journal_p.html.erb | 8 +- .../desktop/journal_pages/edit.html.erb | 4 +- .../desktop/journal_pages/new.html.erb | 4 +- .../desktop/journal_pages/show.html.erb | 2 - .../personal_journal/config/routes.rb | 32 ++-- 20 files changed, 185 insertions(+), 180 deletions(-) create mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb diff --git a/app/controllers/desktop_publications_controller.rb b/app/controllers/desktop_publications_controller.rb index 6c38de37..ae77ed19 100644 --- a/app/controllers/desktop_publications_controller.rb +++ b/app/controllers/desktop_publications_controller.rb @@ -1,9 +1,9 @@ require 'mime/types' class DesktopPublicationsController< ApplicationController - def journal_p - render "desktop/journal_p", :layout => false - end + #def journal_p + # render "desktop/journal_p", :layout => false + #end def books render "desktop/books", :layout => false diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index 9ce9df2f..739090c2 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -1,104 +1,104 @@
-
-
    -
  • Home -
      -
    • App Manager
    • -
    • All Sections
    • -
    • Settings
    • -
    -
  • -
  • Publication -
      - -
    • Journal Papers
    • +
      +
        +
      • Home +
          +
        • App Manager
        • +
        • All Sections
        • +
        • Settings
        • +
        +
      • +
      • Publication +
          -
        • Seminar Papers
        • +
        • Journal Papers
        • -
        • Books
        • +
        • Seminar Papers
        • -
        -
      • -
      • Research -
          -
        • Research Domain
        • -
        • Research Project
        • -
        • Patents
        • -
        • Labs
        • -
        -
      • -
      • Experience -
          -
        • Working
        • -
        • Education
        • -
        • Honors
        • -
        • Activities
        • -
        • Clubs
        • -
        -
      • -
      • Learning & Teaching -
          -
        • Courses
        • -
        • Homework
        • -
        • Certification
        • -
        -
      • -
      • Personal -
          -
        • myPage
        • -
        • Blog
        • -
        • Album
        • -
        • Calendar
        • -
        • Files
        • -
        -
      • -
      • Orbit -
          -
        • Academia Connection
        • -
        -
      • -
      • AppStore
      • -
      -
      -
      +
    • Books
    • + +
    +
  • +
  • Research +
      +
    • Research Domain
    • +
    • Research Project
    • +
    • Patents
    • +
    • Labs
    • +
    +
  • +
  • Experience +
      +
    • Working
    • +
    • Education
    • +
    • Honors
    • +
    • Activities
    • +
    • Clubs
    • +
    +
  • +
  • Learning & Teaching +
      +
    • Courses
    • +
    • Homework
    • +
    • Certification
    • +
    +
  • +
  • Personal +
      +
    • myPage
    • +
    • Blog
    • +
    • Album
    • +
    • Calendar
    • +
    • Files
    • +
    +
  • +
  • Orbit +
      +
    • Academia Connection
    • +
    +
  • +
  • AppStore
  • +
+
+
- -
- - -
+ +
+ + +
diff --git a/config/routes.rb b/config/routes.rb index 20ddb31f..3065f341 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -40,7 +40,6 @@ Orbit::Application.routes.draw do end end - match 'ad_banners/:id/preview' => 'ad_banners#realtime_preview',:as => :realtime_preview_ad_banner,:via => :put match 'ad_banners/:id/rename' => 'ad_banners#rename',:as => :rename_ad_banner,:via => :post @@ -51,6 +50,7 @@ Orbit::Application.routes.draw do end resources :ad_images ,:except => [:show,:index] end + resources :dashboards resources :designs do collection do @@ -64,22 +64,27 @@ Orbit::Application.routes.draw do post 'upload_image' => 'designs#upload_image' end end + resources :infos do get 'add_attribute_field' end + resources :items + match 'update_position' => 'items#update_position' resources :links do member do get 'delete' end end + resources :pages do member do get 'delete' get 'reload_themes' end end + resources :module_apps do match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post @@ -99,6 +104,7 @@ Orbit::Application.routes.draw do get 'reload_frontend_pages' end end + resources :page_parts do member do get 'reload_widgets' @@ -106,6 +112,7 @@ Orbit::Application.routes.draw do get 'reload_r_tag_options' end end + resources :plugins resources :purchases do collection do @@ -116,10 +123,12 @@ Orbit::Application.routes.draw do get 'download' end end + resources :roles do get 'add_sub_role' get 'add_attribute_field' end + resources :sites do get 'mail_setting' get 'site_info' @@ -130,18 +139,20 @@ Orbit::Application.routes.draw do get 'ui_theme' get 'change_design' end + resources :tags resources :users + resources :users_new_interface do member do get 'temp_edit' end end - + resources :member_selects do - match 'member_select_search' => "member_selects#member_select_search" ,:as => :member_select_search,:via => "post" - match 'member_select_add' => "member_selects#member_select_add" ,:as => :member_select_add,:via => "post" - end + match 'member_select_search' => "member_selects#member_select_search" ,:as => :member_select_search,:via => "post" + match 'member_select_add' => "member_selects#member_select_add" ,:as => :member_select_add,:via => "post" + end match 'module_store' => 'module_store#index' match 'module_store/show' => 'module_store#show' @@ -181,16 +192,7 @@ Orbit::Application.routes.draw do match '/desktop/widget_layout' => 'desktop#widget_layout' match '/desktop/temp_func/'=>'desktop#temp_func' - namespace :desktop do - match '/journal_pages/get_journals_json' => 'journal_pages#get_journals_json' - resources :journal_pages, except: :show - resources :journal_lists, only: :index - resources :co_authors, except: :show - resources :co_author_relations, except: :show - end - # namespace :desktop_publications do - match 'desktop_publications/journal_p'=>'desktop_publications#journal_p' match 'desktop_publications/books' => 'desktop_publications#books' match 'desktop_publications/books_list'=>'desktop_publications#books_list' match 'desktop_publications/books_add'=>'desktop_publications#books_add' @@ -226,12 +228,6 @@ Orbit::Application.routes.draw do match '/desktop_orbit/eventajaxload'=> 'desktop_orbit#eventajaxload' match '/desktop_orbit/gettimelinespan' => 'desktop_orbit#gettimelinespan' - - #match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal' - #match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal' - # match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal' - - scope '/front' do match 'show_banner/:id' => 'front#show_banner', :as => :front_show_banner match 'show_footer' => 'front#show_footer', :as => :front_show_footer diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb index 79f1d17e..a16830ba 100644 --- a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb @@ -50,7 +50,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // return false; }) } - + var bindSecondaryHandlers = function(){ $("#journal_p div#paper_list a.icon-check-empty").click(function(){ if($(this).hasClass("icon-check-empty")){ @@ -177,7 +177,7 @@ orbitDesktop.prototype.initializeJournalPapers = function(target,url,cache){ // } var getData = function(){ - $.getJSON("/desktop/journal_pages/get_journals_json",function(journals){ + $.getJSON("/panel/personal_journal/desktop/get_journals_json",function(journals){ journalData = eval(journals); journalview(); bindHandlers(); diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb index f07cc07d..26b5acd9 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_author_relations_controller.rb @@ -1,4 +1,4 @@ -class Desktop::CoAuthorRelationsController < ApplicationController +class Panel::PersonalJournal::Desktop::CoAuthorRelationsController < ApplicationController def index @co_author_relations = CoAuthorRelation.all new diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb index 6d7b41d6..b9e1deaa 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/co_authors_controller.rb @@ -1,4 +1,4 @@ -class Desktop::CoAuthorsController < ApplicationController +class Panel::PersonalJournal::Desktop::CoAuthorsController < ApplicationController def index nils, not_nils = CoAuthor.where(name_id: current_user.id)\ .asc(:co_author).partition{|p| p.email.nil?} diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb index 2667a5a7..b7d05a24 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb @@ -1,18 +1,2 @@ -class Desktop::JournalListsController < ApplicationController - def index - level_types = JournalLevelType.all - all_journal_lists = WritingJournal.where(create_user_id: current_user.id) - all_journal_lists = all_journal_lists.map do |j| - [ j.journal_title, - j.journal_level_type_ids.map do |type| - level_types.find(type).title - end] - end - - @journal_lists = all_journal_lists.uniq - - respond_to do |format| - format.html { render :layout => false} - end - end +class Panel::PersonalJournal::Desktop::JournalListsController < ApplicationController end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb new file mode 100644 index 00000000..3526d6ff --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_p_controller.rb @@ -0,0 +1,5 @@ +class Panel::PersonalJournal::Desktop::JournalPController < ApplicationController + def journal_p + render panel_personal_journal_desktop_journal_p_path, :layout => false + end +end diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb index 8a2312b8..9599ce9a 100644 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb +++ b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_pages_controller.rb @@ -1,4 +1,4 @@ -class Desktop::JournalPagesController < ApplicationController +class Panel::PersonalJournal::Desktop::JournalPagesController < ApplicationController def index @writing_journal = WritingJournal.where(create_user_id: current_user.id) @level_types = JournalLevelType.all @@ -89,8 +89,8 @@ class Desktop::JournalPagesController < ApplicationController abstract: publication.abstract, coauthors: publication.authors, year: publication.year, - url_edit: edit_desktop_journal_page_path(publication), - url_delete: desktop_journal_page_path(publication), + url_edit: edit_panel_personal_journal_desktop_journal_page_path(publication), + url_delete: panel_personal_journal_desktop_journal_page_path(publication), files: publication.writing_journal_files.collect{|file| {title: file.title, url: file.file.url, icon: check_file_type(file.file.url)} } @@ -104,4 +104,20 @@ class Desktop::JournalPagesController < ApplicationController render json: JSON.pretty_generate(data) end + def journal_type + level_types = JournalLevelType.all + all_journal_lists = WritingJournal.where(create_user_id: current_user.id) + all_journal_lists = all_journal_lists.map do |j| + [ j.journal_title, + j.journal_level_type_ids.map do |type| + level_types.find(type).title + end] + end + + @journal_lists = all_journal_lists.uniq + + respond_to do |format| + format.html { render :layout => false} + end + end end diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb index fc0d0891..68bf9ed6 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_new.html.erb @@ -1,3 +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}%> +<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb index ad943e45..246f0413 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/_show_form.html.erb @@ -2,16 +2,16 @@ <% if ( i % 6 ) == 0 %>
    - <% end %> -
  • -
    <%= co_author_relation.relation %>
    -
    - <%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> - <%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %> -
    -
  • - <% if ( i % 6 ) == 5 %> -
+ <% end %> +
  • +
    <%= co_author_relation.relation %>
    +
    + <%= link_to 'Edit', edit_panel_personal_journal_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_journal_desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
    +
  • + <% if ( i % 6 ) == 5 %> + +
    <% end %> -<% end %> \ No newline at end of file +<% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb index 0132d45b..66fc1dff 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_author_relations/edit.html.erb @@ -1,3 +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}%> +<%= form_for(@co_author_relation, url: panel_personal_journal_desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_author_relations/form' , locals: {:f => f}%> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb index 015f6321..a8250528 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/edit.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/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| %> - <%= render partial: 'desktop/co_authors/form', locals: {:f => f} %> +<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_author_path(@co_author) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb index 4c8e297e..d216e33e 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/index.html.erb @@ -1,7 +1,7 @@
    - <%= link_to "New Co-Author", new_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> - <%= link_to "New Type", desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> + <%= link_to "New Co-Author", new_panel_personal_journal_desktop_co_author_path, :class=>"bt-co-author fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %> + <%= link_to "New Type", panel_personal_journal_desktop_co_author_relations_path, :class=>"bt-new-type fn_btn hp hh2 thmc2 thmtxt", "ajax-remote"=>"get" %>
    @@ -20,8 +20,8 @@
  • <%= @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", "ajax-remote"=>"get" %> - <%= link_to 'Destroy', desktop_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %> + <%= link_to 'Edit', edit_panel_personal_journal_desktop_co_author_path(co_author), :class => "bt-edit admbg2 admtxt", "ajax-remote"=>"get" %> + <%= link_to 'Destroy', panel_personal_journal_desktop_co_author_path(co_author), "ajax-remote"=>"delete", "confirm-message"=>'Are you sure?', "callback-method"=>"paperDelete", :class=>"bt-delete admbg2 admtxt" %>
    <% if ( i % 4 ) == 3 %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb index 1a4ec2d5..ed12b132 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/co_authors/new.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/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} %> +<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: panel_personal_journal_desktop_co_authors_path do |f| %> + <%= render partial: 'panel/personal_journal/desktop/co_authors/form', locals: {:f => f} %> <% end %> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb index d5526450..44248371 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb @@ -13,10 +13,10 @@
      -
    • List
    • -
    • Add/Edit
    • -
    • Journals
    • -
    • Co-Authors
    • +
    • List
    • +
    • Add/Edit
    • +
    • Journals
    • +
    • Co-Authors
    • Tags & Keywords
    • Analysis
    • Import
    • diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb index 80d8ae2e..3811274a 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/edit.html.erb @@ -1,3 +1,3 @@ -<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_page_path(@writing_journal) do |f| %> - <%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %> +<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_journal_desktop_journal_page_path(@writing_journal) do |f| %> + <%= render partial: 'panel/personal_journal/desktop/journal_pages/form', locals: {:f => f} %> <%end%> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb index c872e7cf..82480c21 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/new.html.erb @@ -1,3 +1,3 @@ -<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_pages_path do |f| %> - <%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %> +<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: panel_personal_journal_desktop_journal_pages_path do |f| %> + <%= render partial: 'panel/personal_journal/desktop/journal_pages/form', locals: {:f => f} %> <%end%> diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb index f2a44a9c..e69de29b 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/show.html.erb @@ -1,2 +0,0 @@ -

      Desktop::JournalPages#show

      -

      Find me in app/views/desktop/journal_pages/show.html.erb

      diff --git a/vendor/built_in_modules/personal_journal/config/routes.rb b/vendor/built_in_modules/personal_journal/config/routes.rb index fd80bf0f..8e170854 100644 --- a/vendor/built_in_modules/personal_journal/config/routes.rb +++ b/vendor/built_in_modules/personal_journal/config/routes.rb @@ -1,40 +1,46 @@ Rails.application.routes.draw do - namespace :panel do namespace :personal_journal do + namespace :desktop do + match 'journal_p'=>'journal_p#journal_p' + match 'get_journals_json' => 'journal_pages#get_journals_json' + resources :journal_pages, except: :show + resources :journal_lists, only: :index + resources :co_authors, except: :show + resources :co_author_relations, except: :show + end + namespace :back_end do - match 'writing_journal_setting' => "writing_journals#writing_journal_setting" ,:as => :writing_journal_setting - resources :writing_journals do collection do get 'delete' end - + match "level_type_quick_add" => "writing_journals#level_type_quick_add" ,:as => :level_type_quick_add match "level_type_quick_edit" => "writing_journals#level_type_quick_edit" ,:as => :level_type_quick_edit - match "author_type_quick_add" => "writing_journals#author_type_quick_add" ,:as => :author_type_quick_add match "author_type_quick_edit" => "writing_journals#author_type_quick_edit" ,:as => :author_type_quick_edit - match "paper_type_quick_add" => "writing_journals#paper_type_quick_add" ,:as => :paper_type_quick_add match "paper_type_quick_edit" => "writing_journals#paper_type_quick_edit" ,:as => :paper_type_quick_edit - match "tag_quick_add" => "writing_journals#tag_quick_add" ,:as => :tag_quick_add match "tag_quick_edit" => "writing_journals#tag_quick_edit" ,:as => :tag_quick_edit end - - resources :journal_paper_types - resources :journal_author_types - resources :journal_level_types + + resources :journal_paper_types + resources :journal_author_types + resources :journal_level_types resources :tags end + namespace :front_end do resources :writing_journals end + namespace :plugin do resources :writing_journals end + namespace :widget do match "writing_journals" => "writing_journals#index" match "home_list" => "writing_journals#home_list" @@ -42,6 +48,6 @@ Rails.application.routes.draw do end end end - match "/appfront/*path" => redirect("/panel/*path") - + match "/appfront/*path" => redirect("/panel/*path") + end From bc3cba5ebc3d99f5dd5a1442721f65f7e0682969 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 9 Jan 2013 10:57:52 +0800 Subject: [PATCH 4/8] fixed journal type page --- app/assets/javascripts/desktop.js | 3 +-- .../personal_journal/app/assets/javascripts/desktop.js | 8 ++++++++ .../app/assets/javascripts/personal_journal/.gitkeep | 0 .../panel/personal_journal/desktop/journal_p.html.erb | 2 +- .../journal_type.html.erb} | 0 vendor/built_in_modules/personal_journal/config/routes.rb | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js delete mode 100644 vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/.gitkeep rename vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/{journal_lists/index.html.erb => journal_pages/journal_type.html.erb} (100%) diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index a0fad151..df73f9e0 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -14,6 +14,5 @@ //= require orbitdesktopAPI //= require orbitTimeline //= require orbitdesktop -//= require desktop/journal_pages //= require desktop/seminar_pages -//= require desktop/books_pages \ No newline at end of file +//= require desktop/books_pages diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js new file mode 100644 index 00000000..85982324 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js @@ -0,0 +1,8 @@ +// This is a manifest file that'll be compiled into including all the files listed below. +// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically +// be included in the compiled file accessible from http://example.com/assets/application.js +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// the compiled file. +// +//= require desktop/journal_pages + diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/.gitkeep b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb index 44248371..87255b06 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_p.html.erb @@ -15,7 +15,7 @@
      • List
      • Add/Edit
      • -
      • Journals
      • +
      • Journals
      • Co-Authors
      • Tags & Keywords
      • Analysis
      • diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_lists/index.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb similarity index 100% rename from vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_lists/index.html.erb rename to vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/journal_type.html.erb diff --git a/vendor/built_in_modules/personal_journal/config/routes.rb b/vendor/built_in_modules/personal_journal/config/routes.rb index 8e170854..a92ee50c 100644 --- a/vendor/built_in_modules/personal_journal/config/routes.rb +++ b/vendor/built_in_modules/personal_journal/config/routes.rb @@ -4,8 +4,8 @@ Rails.application.routes.draw do namespace :desktop do match 'journal_p'=>'journal_p#journal_p' match 'get_journals_json' => 'journal_pages#get_journals_json' + match 'journal_type' => 'journal_pages#journal_type' resources :journal_pages, except: :show - resources :journal_lists, only: :index resources :co_authors, except: :show resources :co_author_relations, except: :show end From 97eb9e19f985ff1239efb8460ba7b6867b5df6d5 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 9 Jan 2013 14:40:58 +0800 Subject: [PATCH 5/8] restore js,journal_pages.js, --- app/assets/javascripts/desktop.js | 3 ++- .../assets/javascripts/desktop/journal_pages.js.erb | 0 .../personal_journal/app/assets/javascripts/desktop.js | 8 -------- 3 files changed, 2 insertions(+), 9 deletions(-) rename {vendor/built_in_modules/personal_journal/app => app}/assets/javascripts/desktop/journal_pages.js.erb (100%) delete mode 100644 vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index df73f9e0..a0fad151 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -14,5 +14,6 @@ //= require orbitdesktopAPI //= require orbitTimeline //= require orbitdesktop +//= require desktop/journal_pages //= require desktop/seminar_pages -//= require desktop/books_pages +//= require desktop/books_pages \ No newline at end of file diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb b/app/assets/javascripts/desktop/journal_pages.js.erb similarity index 100% rename from vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js.erb rename to app/assets/javascripts/desktop/journal_pages.js.erb diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js deleted file mode 100644 index 85982324..00000000 --- a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop.js +++ /dev/null @@ -1,8 +0,0 @@ -// This is a manifest file that'll be compiled into including all the files listed below. -// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically -// be included in the compiled file accessible from http://example.com/assets/application.js -// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the -// the compiled file. -// -//= require desktop/journal_pages - From bc031f34f684e6a4eef39642d5286e291f1dc81e Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 9 Jan 2013 16:16:47 +0800 Subject: [PATCH 6/8] move js file to relational module but have js require problem --- app/assets/javascripts/desktop.js | 2 +- .../javascripts/desktop/{books_pages.js.erb => books_pages.js} | 0 .../desktop/{seminar_pages.js.erb => seminar_pages.js} | 0 .../app/assets/javascripts/desktop/journal_pages.js | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename app/assets/javascripts/desktop/{books_pages.js.erb => books_pages.js} (100%) rename app/assets/javascripts/desktop/{seminar_pages.js.erb => seminar_pages.js} (100%) rename app/assets/javascripts/desktop/journal_pages.js.erb => vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js (100%) diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index a0fad151..c519e4b0 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -15,5 +15,5 @@ //= require orbitTimeline //= require orbitdesktop //= require desktop/journal_pages +//= require desktop/books_pages //= require desktop/seminar_pages -//= require desktop/books_pages \ No newline at end of file diff --git a/app/assets/javascripts/desktop/books_pages.js.erb b/app/assets/javascripts/desktop/books_pages.js similarity index 100% rename from app/assets/javascripts/desktop/books_pages.js.erb rename to app/assets/javascripts/desktop/books_pages.js diff --git a/app/assets/javascripts/desktop/seminar_pages.js.erb b/app/assets/javascripts/desktop/seminar_pages.js similarity index 100% rename from app/assets/javascripts/desktop/seminar_pages.js.erb rename to app/assets/javascripts/desktop/seminar_pages.js diff --git a/app/assets/javascripts/desktop/journal_pages.js.erb b/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js similarity index 100% rename from app/assets/javascripts/desktop/journal_pages.js.erb rename to vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js From c888d9cae426920be55789cda31466d7ce8483dd Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 11 Jan 2013 10:55:19 +0800 Subject: [PATCH 7/8] modularize personal journal and pull relational setting in desktop/index.rb --- app/assets/javascripts/desktop.js | 1 - app/views/desktop/index.html.erb | 1 + .../personal_journal/app/assets/javascripts/personal_journal.js | 1 + .../javascripts/{ => personal_journal}/desktop/journal_pages.js | 0 4 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js rename vendor/built_in_modules/personal_journal/app/assets/javascripts/{ => personal_journal}/desktop/journal_pages.js (100%) diff --git a/app/assets/javascripts/desktop.js b/app/assets/javascripts/desktop.js index c519e4b0..e5e4a05a 100644 --- a/app/assets/javascripts/desktop.js +++ b/app/assets/javascripts/desktop.js @@ -14,6 +14,5 @@ //= require orbitdesktopAPI //= require orbitTimeline //= require orbitdesktop -//= require desktop/journal_pages //= require desktop/books_pages //= require desktop/seminar_pages diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index 739090c2..01903447 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -102,3 +102,4 @@ var od = new orbitDesktop("#ajax_container"); o.notify("Welcome "+o.currentUsername+"!!","alert",3); +<%= javascript_include_tag "personal_journal" %> diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js new file mode 100644 index 00000000..57fc98e4 --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal.js @@ -0,0 +1 @@ +//= require_tree ./personal_journal/desktop diff --git a/vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js b/vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js similarity index 100% rename from vendor/built_in_modules/personal_journal/app/assets/javascripts/desktop/journal_pages.js rename to vendor/built_in_modules/personal_journal/app/assets/javascripts/personal_journal/desktop/journal_pages.js From c224d04a700c860f55d7df25d6ed8cfd3c87a633 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 11 Jan 2013 16:11:46 +0800 Subject: [PATCH 8/8] correct personal journal language, but now hava no language config --- .../desktop/journal_lists_controller.rb | 2 - .../desktop/journal_pages/_form.html.erb | 88 +++++++++---------- .../desktop/journal_pages/_form_file.html.erb | 12 ++- 3 files changed, 52 insertions(+), 50 deletions(-) delete mode 100644 vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb diff --git a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb b/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb deleted file mode 100644 index b7d05a24..00000000 --- a/vendor/built_in_modules/personal_journal/app/controllers/panel/personal_journal/desktop/journal_lists_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class Panel::PersonalJournal::Desktop::JournalListsController < ApplicationController -end diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb index de144196..431fe8ce 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/desktop/journal_pages/_form.html.erb @@ -6,23 +6,6 @@ <%= submit_tag "Cancel", :type => "button", class: "bt-cancel ini_input hp hh2 thmadm thmtxt" %> <% end %>
    -
    Share
    @@ -46,15 +29,28 @@
    • - <%= f.text_area :paper_title, size: "20x2", placeholder: "Paper Title", class: "s_grid_6 s_grid"%> + <%= 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 %>
    • - <%= f.text_field :journal_title, size: "20", placeholder: "Journal Title", class: "s_grid_6 s_grid", "autocomplete-list" => "journal_title_autocomplete_list" %> + <%= f.fields_for :journal_title_translations do |f| %> + <%= f.text_field locale, + size: "20", + placeholder: t("personal_journal.journal_title"), + class: "s_grid_6 s_grid", + "autocomplete-list" => "journal_title_autocomplete_list", + value: (@writing_journal.journal_title_translations[locale] rescue nil) %> + <% end %>
    • - <%= label_tag("", "Journal Level") %> + <%= label_tag("", t("personal_journal.level_type")) %>
        <% @level_types.each_with_index do |level_type, i| %>
      • @@ -66,23 +62,19 @@
      • <% end %>
      -
    • - <%= label_tag("", "ISSN(ISBN)", class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.isbn"), class: "s_grid_2 s_grid") %><%= f.text_field :isbn, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
    • - <%= label_tag("", "Volume No.", class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.vol_no"), class: "s_grid_2 s_grid") %><%= f.text_field :vol_no, size: "20", placeholder: "829872987", class: "s_grid_4 s_grid"%>
    • - <%= label_tag("", "Issue No.", class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%> + <%= label_tag("", t("personal_journal.issue_no"), class: "s_grid_2 s_grid") %><%= f.text_field :issue_no, size: "20", placeholder:"829872987", class: "s_grid_4 s_grid"%>
    • @@ -90,20 +82,28 @@
    • - <%= label_tag("", "Pages", class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%> + <%= label_tag("", t("personal_journal.total_pages"), class: "s_grid_2 s_grid") %><%= label_tag("", "from", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_start, size: "10", placeholder: "1", class: "s_grid_1 s_grid"%><%= label_tag("", "to", class: "s_grid_1 s_grid") %><%= f.text_field :form_to_end, size: "10", placeholder: "20", class: "s_grid_1 s_grid"%>
    • - <%= f.text_area :authors, size: "20x2", placeholder: "Authors", class: "s_grid_6 s_grid", "autocomplete-list" => "coauthor_autocomplete_list"%> + <%= f.fields_for :authors_translations do |f| %> + <%= f.text_area locale, + class: "s_grid_6 s_grid", + size: "20x2", + placeholder: t("web_resource.authors"), + "autocomplete-list" => "coauthor_autocomplete_list", + value: (@writing_journal.authors_translations[locale] rescue nil) %> + <% end %>
    • <%= options_for_select( - @paper_types.map do |paper_type| - [paper_type.title, paper_type.id] - end - ) - %> + [t("personal_journal.level_type")] + + @paper_types.map do |paper_type| + [paper_type.title, paper_type.id] + end + ) + %>
    • - <%= label_tag("", "Date of Publication", class: "s_grid_3 s_grid") %> + <%= label_tag("", t("personal_journal.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'} %>
    • - <%= f.text_field :keywords, size: "20", value: @writing_journal.keywords ||= "Keywords", class: "s_grid_6 s_grid"%> + <%= f.text_field :keywords, size: "20", placeholder: t("personal_journal.keywords"), class: "s_grid_6 s_grid"%>
    • - <%= f.label :year ,:class => "s_grid_2 s_grid" %> + <%= f.label :year, t("personal_journal.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" %> -
    • @@ -214,8 +212,6 @@ orbitDesktop.prototype.initializeJournalPapers.coauthor_autocomplete_list = <%= @co_author_candidate.to_json.html_safe %>; - -<%= javascript_include_tag "archive_plugin_form" %>