mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
adds necessary code to permit navi gami plugin to add data in user profile view
This commit is contained in:
parent
ff20b4c5d3
commit
822705c54c
@ -214,7 +214,7 @@ Application.Controllers.controller "EditProfileController", ["$scope", "$rootSco
|
||||
Application.Controllers.controller "ShowProfileController", ["$scope", 'memberPromise', 'SocialNetworks', ($scope, memberPromise, SocialNetworks) ->
|
||||
|
||||
## Selected user's informations
|
||||
$scope.user = memberPromise
|
||||
$scope.user = memberPromise # DEPENDENCY WITH NAVINUM GAMIFICATION PLUGIN !!!!
|
||||
|
||||
## List of social networks associated with this user and toggle 'show all' state
|
||||
$scope.social =
|
||||
|
@ -37,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 profile-top-badge">
|
||||
<%= PluginRegistry.code_insertions["html.user.profile"] %>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@ -126,4 +127,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
json.extract! @member, :id, :username, :email, :group_id, :slug, :invoicing_disabled, :is_allow_contact
|
||||
json.extract! @member, :id, :uid, :username, :email, :group_id, :slug, :invoicing_disabled, :is_allow_contact
|
||||
json.role @member.roles.first.name
|
||||
json.name @member.profile.full_name
|
||||
json.need_completion @member.need_completion?
|
||||
|
@ -62,6 +62,10 @@ module Plugin
|
||||
assets << [full_path, opts]
|
||||
end
|
||||
|
||||
def register_html_code_insertion(key, html_code)
|
||||
PluginRegistry.code_insertions[key] = html_code
|
||||
end
|
||||
|
||||
def register_css(style) # useless ?
|
||||
styles << style
|
||||
end
|
||||
|
@ -14,6 +14,10 @@ class PluginRegistry
|
||||
def stylesheets
|
||||
@stylesheets ||= Set.new
|
||||
end
|
||||
|
||||
def code_insertions
|
||||
@code_insertions ||= {}
|
||||
end
|
||||
end
|
||||
|
||||
def self.register_glob(root, extension, options=nil)
|
||||
|
Loading…
Reference in New Issue
Block a user