diff --git a/app/controllers/admin/dashboards_controller.rb b/app/controllers/admin/dashboards_controller.rb index 4af945d..321a637 100644 --- a/app/controllers/admin/dashboards_controller.rb +++ b/app/controllers/admin/dashboards_controller.rb @@ -42,8 +42,7 @@ class Admin::DashboardsController < ApplicationController end def get_disk_usage - @usw = Usagewatch - render :json => @usw.uw_diskused_perc.to_s + render :json => `df -m /home`.scan(/\d+%/).first.gsub('%','') rescue '0' end protected diff --git a/app/models/concerns/slug.rb b/app/models/concerns/slug.rb index 81a4539..4e6b2d5 100644 --- a/app/models/concerns/slug.rb +++ b/app/models/concerns/slug.rb @@ -12,6 +12,11 @@ module Slug end def to_param + if self.uid.blank? + generate_uid + self.save + end + (self.slug_title.gsub(/[ "'*@#$%^&()+=;:.,?>|\\\/<~_!:,、。!?;「」〈〉【】/]/,'-')+"-"+self.uid).gsub(/-{2,}/,'-') rescue "-"+self.uid end diff --git a/app/views/admin/members/show.html.erb b/app/views/admin/members/show.html.erb index aff3080..13a7e67 100644 --- a/app/views/admin/members/show.html.erb +++ b/app/views/admin/members/show.html.erb @@ -49,7 +49,8 @@ <% @plugin_shows.each do |plugin| %> <%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin["app_name"] ? "active" : nil) do %> - <%= link_to plugin["name"], :show_plugin_profile => plugin["app_name"] %> + <%#= link_to plugin["name"], :show_plugin_profile => plugin["app_name"] %> + <%= link_to plugin["name"], '/admin/members/'+@member.to_param+'/'+plugin["app_name"] %> <% end -%> <% end -%> diff --git a/app/views/admin/personal_plugins/_plugin_list.html.erb b/app/views/admin/personal_plugins/_plugin_list.html.erb index f1c3dbc..67122e1 100644 --- a/app/views/admin/personal_plugins/_plugin_list.html.erb +++ b/app/views/admin/personal_plugins/_plugin_list.html.erb @@ -1,18 +1,16 @@ -
-
-
-
- -
-
\ No newline at end of file +
+
+
+
+ +
+
\ No newline at end of file diff --git a/app/views/layouts/member_plugin.html.erb b/app/views/layouts/member_plugin.html.erb new file mode 100644 index 0000000..1ac2f93 --- /dev/null +++ b/app/views/layouts/member_plugin.html.erb @@ -0,0 +1,59 @@ + + + + <%= current_site.title %> | <%= t('dashboard_') %> + <%= render 'shared/meta' %> + <%= render 'shared/google_font' %> + <%= stylesheet_link_tag "member" %> + <%= yield :page_specific_css %> + <%= render 'shared/ie_html5_fix' %> + <%= javascript_include_tag "member" %> + <%= yield :page_specific_javascript %> + <%= csrf_meta_tag %> + + + <%= render 'layouts/orbit_bar_backend' unless @no_orbit_bar %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:user), :link_url => admin_site_site_info_path(site_id: current_site.id), :icon => 'icons-users', :side_bar_content => 'admin/members/side_bar'} %> +
+
+
+ + <%= yield :right_nav %> +
+ + + + <%= yield %> + <%= javascript_include_tag "lib/pageslide.js" %> +
+
+ + diff --git a/built_in_extensions.rb b/built_in_extensions.rb index a84c7c4..324be5e 100644 --- a/built_in_extensions.rb +++ b/built_in_extensions.rb @@ -7,6 +7,7 @@ gem 'page_content', git: 'git@gitlab.tp.rulingcom.com:saurabh/pagecontent.git' gem 'faq', git: 'git@gitlab.tp.rulingcom.com:saurabh/faq.git' #Personal Plugins gem 'personal_journal', git: 'git@gitlab.tp.rulingcom.com:saurabh/personal-journal.git' +gem 'personal_conference', git: 'git@gitlab.tp.rulingcom.com:saurabh/personal-conference.git' #widgets gem "site_menu_widget", git: 'git@gitlab.tp.rulingcom.com:saurabh/site-menu-widget.git' diff --git a/config/locales/en.yml b/config/locales/en.yml index 17ddd0f..f6524d4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -388,6 +388,7 @@ en: pending: Pending is_pending: Pending personal_plugins: + year: "Year" author : "Author" edit_brief_intro : "Edit Brief Intro." brief_intro : "Brief Intro." diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index a22cb72..3694993 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -386,6 +386,7 @@ zh_tw: pending: 待審核 is_pending: 待審核 personal_plugins: + year: "年度" author : "著作人" edit_brief_intro : "編輯摘要" brief_intro : "摘要" diff --git a/config/routes.rb b/config/routes.rb index f3b9967..afe2d50 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -100,6 +100,8 @@ Orbit::Application.routes.draw do match "edit_privilege" => "members#edit_privilege" ,:as => :edit_privilege, via: [:get, :post] end + get 'members/:name-:uid/:show_plugin_profile' => "members#show", :as=> :show_plugin_profile + resources :personal_plugins resources :roles do