forked from saurabh/orbit4-5
Update personal plugin
This commit is contained in:
parent
d70b64299d
commit
8d8bb6a1d5
|
@ -42,8 +42,7 @@ class Admin::DashboardsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_disk_usage
|
def get_disk_usage
|
||||||
@usw = Usagewatch
|
render :json => `df -m /home`.scan(/\d+%/).first.gsub('%','') rescue '0'
|
||||||
render :json => @usw.uw_diskused_perc.to_s
|
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -12,6 +12,11 @@ module Slug
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_param
|
def to_param
|
||||||
|
if self.uid.blank?
|
||||||
|
generate_uid
|
||||||
|
self.save
|
||||||
|
end
|
||||||
|
|
||||||
(self.slug_title.gsub(/[ "'*@#$%^&()+=;:.,?>|\\\/<~_!:,、。!?;「」〈〉【】/]/,'-')+"-"+self.uid).gsub(/-{2,}/,'-') rescue "-"+self.uid
|
(self.slug_title.gsub(/[ "'*@#$%^&()+=;:.,?>|\\\/<~_!:,、。!?;「」〈〉【】/]/,'-')+"-"+self.uid).gsub(/-{2,}/,'-') rescue "-"+self.uid
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,8 @@
|
||||||
|
|
||||||
<% @plugin_shows.each do |plugin| %>
|
<% @plugin_shows.each do |plugin| %>
|
||||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin["app_name"] ? "active" : nil) do %>
|
<%= 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 -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
<div id="module-nav">
|
<div id="module-nav">
|
||||||
<div class="arrow_next pull-right"><i class="icon-chevron-right"></i></div>
|
<div class="arrow_next pull-right"><i class="icon-chevron-right"></i></div>
|
||||||
<div class="arrow_prev pull-left"><i class="icon-chevron-left"></i></div>
|
<div class="arrow_prev pull-left"><i class="icon-chevron-left"></i></div>
|
||||||
<div class="module-nav-view">
|
<div class="module-nav-view">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<%= content_tag :li, :class=>(params[:show_plugin_profile].nil? ? "active" : nil) do %>
|
<%= content_tag :li, :class=>(@plugin.nil? ? "active" : nil) do %>
|
||||||
<%= link_to t(:all_plugin_summary)%>
|
<%= link_to t(:all_plugin_summary)%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% @plugins.each do |plugin| %>
|
<% OrbitApp::Plugin::Registration.all.each do |plugin| %>
|
||||||
<%= content_tag :li, :class=>(params[:show_plugin_profile] == plugin.app_name ? "active" : nil) do %>
|
<%= content_tag :li, :class=>(@plugin == plugin ? "active" : nil) do %>
|
||||||
<%= link_to plugin.name, admin_personal_plugins_path(:show_plugin_profile => plugin.app_name) %>
|
<%= link_to plugin.name, admin_personal_plugins_path(:show_plugin_profile => plugin.app_name) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,59 @@
|
||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><%= current_site.title %> | <%= t('dashboard_') %></title>
|
||||||
|
<%= 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 %>
|
||||||
|
</head>
|
||||||
|
<body id="users">
|
||||||
|
<%= 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'} %>
|
||||||
|
<section id="main-wrap">
|
||||||
|
<div class="wrap-inner">
|
||||||
|
<div id="filter" class="topnav clearfix">
|
||||||
|
<ul class="breadcrumb text-info pull-left">
|
||||||
|
<% if !@role.blank? %>
|
||||||
|
<li><%= link_to( t("role"), admin_roles_path ) %> <span class="divider">/</span></li>
|
||||||
|
<li class="active">( <%= @role.title %> ) <%= t(@app_type_name) %></a></li>
|
||||||
|
<% elsif !@attribute.blank? %>
|
||||||
|
<li><%= link_to( t("#{@attribute_type}"), admin_roles_path ) %><span class="divider">/</span></li>
|
||||||
|
<li class="active"><%= @attribute.title %></a></li>
|
||||||
|
<% else %>
|
||||||
|
<li><a href="<%= admin_members_path %>"><%= t(:member_) %></a> <span class="divider">/</span></li>
|
||||||
|
<% if !@plugin.blank? %>
|
||||||
|
<li class="active">
|
||||||
|
<a href="<%= @plugin.admin_partial_path %>">
|
||||||
|
<%= @plugin.name %>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<% end %>
|
||||||
|
<% if !params[:action].eql?('index') %>
|
||||||
|
<% if params[:action].eql?('new') %>
|
||||||
|
<li><span class="divider">/</span></li>
|
||||||
|
<li class='active'><%= t(:new_) %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><span class="divider">/</span></li>
|
||||||
|
<li class='active'><%= t(params[:action]) %></li>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
<%= yield :right_nav %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="subnav">
|
||||||
|
<%= render 'admin/personal_plugins/plugin_list' %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<%= yield %>
|
||||||
|
<%= javascript_include_tag "lib/pageslide.js" %>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -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'
|
gem 'faq', git: 'git@gitlab.tp.rulingcom.com:saurabh/faq.git'
|
||||||
#Personal Plugins
|
#Personal Plugins
|
||||||
gem 'personal_journal', git: 'git@gitlab.tp.rulingcom.com:saurabh/personal-journal.git'
|
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
|
#widgets
|
||||||
gem "site_menu_widget", git: 'git@gitlab.tp.rulingcom.com:saurabh/site-menu-widget.git'
|
gem "site_menu_widget", git: 'git@gitlab.tp.rulingcom.com:saurabh/site-menu-widget.git'
|
||||||
|
|
|
@ -388,6 +388,7 @@ en:
|
||||||
pending: Pending
|
pending: Pending
|
||||||
is_pending: Pending
|
is_pending: Pending
|
||||||
personal_plugins:
|
personal_plugins:
|
||||||
|
year: "Year"
|
||||||
author : "Author"
|
author : "Author"
|
||||||
edit_brief_intro : "Edit Brief Intro."
|
edit_brief_intro : "Edit Brief Intro."
|
||||||
brief_intro : "Brief Intro."
|
brief_intro : "Brief Intro."
|
||||||
|
|
|
@ -386,6 +386,7 @@ zh_tw:
|
||||||
pending: 待審核
|
pending: 待審核
|
||||||
is_pending: 待審核
|
is_pending: 待審核
|
||||||
personal_plugins:
|
personal_plugins:
|
||||||
|
year: "年度"
|
||||||
author : "著作人"
|
author : "著作人"
|
||||||
edit_brief_intro : "編輯摘要"
|
edit_brief_intro : "編輯摘要"
|
||||||
brief_intro : "摘要"
|
brief_intro : "摘要"
|
||||||
|
|
|
@ -100,6 +100,8 @@ Orbit::Application.routes.draw do
|
||||||
match "edit_privilege" => "members#edit_privilege" ,:as => :edit_privilege, via: [:get, :post]
|
match "edit_privilege" => "members#edit_privilege" ,:as => :edit_privilege, via: [:get, :post]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
get 'members/:name-:uid/:show_plugin_profile' => "members#show", :as=> :show_plugin_profile
|
||||||
|
|
||||||
resources :personal_plugins
|
resources :personal_plugins
|
||||||
|
|
||||||
resources :roles do
|
resources :roles do
|
||||||
|
|
Loading…
Reference in New Issue