1
0
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:
Nicolas Florentin 2016-05-24 11:43:47 +02:00
parent ff20b4c5d3
commit 822705c54c
5 changed files with 12 additions and 3 deletions

View File

@ -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 =

View File

@ -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>

View File

@ -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?

View File

@ -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

View File

@ -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)