diff --git a/app/assets/stylesheets/lib/main-form-col2.css b/app/assets/stylesheets/lib/main-form-col2.css new file mode 100644 index 0000000..5b8d68d --- /dev/null +++ b/app/assets/stylesheets/lib/main-form-col2.css @@ -0,0 +1,13 @@ +.module-area .control-group { + display: inline-block; + width: 45%; + vertical-align: top; +} + +.module-area .control-group input { + max-width: 100%; +} + +.module-area .big-group { + width: 100%; +} \ No newline at end of file diff --git a/app/controllers/members_controller.rb b/app/controllers/members_controller.rb index aba6008..317bc7a 100644 --- a/app/controllers/members_controller.rb +++ b/app/controllers/members_controller.rb @@ -138,19 +138,42 @@ class MembersController < ApplicationController # member plugin plugins = OrbitApp::Plugin::Registration.all rescue nil plugin_list = plugins.collect.with_index do |plugin, idx| + intro = PersonalPluginIntro.find_by(member_profile_id: member.id, _type: "#{plugin.app_name}Intro") rescue nil - if !intro.blank? - if !intro.complete_list.blank? - plugin_data = plugin.app_name.constantize.where(member_profile_id: member) rescue nil - pd = plugin_data.collect do |p| - slug_title = ["JournalPaper","WritingConference"].include?(plugin.app_name) ? p.create_link : p.slug_title + + if intro.nil? or intro.complete_list + + plugin_data = plugin.app_name.constantize.where(member_profile_id: member) rescue nil + pd = plugin_data.collect do |p| + slug_title = ["JournalPaper","WritingConference"].include?(plugin.app_name) ? p.create_link : p.slug_title + { + "data_title" => slug_title, + "link_to_show" => OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore) + } + end + + if plugin.app_name == 'JournalPaper' or plugin.app_name == 'WritingConference' or plugin.app_name == 'Book' + + pd_title = {} + + plugin_datas = plugin_data.where(:is_hidden=>false).desc(:year).collect do |p| { - "data_title" => slug_title, - "link_to_show" => OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore) + "pd_datas" => [{ "data_title" => "#{p.create_link}" }] } end + + else + + datas = plugin.app_name.constantize.get_plugin_datas_to_member(plugin_data) + pd_title = datas[0] rescue {} + plugin_datas = datas[1] rescue {} + end + end + + if !intro.blank? + if !intro.brief_intro.blank? pdi = [] pdi << {"data_intro_title" => intro.text.html_safe} @@ -158,25 +181,38 @@ class MembersController < ApplicationController if intro.complete_list.blank? complete_display = "hide" + + pd_title = {} + plugin_datas = {} end if intro.brief_intro.blank? brief_display = "hide" + pdi = {} end + else + + pdi = [{"data_intro_title" => ''}] if !plugin_datas.blank? + end + { "plugin_data" => pd, + "pd_title" => pd_title, + "plugin_datas" => plugin_datas, "plugin_data_intro" => pdi, "complete_display" => complete_display, "brief_display" => brief_display, "plugin_name" => plugin.module_app_name.underscore, "plugin_title" => t('module_name.'+plugin.module_app_name.underscore), "plugin_class" => idx==0 ? "active" : "" - } + } + end - plugin_list = plugin_list.reject{|plugin| plugin['plugin_data'].blank? and plugin['plugin_data_intro'].blank?} + + plugin_list = plugin_list.reject{|plugin| plugin['plugin_datas'].blank? and plugin['plugin_data_intro'].blank?} { "plugins" => plugin_list, "profile_data" => profile_data, diff --git a/app/templates/orbit_bootstrap/modules/member/show.html.erb b/app/templates/orbit_bootstrap/modules/member/show.html.erb index a3be13b..e5fbfeb 100644 --- a/app/templates/orbit_bootstrap/modules/member/show.html.erb +++ b/app/templates/orbit_bootstrap/modules/member/show.html.erb @@ -16,14 +16,24 @@
- - - - - - + +
+ {{data_intro_title}} +
+ +
{{data_intro_title}}
{{data_title}}
+ + + + + + + + +
{{plugin_data_title}}
{{data_title}}
+
diff --git a/app/templates/orbit_bootstrap/modules/book/index.html.erb b/app/templates/orbit_bootstrap/modules/personal_book/index.html.erb similarity index 73% rename from app/templates/orbit_bootstrap/modules/book/index.html.erb rename to app/templates/orbit_bootstrap/modules/personal_book/index.html.erb index 6dd578a..1db63d4 100644 --- a/app/templates/orbit_bootstrap/modules/book/index.html.erb +++ b/app/templates/orbit_bootstrap/modules/personal_book/index.html.erb @@ -3,7 +3,8 @@ {{th_year}} - {{th_title}} + {{th_title}} + {{th_book_paper_type}} {{th_author}} @@ -11,6 +12,7 @@ {{year}}
{{book_title}} + {{book_paper_type}} {{author}} diff --git a/app/templates/orbit_bootstrap/modules/book/show.html.erb b/app/templates/orbit_bootstrap/modules/personal_book/show.html.erb similarity index 100% rename from app/templates/orbit_bootstrap/modules/book/show.html.erb rename to app/templates/orbit_bootstrap/modules/personal_book/show.html.erb diff --git a/app/templates/orbit_bootstrap/modules/journal_paper/index.html.erb b/app/templates/orbit_bootstrap/modules/personal_journal/index.html.erb similarity index 100% rename from app/templates/orbit_bootstrap/modules/journal_paper/index.html.erb rename to app/templates/orbit_bootstrap/modules/personal_journal/index.html.erb diff --git a/app/templates/orbit_bootstrap/modules/journal_paper/show.html.erb b/app/templates/orbit_bootstrap/modules/personal_journal/show.html.erb similarity index 100% rename from app/templates/orbit_bootstrap/modules/journal_paper/show.html.erb rename to app/templates/orbit_bootstrap/modules/personal_journal/show.html.erb diff --git a/app/templates/orbit_bootstrap/modules/personal_project/index.html.erb b/app/templates/orbit_bootstrap/modules/personal_project/index.html.erb index 3f2737d..8ede961 100644 --- a/app/templates/orbit_bootstrap/modules/personal_project/index.html.erb +++ b/app/templates/orbit_bootstrap/modules/personal_project/index.html.erb @@ -2,19 +2,23 @@

{{widget-title}}

- {{th_duration}} + {{th_year}} {{th_project_title}} - {{th_job_title}} {{th_participator}} - {{th_authors}} + {{th_job_title}} + {{th_duration}} + {{th_unit}} + {{th_authors}} - {{duration}} + {{year}} {{project_title}} - {{job_title}} {{participator}} + {{job_title}} + {{duration}} + {{unit}} {{authors}} diff --git a/built_in_extensions.rb b/built_in_extensions.rb index a80400a..dc87fb9 100644 --- a/built_in_extensions.rb +++ b/built_in_extensions.rb @@ -8,14 +8,14 @@ gem 'faq', git: 'http://gitlab.tp.rulingcom.com/saurabh/faq.git' #Personal Plugins gem 'personal_journal', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-journal.git' gem 'personal_conference', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-conference.git' +gem 'personal_book', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-book.git' +gem 'personal_project', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-project.git' +gem 'personal_patent', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-patent.git' +gem 'personal_research', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-research.git' +gem 'personal_lab', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-lab.git' gem 'personal_diploma', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-diploma.git' gem 'personal_experience', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-experience.git' gem 'personal_honor', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-honor.git' -gem 'personal_book', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-book.git' -gem 'personal_lab', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-lab.git' -gem 'personal_patent', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-patent.git' -gem 'personal_project', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-project.git' -gem 'personal_research', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-research.git' #widgets gem "site_menu_widget", git: 'http://gitlab.tp.rulingcom.com/saurabh/site-menu-widget.git'