forked from saurabh/orbit4-5
Merge branch 'development' of gitlab.tp.rulingcom.com:saurabh/orbit4-5
This commit is contained in:
commit
e824e23e0a
|
@ -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%;
|
||||
}
|
|
@ -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" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,plugin.module_app_name.underscore)}'>#{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,
|
||||
|
|
|
@ -16,14 +16,24 @@
|
|||
</ul>
|
||||
<div class="tab-content" data-list="plugins" data-level="0">
|
||||
<div class="tab-pane {{plugin_class}}" id="{{plugin_name}}">
|
||||
<table class="table table-hover table-striped">
|
||||
<tbody data-list="plugin_data_intro" data-level="1">
|
||||
<tr class="{{brief_display}}"><td>{{data_intro_title}}</td></tr>
|
||||
</tbody>
|
||||
<tbody data-list="plugin_data" data-level="1">
|
||||
<tr><td class="{{complete_display}}"><a href="{{link_to_show}}">{{data_title}}</a></td></tr>
|
||||
|
||||
<div class="info" data-list="plugin_data_intro" data-level="1">
|
||||
{{data_intro_title}}
|
||||
</div>
|
||||
|
||||
<table class="table table-hover table-striped {{complete_display}}">
|
||||
<thead>
|
||||
<tr data-list="pd_title" data-level="1">
|
||||
<th>{{plugin_data_title}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-level="1" data-list="plugin_datas">
|
||||
<tr data-level="2" data-list="pd_datas">
|
||||
<td>{{data_title}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">{{th_year}}</th>
|
||||
<th class="col-md-9">{{th_title}}</th>
|
||||
<th class="col-md-7">{{th_title}}</th>
|
||||
<th class="col-md-2">{{th_book_paper_type}}</th>
|
||||
<th class="col-md-2">{{th_author}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -11,6 +12,7 @@
|
|||
<tr>
|
||||
<td>{{year}}</td>
|
||||
<td><a href="{{link_to_show}}">{{book_title}}</a></td>
|
||||
<td>{{book_paper_type}}</td>
|
||||
<td>{{author}}</td>
|
||||
</tr>
|
||||
</tbody>
|
|
@ -2,19 +2,23 @@
|
|||
<caption><h3>{{widget-title}}</h3></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-3">{{th_duration}}</th>
|
||||
<th class="col-md-1">{{th_year}}</th>
|
||||
<th class="col-md-3">{{th_project_title}}</th>
|
||||
<th class="col-md-2">{{th_job_title}}</th>
|
||||
<th class="col-md-2">{{th_participator}}</th>
|
||||
<th class="col-md-3">{{th_authors}}</th>
|
||||
<th class="col-md-2">{{th_job_title}}</th>
|
||||
<th class="col-md-2">{{th_duration}}</th>
|
||||
<th class="col-md-3">{{th_unit}}</th>
|
||||
<th class="col-md-2">{{th_authors}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody data-level="0" data-list="projects">
|
||||
<tr>
|
||||
<td>{{duration}}</td>
|
||||
<td>{{year}}</td>
|
||||
<td><a href="{{link_to_show}}">{{project_title}}</a></td>
|
||||
<td>{{job_title}}</td>
|
||||
<td>{{participator}}</td>
|
||||
<td>{{job_title}}</td>
|
||||
<td>{{duration}}</td>
|
||||
<td>{{unit}}</td>
|
||||
<td>{{authors}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue