Add Brief intro. for all personal plugins
Add Share Setting for Personal Plugins ( if have old data must be add default value "field: is_hidden => false " ) Apply New UI to Member Plugin Edit Page Personal Plugin Summary fix Academic Info. list fix
This commit is contained in:
1 parent
b487740035
commit
a067bcd304
159 files changed
+5145
-3453
No files matched your search
@@ -0,0 +1,83 @@
|
||||
class Admin::PersonalPluginIntrosController < OrbitMemberController
|
||||
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
|
||||
before_filter :authenticate_user!
|
||||
before_filter :is_admin?
|
||||
|
||||
|
||||
def index
|
||||
|
||||
get_types
|
||||
@plugin_intro = @types.where(:user_id => params[:user_id]).first
|
||||
|
||||
if @plugin_intro.blank?
|
||||
|
||||
@set_type = @types.new()
|
||||
@url = eval("panel_#{@app_type_name}_back_end_#{@app_type}s_path(:user_id=>params[:user_id])")
|
||||
@verb = :post
|
||||
|
||||
else
|
||||
|
||||
@set_type = @types.find(@plugin_intro.id)
|
||||
@url = polymorphic_path(["panel_#{@app_type_name}_back_end", @plugin_intro])
|
||||
@verb = :put
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def show
|
||||
|
||||
end
|
||||
|
||||
|
||||
def new
|
||||
end
|
||||
|
||||
|
||||
def edit
|
||||
end
|
||||
|
||||
def create
|
||||
|
||||
get_types
|
||||
|
||||
@plugin_intro = @types.new(params[:plugin_intro])
|
||||
|
||||
respond_to do |format|
|
||||
if @plugin_intro.save
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:plugin_intro][:user_id],:show_plugin_profile=>@reback_name)) }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def update
|
||||
|
||||
get_types
|
||||
|
||||
@plugin_intro = @types.find(params[:id])
|
||||
|
||||
respond_to do |format|
|
||||
|
||||
if @plugin_intro.update_attributes(params[:plugin_intro])
|
||||
format.html { redirect_to(admin_users_new_interface_url(:id=>params[:plugin_intro][:user_id],:show_plugin_profile=>@reback_name)) }
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
def destroy
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def get_types
|
||||
@types = @app_type.classify.constantize
|
||||
end
|
||||
|
||||
end
|
||||
@@ -98,9 +98,11 @@ class Admin::UsersNewInterfaceController < OrbitMemberController
|
||||
|
||||
|
||||
if(!params[:show_plugin_profile].nil?)
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_key(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary'
|
||||
@right_partial = OrbitApp::Plugin::Registration.find_by_app_name(params[:show_plugin_profile]).profile_partial_path rescue 'plugin_summary'
|
||||
@plugin_app_name = OrbitApp::Plugin::Registration.find_by_app_name(params[:show_plugin_profile]).name rescue nil
|
||||
else
|
||||
@right_partial = "plugin_summary"
|
||||
@plugin_app_name = ''
|
||||
end
|
||||
|
||||
# @user.attribute_values.each{|att_val|
|
||||
|
||||
Reference in new issue
Block a user