diff --git a/app/views/admin/users_new_interface/_show_roles.html.erb b/app/views/admin/users_new_interface/_show_roles.html.erb index 0507492a..4e35511e 100644 --- a/app/views/admin/users_new_interface/_show_roles.html.erb +++ b/app/views/admin/users_new_interface/_show_roles.html.erb @@ -12,4 +12,7 @@
<%= nl2br(show_attribute_value(@user.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %>
<% end -%> - \ No newline at end of file + <%= render :partial => 'show_sub_role',:collection=> @user.get_sub_roles_by_role(show_roles)%> + + + diff --git a/app/views/admin/users_new_interface/_show_sub_role.html.erb b/app/views/admin/users_new_interface/_show_sub_role.html.erb index e974eaa2..d69a5a8d 100644 --- a/app/views/admin/users_new_interface/_show_sub_role.html.erb +++ b/app/views/admin/users_new_interface/_show_sub_role.html.erb @@ -1,7 +1,11 @@ -<%= show_sub_role.title %> -<% show_sub_role.attribute_fields.each do |item|%> - - <%= item.title %> - <%= nl2br(show_attribute_value(@user.get_attribute_value(item).get_value_by_locale(I18n.locale))) rescue '' %> - -<% end %> \ No newline at end of file + + +
+

<%= show_sub_role.title %><%= t(:sub_role_info)%>

+
+ <% show_sub_role.attribute_fields.where(:disabled=>false).asc(:_id).each do |item| %> +
<%= item.title %>
+
<%= nl2br(show_attribute_value(@user.get_attribute_value(item).get_value_by_locale(I18n.locale))) rescue '' %>
+ <% end -%> +
+
\ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index d8313725..9e809798 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -417,6 +417,7 @@ en: sub_manager: SubManager sub_role: Sub Role sub_role_field: Sub Role Field + sub_role_info: " Sub Role Info." subtitle: Subtitle submit: Submit submit_approval: Submit approval diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 7c1b180e..bf97f038 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -418,6 +418,7 @@ zh_tw: sub_manager: 次管理員 sub_role: 子身份 sub_role_field: 子身份欄位 + sub_role_info: 子身份資料 subtitle: 副標題 submit: 送出 submit_approval: 送出已核准 diff --git a/lib/orbit_app/plugin/registration.rb b/lib/orbit_app/plugin/registration.rb index 2c3f52f8..a8a5d80c 100644 --- a/lib/orbit_app/plugin/registration.rb +++ b/lib/orbit_app/plugin/registration.rb @@ -47,10 +47,12 @@ module OrbitApp @base_path = args[0][:base_path] @name = partial[0][:i18n].nil? ? name : lambda{ I18n.t(partial[0][:i18n]) } @partial_path = '' + @front_partial_path = '' @admin_partial_path = '' unless partial.nil? @partial_path = partial[0][:path] + @front_partial_path = partial[0][:front_path] @admin_partial_path = partial[0][:admin_path] end @@ -61,6 +63,10 @@ module OrbitApp return @partial_path end + def front_partial_path + return @front_partial_path + end + def admin_partial_path return @admin_partial_path end diff --git a/vendor/built_in_modules/member/app/assets/javascripts/member/moduletab.js b/vendor/built_in_modules/member/app/assets/javascripts/member/moduletab.js new file mode 100644 index 00000000..9f73de0b --- /dev/null +++ b/vendor/built_in_modules/member/app/assets/javascripts/member/moduletab.js @@ -0,0 +1,16 @@ +function moduletab() { + $('.module-nav li').each(function(i) { + if(i == 0) { + $(this).addClass('active'); + $('.module-pane').eq(i).addClass('active') + }; + var id = $(this).find('a').attr('href'); + $(this).find('a').on('click', function(event) { + event.preventDefault(); + $(this).closest('li').addClass('active').siblings().removeClass('active').closest('.member-module').find(id).addClass('active').siblings().removeClass('active') + }); + }); +}; +$(function() { + moduletab(); +}); \ No newline at end of file diff --git a/vendor/built_in_modules/member/app/assets/stylesheets/member/default_member.css b/vendor/built_in_modules/member/app/assets/stylesheets/member/default_member.css new file mode 100644 index 00000000..0adecdab --- /dev/null +++ b/vendor/built_in_modules/member/app/assets/stylesheets/member/default_member.css @@ -0,0 +1,125 @@ +.default_member:after { + content: ""; + clear: both; + display: block; + visibility: hidden; +} +.default_member .member-pic { + float: left; + width: 30%; +} +.default_member .member-pic img { + width: 100%; + height: auto; +} +.default_member .member-data { + float: right; + width: 68%; +} +.default_member .member-data table { + width: 100%; + background-color: #fff; +} +.default_member .member-data table td { + padding: 5px; + background-color: #ccc; + border: 1px solid #fff; +} +.default_member .member-data table td + td { + background-color: #ededed; +} +.default_member .member-module { + clear: both; + padding-top: 30px; +} +.default_member .member-module .module-nav ul { + margin: 0; + padding: 0; + list-style: none; + border-bottom: 1px solid #ccc; +} +.default_member .member-module .module-nav ul:after { + content: ""; + clear: both; + display: block; + height: 0; + visibility: hidden; +} +.default_member .member-module .module-nav ul li { + float: left; + display: inline-block; + margin-right: 3px; + margin-bottom: 5px; +} +.default_member .member-module .module-nav ul li a { + padding: 5px 8px; + line-height: 30px; + height: 30px; + border-radius: 3px; + text-decoration: none; + background-color: #DDD; +} +.default_member .member-module .module-nav ul li.active a { + background-color: #0088CE; + color: #FFF; +} +.default_member .member-module .module-content { + position: relative; + margin-bottom: 20px; +} +.default_member .member-module .module-content .module-pane { + display: none; + top: 0; + left: 0; +} +.default_member .member-module .module-content .module-pane table { + width: 100%; +} +.default_member .member-module .module-content .module-pane.active { + display: block; +} + + + + + + +[class*="grid"] + [class*="grid"] { + margin-left: 2.12766%; +} +.grid12 { + width: 100%; +} +.grid11 { + width: 91.4894%; +} +.grid10 { + width: 82.9787%; +} +.grid9 { + width: 74.4681%; +} +.grid8 { + width: 65.9574%; +} +.grid7 { + width: 57.4468%; +} +.grid6 { + width: 48.9362%; +} +.grid5 { + width: 40.4255%; +} +.grid4 { + width: 31.9149%; +} +.grid3 { + width: 23.4043%; +} +.grid2 { + width: 14.8936%; +} +.grid1 { + width: 6.38298%; +} \ No newline at end of file diff --git a/vendor/built_in_modules/member/app/assets/stylesheets/member/members.css b/vendor/built_in_modules/member/app/assets/stylesheets/member/members.css index 04adc232..ca22c524 100755 --- a/vendor/built_in_modules/member/app/assets/stylesheets/member/members.css +++ b/vendor/built_in_modules/member/app/assets/stylesheets/member/members.css @@ -8,6 +8,36 @@ .o-members-category:first-child { margin-top: 0; } +.o-members-nav { + margin: 0 0 10px; + padding: 0; + list-style: none; +} +.o-members-nav:after { + content: ""; + clear: both; + display: block; + height: 0; + visibility: hidden; +} +.o-members-nav li { + float: left; +} +.o-members-nav li + li { + margin-left: 8px; +} +.o-members-nav li a { + display: inline-block; + line-height: 23px; + padding: 5px 8px; + height: 23px; + background-color: #ccc; + border-radius: 3px; +} +.o-members-nav li.active a { + color: #FFF; + background-color: #0088CE; +} .o-members-list { list-style: none; margin: 0; diff --git a/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb b/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb index f0f89eec..d02286e6 100644 --- a/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb +++ b/vendor/built_in_modules/member/app/controllers/panel/member/front_end/member_lists_controller.rb @@ -28,23 +28,35 @@ class Panel::Member::FrontEnd::MemberListsController < OrbitWidgetController @member_subroles = SubRole.where(:role_id => @role_id, :disabled => false) + @member_list_categorys = RoleCategory.where(:role_id => @role_id,disable: false).asc("key") + if !params[:category_id].blank? @member_status = RoleStatus.can_display.any_in(:_id => params[:category_id]).asc("key") - - @member_lists = User.where(:role_ids => @role_id) - else @member_status = RoleStatus.can_display.where(:role_id => @role_id).asc("key") - - @member_lists = User.where(:role_ids => @role_id) - end + if !params[:mcid].blank? + @member_lists = User.where(:role_ids => @role_id, :role_category_ids => params[:mcid]) + else + @member_lists = User.where(:role_ids => @role_id) + end + + end def show - @member_list = User.find(params[:id]) - # get_categorys + @member = User.find(params[:id]) + + @plugins = OrbitApp::Plugin::Registration.all + + @profile_data = [] + + attribute_values = @member.attribute_values.asc("_id") + attribute_values.each{|att_val| + @profile_data.push({:name => att_val.attribute_field.title,:value =>att_val.get_value_by_locale(I18n.locale.to_s)}) if att_val.attribute_field.attribute.key=="profile" rescue false + } + end diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb new file mode 100644 index 00000000..833454fb --- /dev/null +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_roles.html.erb @@ -0,0 +1,50 @@ + <% + @status = @member.role_statuses.where(:role_id=>show_roles.id) + + if !@status.blank? + %> + + <%= t('status')%> + <%= show_attribute_value(@member.role_statuses.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %> + + + <% end -%> + + <% + @category = @member.role_categorys.where(:role_id=>show_roles.id) + + if !@category.blank? + %> + + <%= t('category')%> + <%= show_attribute_value(@member.role_categorys.where(:role_id=>show_roles.id).map{|t|t.title.to_s}.join(',')) rescue '' %> + + + <% end -%> + + <% show_roles.attribute_fields.where(:disabled=>false).asc(:_id).each do |rf| %> + + <% + if !@member.get_attribute_value(rf).blank? + if !@member.get_attribute_value(rf)['val'].blank? + @rodata = @member.get_attribute_value(rf)['val'] + elsif !@member.get_attribute_value(rf)[I18n.locale].blank? + @rodata = @member.get_attribute_value(rf)[I18n.locale] + else + @rodata = nil + end + end + + if !@rodata.blank? and !@member.get_attribute_value(rf).get_value_by_locale(I18n.locale).blank? + %> + + + <%= rf.title %> + <%= nl2br(show_attribute_value(@member.get_attribute_value(rf).get_value_by_locale(I18n.locale))) rescue '' %> + + + <% end -%> + + <% end -%> + + <%= render :partial => 'show_sub_role',:collection=> @member.get_sub_roles_by_role(show_roles)%> \ No newline at end of file diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_sub_role.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_sub_role.html.erb new file mode 100644 index 00000000..612c27c3 --- /dev/null +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/_show_sub_role.html.erb @@ -0,0 +1,28 @@ + + + <% show_sub_role.attribute_fields.where(:disabled=>false).asc(:_id).each do |item| %> + + + <% + + if !@member.get_attribute_value(item).blank? + if !@member.get_attribute_value(item)['val'].blank? + @rodata = @member.get_attribute_value(item)['val'] + elsif !@member.get_attribute_value(item)[I18n.locale].blank? + @rodata = @member.get_attribute_value(item)[I18n.locale] + else + @rodata = nil + end + end + + if !@rodata.blank? and !@member.get_attribute_value(item).get_value_by_locale(I18n.locale).blank? + %> + + + <%= item.title %> + <%= nl2br(show_attribute_value(@member.get_attribute_value(item).get_value_by_locale(I18n.locale))) rescue '' %> + + + <% end -%> + + <% end -%> \ No newline at end of file diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb index 4874af12..dd3a51d1 100644 --- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/index.html.erb @@ -1,14 +1,23 @@ <% # encoding: utf-8 %> - <% if @item.frontend_style == 'Single' %> -
+ + <% if !@member_list_categorys.blank? %> + + <% end %> + + <% if @item.frontend_style == 'Single' %> +
- - <% @member_status.each do |ms| %> + + <% @member_status.each do |ms| %>

<%= ms.title %>

    @@ -19,7 +28,7 @@
    <%= show_avatar(member) %>
    • <%= t("users.name")%><%= link_to member.name, panel_member_front_end_member_list_path(member.id), {:class => "o-members-link"} %>
    • -
    • Title<%= show_attribute_value(member.role_categorys.map{|t|t.title.to_s}.join(',')) rescue '' %>
    • +
    • <%= @member_lists.get_member_list_attribute_field_name("teacher","job_title") %><%= show_attribute_value(@member_lists.get_member_list_attribute_value(member.id,"teacher","job_title").get_value_by_locale(I18n.locale)) %>
    • <%= t("users.email")%><%= member.email %>
    • <%= t("users.office_tel")%><%= member.office_tel %>
    @@ -32,10 +41,8 @@ <% end %>
-
-
- <% elsif @item.frontend_style == 'Two' %> + <% elsif @item.frontend_style == 'Two' or @item.frontend_style.blank? %>
@@ -54,7 +61,7 @@
<%= show_avatar(member) %>
@@ -67,10 +74,10 @@ <% end %> + + <% end %>
- <% end %> - <%= stylesheet_link_tag "member/members" %> diff --git a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb index e69de29b..1480f603 100644 --- a/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb +++ b/vendor/built_in_modules/member/app/views/panel/member/front_end/member_lists/show.html.erb @@ -0,0 +1,83 @@ +
+
+ + + + + + + + + + + <% if !@member.sid.blank? %> + + + + + <% end %> + <% if !@member.office_tel.blank? %> + + + + + <% end %> + + + + + + <% @profile_data.each do |item| %> + <% if !item[:value].blank? %> + + + + + <% end -%> + <% end -%> + + <%= render :partial=> "show_roles",:collection=>@member.roles.asc(:created_at) %> + + +
<%= t('users.name')%><%= @member.name%>
<%= t('users.email')%><%= @member.email %>
<%= t('users.sid')%><%= @member.sid%>
<%= t('users.office_tel')%><%= @member.office_tel%>
<%= t('users.sex')%><%= t("users.#{@member.sex}") %>
<%= item[:name] %><%= show_attribute_value(item[:value]) %>
+
+ +
+ <%= show_avatar(@member) %> +
+ + +
+
+ +
+
+ <% + + @plugins.each do |plugin| + + @plugin_partial = !plugin.front_partial_path.blank? ? OrbitApp::Plugin::Registration.find_by_key(plugin.name).front_partial_path : nil + %> + +
+ <%= render :partial => @plugin_partial if !@plugin_partial.blank? %> +
+ + <% end %> +
+
+ + + + +
+ + +<%= stylesheet_link_tag "member/default_member" %> + + <%= javascript_include_tag "member/moduletab" %> + diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/_profile.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/_profile.html.erb new file mode 100644 index 00000000..c408c9c7 --- /dev/null +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/front_end/_profile.html.erb @@ -0,0 +1,42 @@ +<% + if @member + @writing_books = WritingBook.where(:create_user_id => @member.id).desc(:year) + else + @writing_books = WritingBook.all.desc(:year) + end + +%> + +<% if !@writing_books.blank? %> + + + + + + + + + + + + <% @writing_books.each do |writing_book| %> + + + + + + + + <% end %> + + +
<%= t('personal_book.year') %><%= t('personal_book.book_title') %><%= t('personal_book.authors') %>
<%= writing_book.year %> + <%= link_to writing_book.create_link, panel_personal_book_front_end_writing_book_path(writing_book) %> + <%= writing_book.authors %>
+ + +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb index 3bf8d782..9a4674c2 100644 --- a/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_book/app/views/panel/personal_book/plugin/_profile.html.erb @@ -28,8 +28,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_book/init.rb b/vendor/built_in_modules/personal_book/init.rb index 51afb81b..8c9d8493 100644 --- a/vendor/built_in_modules/personal_book/init.rb +++ b/vendor/built_in_modules/personal_book/init.rb @@ -2,7 +2,7 @@ module PersonalBook OrbitApp.registration "PersonalBook",:type=> 'ModuleApp' do module_label 'module_name.personal_book' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book' + personal_plugin :enable => true,:path=>"panel/personal_book/plugin/profile",:front_path=>"panel/personal_book/front_end/profile",:admin_path=>"/panel/personal_book/back_end/writing_books",:i18n=>'module_name.personal_book' diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/front_end/_profile.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/front_end/_profile.html.erb new file mode 100644 index 00000000..b50d81ed --- /dev/null +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/front_end/_profile.html.erb @@ -0,0 +1,42 @@ +<% + if @member + @writing_conferences = WritingConference.where(:create_user_id => @member.id).desc(:year) + else + @writing_conferences = WritingConference.all.desc(:year) + end + +%> + +<% if !@writing_conferences.blank? %> + +
<%= t('writing_book.year') %><%= t('writing_book.title') %><%= t('personal_book.year') %><%= t('personal_book.book_title') %>
+ + + + + + + + + + <% @writing_conferences.each do |writing_conference| %> + + + + + + + + <% end %> + + +
<%= t('personal_conference.year') %><%= t('module_name.personal_conference') %><%= t('personal_conference.authors') %>
<%= writing_conference.year %> + <%= link_to writing_conference.create_link, panel_personal_conference_front_end_writing_conference_path(writing_conference) %> + <%= writing_conference.authors %>
+ + +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb index 2fea1f83..367ab55a 100644 --- a/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_conference/app/views/panel/personal_conference/plugin/_profile.html.erb @@ -29,8 +29,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_conference/init.rb b/vendor/built_in_modules/personal_conference/init.rb index 5ba2d277..6e5de97d 100644 --- a/vendor/built_in_modules/personal_conference/init.rb +++ b/vendor/built_in_modules/personal_conference/init.rb @@ -2,7 +2,7 @@ module PersonalConference OrbitApp.registration "PersonalConference",:type=> 'ModuleApp' do module_label 'module_name.personal_conference' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference' + personal_plugin :enable => true,:path=>"panel/personal_conference/plugin/profile",:front_path=>"panel/personal_conference/front_end/profile",:admin_path=>"/panel/personal_conference/back_end/writing_conferences",:i18n=>'module_name.personal_conference' diff --git a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/front_end/_profile.html.erb b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/front_end/_profile.html.erb new file mode 100644 index 00000000..4fc4cc7f --- /dev/null +++ b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @diplomas = Diploma.where(:create_user_id => @member.id).desc(:start_date) + else + @diplomas = Diploma.all.desc(:start_date) + end +%> + +<% if !@diplomas.blank? %> + +
<%= t('writing_conference.year') %><%= t('writing_conference.title') %><%= t('personal_conference.year') %><%= t('module_name.personal_conference') %>
+ + + + + + + + + <% @diplomas.each do |diploma| %> + + + + + + + <% end %> + + +
<%= t('date_') %><%= t('personal_diploma.school_name') %>
<%= diploma.start_date.strftime("%Y.%m") %> ~ <%= diploma.end_date.strftime("%Y.%m") %> + <%= link_to diploma.school_name, panel_personal_diploma_front_end_diploma_path(diploma) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/_profile.html.erb b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/_profile.html.erb index d7f0dcef..4773de7a 100644 --- a/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_diploma/app/views/panel/personal_diploma/plugin/_profile.html.erb @@ -28,8 +28,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_diploma/init.rb b/vendor/built_in_modules/personal_diploma/init.rb index c58fabbf..8cd9f6c4 100644 --- a/vendor/built_in_modules/personal_diploma/init.rb +++ b/vendor/built_in_modules/personal_diploma/init.rb @@ -2,7 +2,7 @@ module PersonalDiploma OrbitApp.registration "PersonalDiploma",:type=> 'ModuleApp' do module_label 'module_name.personal_diploma' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma' + personal_plugin :enable => true,:path=>"panel/personal_diploma/plugin/profile",:front_path=>"panel/personal_diploma/front_end/profile",:admin_path=>"/panel/personal_diploma/back_end/diplomas",:i18n=>'module_name.personal_diploma' diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/front_end/_profile.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/front_end/_profile.html.erb new file mode 100644 index 00000000..9d85075d --- /dev/null +++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @experiences = Experience.where(:create_user_id => @member.id).desc(:start_date) + else + @experiences = Experience.all.desc(:start_date) + end +%> + +<% if !@experiences.blank? %> + +
<%= t('diploma.date') %><%= t('diploma.school_name') %><%= t('date_') %><%= t('personal_diploma.school_name') %>
+ + + + + + + + + <% @experiences.each do |experience| %> + + + + + + + <% end %> + + +
<%= t('date_') %><%= t('personal_experience.organizationt_title') %>
<%= experience.start_date.strftime("%Y.%m") %> ~ <%= experience.end_date.strftime("%Y.%m") %> + <%= link_to experience.organizationt_title, panel_personal_experience_front_end_experience_path(experience) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/_profile.html.erb b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/_profile.html.erb index d2960983..05e5353b 100644 --- a/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_experience/app/views/panel/personal_experience/plugin/_profile.html.erb @@ -29,8 +29,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_experience/init.rb b/vendor/built_in_modules/personal_experience/init.rb index 74a28fc0..148798bb 100644 --- a/vendor/built_in_modules/personal_experience/init.rb +++ b/vendor/built_in_modules/personal_experience/init.rb @@ -2,7 +2,7 @@ module PersonalExperience OrbitApp.registration "PersonalExperience",:type=> 'ModuleApp' do module_label 'module_name.personal_experience' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience' + personal_plugin :enable => true,:path=>"panel/personal_experience/plugin/profile",:front_path=>"panel/personal_experience/front_end/profile",:admin_path=>"/panel/personal_experience/back_end/experiences",:i18n=>'module_name.personal_experience' diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/front_end/_profile.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/front_end/_profile.html.erb new file mode 100644 index 00000000..438bbae3 --- /dev/null +++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @honors = Honor.where(:create_user_id => @member.id).desc(:year) + else + @honors = Honor.all.desc(:year) + end +%> + +<% if !@honors.blank? %> + +
<%= t('experience.date') %><%= t('experience.organizationt_title') %><%= t('date_') %><%= t('personal_experience.organizationt_title') %>
+ + + + + + + + + <% @honors.each do |honor| %> + + + + + + + <% end %> + + +
<%= t('personal_honor.year') %><%= t('personal_honor.award_name') %>
<%= honor.year %> + <%= link_to honor.award_name, panel_personal_honor_front_end_honor_path(honor) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/_profile.html.erb b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/_profile.html.erb index fae9dc8f..cbb9e3cf 100644 --- a/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_honor/app/views/panel/personal_honor/plugin/_profile.html.erb @@ -29,8 +29,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_honor/init.rb b/vendor/built_in_modules/personal_honor/init.rb index 589ac381..b6851e00 100644 --- a/vendor/built_in_modules/personal_honor/init.rb +++ b/vendor/built_in_modules/personal_honor/init.rb @@ -2,7 +2,7 @@ module PersonalHonor OrbitApp.registration "PersonalHonor",:type=> 'ModuleApp' do module_label 'module_name.personal_honor' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor' + personal_plugin :enable => true,:path=>"panel/personal_honor/plugin/profile",:front_path=>"panel/personal_honor/front_end/profile",:admin_path=>"/panel/personal_honor/back_end/honors",:i18n=>'module_name.personal_honor' diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/front_end/_profile.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/front_end/_profile.html.erb new file mode 100644 index 00000000..e3c740ad --- /dev/null +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/front_end/_profile.html.erb @@ -0,0 +1,41 @@ +<% + if @member + @writing_journals = WritingJournal.where(:create_user_id => @member.id).desc(:year) + else + @writing_journals = WritingJournal.all.desc(:year) + end + +%> + +<% if !@writing_journals.blank? %> + +
<%= t('honor.year') %><%= t('honor.award_name') %><%= t('personal_honor.year') %><%= t('personal_honor.award_name') %>
+ + + + + + + + + + <% @writing_journals.each do |writing_journal| %> + + + + + + + + <% end %> + + +
<%= t('personal_journal.year') %><%= t('module_name.personal_journal') %><%= t('personal_journal.authors') %>
<%= writing_journal.year %> + <%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %> + <%= writing_journal.authors %>
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb index 103fac90..59961b00 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb @@ -27,10 +27,10 @@ - - + + <% if not @user%> - + <% end %> diff --git a/vendor/built_in_modules/personal_journal/init.rb b/vendor/built_in_modules/personal_journal/init.rb index b52b3865..cd85ea0a 100644 --- a/vendor/built_in_modules/personal_journal/init.rb +++ b/vendor/built_in_modules/personal_journal/init.rb @@ -2,7 +2,7 @@ module PersonalJournal OrbitApp.registration "PersonalJournal",:type=> 'ModuleApp' do module_label 'module_name.personal_journal' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal' + personal_plugin :enable => true,:path=>"panel/personal_journal/plugin/profile",:front_path=>"panel/personal_journal/front_end/profile",:admin_path=>"/panel/personal_journal/back_end/writing_journals",:i18n=>'module_name.personal_journal' diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/front_end/_profile.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/front_end/_profile.html.erb new file mode 100644 index 00000000..18c4a9ac --- /dev/null +++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/front_end/_profile.html.erb @@ -0,0 +1,40 @@ +<% + if @member + @labs = Lab.where(:create_user_id => @member.id).desc(:year) + else + @labs = Lab.all.desc(:year) + end +%> + +<% if !@labs.blank? %> + +
<%= t('writing_journal.year') %><%= t('writing_journal.title') %><%= t('personal_journal.year') %><%= t('module_name.personal_journal') %><%= t('writing_journal.authors') %><%= t('personal_journal.authors') %>
+ + + + + + + + + + <% @labs.each do |lab| %> + + + + + + + + <% end %> + + +
<%= t('personal_lab.year') %><%= t('personal_lab.lab_title') %><%= t('personal_lab.location') %>
<%= lab.year %> + <%= link_to lab.lab_title, panel_personal_lab_front_end_lab_path(lab) %> + <%= lab.location %>
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/plugin/_profile.html.erb b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/plugin/_profile.html.erb index acd3a16f..4598ef79 100644 --- a/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_lab/app/views/panel/personal_lab/plugin/_profile.html.erb @@ -29,9 +29,9 @@ - - - + + + diff --git a/vendor/built_in_modules/personal_lab/init.rb b/vendor/built_in_modules/personal_lab/init.rb index 2d79ad66..0a645b91 100644 --- a/vendor/built_in_modules/personal_lab/init.rb +++ b/vendor/built_in_modules/personal_lab/init.rb @@ -2,7 +2,7 @@ module PersonalLab OrbitApp.registration "PersonalLab",:type=> 'ModuleApp' do module_label 'module_name.personal_lab' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab' + personal_plugin :enable => true,:path=>"panel/personal_lab/plugin/profile",:front_path=>"panel/personal_lab/front_end/profile",:admin_path=>"/panel/personal_lab/back_end/labs",:i18n=>'module_name.personal_lab' end diff --git a/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/front_end/_profile.html.erb b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/front_end/_profile.html.erb new file mode 100644 index 00000000..78f4a7f1 --- /dev/null +++ b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @writing_patents = WritingPatent.where(:create_user_id => @member.id).desc(:publish_date) + else + @writing_patents = WritingPatent.all.desc(:publish_date) + end +%> + +<% if !@writing_patents.blank? %> + +
<%= t('lab.year') %><%= t('lab.lab_title') %><%= t('lab.location') %><%= t('personal_lab.year') %><%= t('personal_lab.lab_title') %><%= t('personal_lab.location') %>
+ + + + + + + + + <% @writing_patents.each do |writing_patent| %> + + + + + + + <% end %> + + +
<%= t('personal_patent.publication_date') %><%= t('personal_patent.patent_title') %>
<%= writing_patent.publish_date.strftime("%Y.%m") %> + <%= link_to writing_patent.patent_title, panel_personal_patent_front_end_writing_patent_path(writing_patent) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/plugin/_profile.html.erb b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/plugin/_profile.html.erb index a0db07bc..a943682e 100644 --- a/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_patent/app/views/panel/personal_patent/plugin/_profile.html.erb @@ -30,8 +30,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_patent/init.rb b/vendor/built_in_modules/personal_patent/init.rb index 1c6ba393..9bdf738f 100644 --- a/vendor/built_in_modules/personal_patent/init.rb +++ b/vendor/built_in_modules/personal_patent/init.rb @@ -2,7 +2,7 @@ module PersonalPatent OrbitApp.registration "PersonalPatent",:type=> 'ModuleApp' do module_label 'module_name.personal_patent' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent' + personal_plugin :enable => true,:path=>"panel/personal_patent/plugin/profile",:front_path=>"panel/personal_patent/front_end/profile",:admin_path=>"/panel/personal_patent/back_end/writing_patents",:i18n=>'module_name.personal_patent' diff --git a/vendor/built_in_modules/personal_project/app/views/panel/personal_project/front_end/_profile.html.erb b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/front_end/_profile.html.erb new file mode 100644 index 00000000..2e7cd93d --- /dev/null +++ b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @projects = Project.where(:create_user_id => @member.id).desc(:period_start_date) + else + @projects = Project.all.page(params[:page]).per(10) + end +%> + +<% if !@projects.blank? %> + +
<%= t('writing_patent.publish_date') %><%= t('writing_patent.title') %><%= t('personal_patent.publication_date') %><%= t('personal_patent.patent_title') %>
+ + + + + + + + + <% @projects.each do |project| %> + + + + + + + <% end %> + + +
<%= t('personal_project.period') %><%= t('personal_project.project_title') %>
<%= project.period_start_date.strftime("%Y.%m") %> ~ <%= project.period_end_date.strftime("%Y.%m") %> + <%= link_to project.project_title, panel_personal_project_front_end_project_path(project) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_project/app/views/panel/personal_project/plugin/_profile.html.erb b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/plugin/_profile.html.erb index 4de1c65a..8680f15b 100644 --- a/vendor/built_in_modules/personal_project/app/views/panel/personal_project/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_project/app/views/panel/personal_project/plugin/_profile.html.erb @@ -29,8 +29,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_project/config/locales/en.yml b/vendor/built_in_modules/personal_project/config/locales/en.yml index 251281d7..e4bc2e27 100644 --- a/vendor/built_in_modules/personal_project/config/locales/en.yml +++ b/vendor/built_in_modules/personal_project/config/locales/en.yml @@ -6,6 +6,7 @@ en: job_title : "Job Title" participator : "Participartor" project_category : "Project Category" + period : "Period" end_date : "End Date" start_date : "Start Date" extracted_chapters : "Extracted Chapters" diff --git a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml index 1766a606..4be3c73e 100644 --- a/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/personal_project/config/locales/zh_tw.yml @@ -7,6 +7,7 @@ zh_tw: participator : "參與人" extracted_chapters : "Extracted Chapters" project_category : "計畫類別" + period : "計畫期間" end_date : "結束日期" start_date : "開始日期" unit : "補助/委託或合作機構" diff --git a/vendor/built_in_modules/personal_project/init.rb b/vendor/built_in_modules/personal_project/init.rb index cf1c0629..914e1fd2 100644 --- a/vendor/built_in_modules/personal_project/init.rb +++ b/vendor/built_in_modules/personal_project/init.rb @@ -2,7 +2,7 @@ module PersonalProject OrbitApp.registration "PersonalProject",:type=> 'ModuleApp' do module_label 'module_name.personal_project' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'module_name.personal_project' + personal_plugin :enable => true,:path=>"panel/personal_project/plugin/profile",:front_path=>"panel/personal_project/front_end/profile",:admin_path=>"/panel/personal_project/back_end/projects",:i18n=>'module_name.personal_project' diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/front_end/_profile.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/front_end/_profile.html.erb new file mode 100644 index 00000000..5cbffba1 --- /dev/null +++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/front_end/_profile.html.erb @@ -0,0 +1,38 @@ +<% + if @member + @researchs = Research.where(:create_user_id => @member.id).desc(:publish_date) + else + @researchs = Research.all.desc(:publish_date) + end +%> + +<% if !@researchs.blank? %> + +
<%= t('project.period') %><%= t('project.project_title') %><%= t('personal_project.period') %><%= t('personal_project.project_title') %>
+ + + + + + + + + <% @researchs.each do |research| %> + + + + + + + <% end %> + + +
<%= t('personal_research.publication_date') %><%= t('personal_research.research_title') %>
<%= research.publish_date.strftime("%Y.%m") %> + <%= link_to research.research_title, panel_personal_research_front_end_research_path(research) %> +
+ +<% else %> + + <%= t('nothing')%> + +<% end %> \ No newline at end of file diff --git a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/plugin/_profile.html.erb b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/plugin/_profile.html.erb index 71e35a78..daa3bf77 100644 --- a/vendor/built_in_modules/personal_research/app/views/panel/personal_research/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_research/app/views/panel/personal_research/plugin/_profile.html.erb @@ -28,8 +28,8 @@ - - + + diff --git a/vendor/built_in_modules/personal_research/init.rb b/vendor/built_in_modules/personal_research/init.rb index 72fb3c56..fdd0d11c 100644 --- a/vendor/built_in_modules/personal_research/init.rb +++ b/vendor/built_in_modules/personal_research/init.rb @@ -2,7 +2,7 @@ module PersonalResearch OrbitApp.registration "PersonalResearch",:type=> 'ModuleApp' do module_label 'module_name.personal_research' base_url File.expand_path File.dirname(__FILE__) - personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:admin_path=>"/panel/personal_research/back_end/researchs",:i18n=>'module_name.personal_research' + personal_plugin :enable => true,:path=>"panel/personal_research/plugin/profile",:front_path=>"panel/personal_research/front_end/profile",:admin_path=>"/panel/personal_research/back_end/researchs",:i18n=>'module_name.personal_research'
<%= t('research.publish_date') %><%= t('research.title') %><%= t('personal_research.publication_date') %><%= t('personal_research.research_title') %>