Commit 82d3ed8efd444c036791dcc219dd4d3146d7a00e

Authored by Braulio Bhavamitra
2 parents 11bca1cb 1910a1d6

Merge branch 'ai3150' into 'master'

Set current profile and add name and email to user_data

http://noosfero.org/Development/ActionItem3150

See merge request !228
app/models/user.rb
... ... @@ -320,6 +320,8 @@ class User < ActiveRecord::Base
320 320  
321 321 {
322 322 'login' => self.login,
  323 + 'name' => self.person.name,
  324 + 'email' => self.email,
323 325 'avatar' => self.person.profile_custom_icon(gravatar_default),
324 326 'is_admin' => self.person.is_admin?,
325 327 'since_month' => self.person.created_at.month,
... ...
app/views/layouts/application-ng.html.erb
... ... @@ -27,6 +27,7 @@
27 27  
28 28 <script type="text/javascript">
29 29 DEFAULT_LOADING_MESSAGE = <%="'#{ _('loading...') }'" %>;
  30 + noosfero.profile = <%= (@profile.identifier if @profile).to_json %>
30 31 </script>
31 32  
32 33 </head>
... ...