social_stream 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. data/Rakefile +0 -12
  2. data/app/controllers/activities_controller.rb +17 -1
  3. data/app/controllers/api_controller.rb +2 -2
  4. data/app/controllers/avatars_controller.rb +44 -0
  5. data/app/controllers/contacts_controller.rb +13 -21
  6. data/app/controllers/conversations_controller.rb +107 -0
  7. data/app/controllers/groups_controller.rb +7 -11
  8. data/app/controllers/messages_controller.rb +21 -88
  9. data/app/controllers/profiles_controller.rb +3 -1
  10. data/app/controllers/pshb_controller.rb +37 -1
  11. data/app/controllers/ties_controller.rb +7 -8
  12. data/app/controllers/users_controller.rb +19 -43
  13. data/app/helpers/location_helper.rb +34 -0
  14. data/app/helpers/subjects_helper.rb +18 -1
  15. data/app/models/activity.rb +67 -27
  16. data/app/models/activity_verb.rb +1 -1
  17. data/app/models/actor.rb +85 -37
  18. data/app/models/avatar.rb +90 -0
  19. data/app/models/group.rb +2 -2
  20. data/app/models/profile.rb +8 -0
  21. data/app/models/tie.rb +20 -22
  22. data/app/models/user.rb +2 -8
  23. data/app/views/activities/_index.html.erb +22 -0
  24. data/app/views/activities/_options.html.erb +3 -1
  25. data/app/views/activities/_root.html.erb +4 -2
  26. data/app/views/activities/_walls.html.erb +34 -0
  27. data/app/views/activities/index.js.erb +1 -0
  28. data/app/views/avatars/_form.html.erb +23 -0
  29. data/app/views/{logos → avatars}/_precrop.html.erb +23 -15
  30. data/app/views/avatars/edit.html.erb +6 -0
  31. data/app/views/avatars/index.html.erb +42 -0
  32. data/app/views/{logos → avatars}/new.html.erb +7 -11
  33. data/app/views/avatars/show.html.erb +5 -0
  34. data/app/views/contacts/_index.html.erb +33 -0
  35. data/app/views/contacts/index.html.erb +35 -2
  36. data/app/views/contacts/index.js.erb +1 -0
  37. data/app/views/conversations/_conversation.html.erb +37 -0
  38. data/app/views/conversations/_conversation_full.html.erb +52 -0
  39. data/app/views/{messages → conversations}/_conversations.html.erb +2 -1
  40. data/app/views/conversations/_index.html.erb +23 -0
  41. data/app/views/{messages → conversations}/_menu_options.html.erb +2 -2
  42. data/app/views/conversations/_show.html.erb +21 -0
  43. data/app/views/{messages → conversations}/edit.html.erb +0 -0
  44. data/app/views/{messages → conversations}/index.html.erb +1 -3
  45. data/app/views/conversations/index.js.erb +7 -0
  46. data/app/views/conversations/show.html.erb +47 -0
  47. data/app/views/conversations/show.js.erb +39 -0
  48. data/app/views/frontpage/_header.html.erb +5 -1
  49. data/app/views/groups/_new.html.erb +50 -48
  50. data/app/views/groups/_sidebar_show.html.erb +1 -1
  51. data/app/views/groups/index.html.erb +1 -1
  52. data/app/views/groups/new.html.erb +6 -1
  53. data/app/views/groups/show.html.erb +1 -3
  54. data/app/views/home/_menu.html.erb +46 -0
  55. data/app/views/home/_sidebar.html.erb +12 -0
  56. data/app/views/home/index.html.erb +3 -3
  57. data/app/views/layouts/application.html.erb +1 -1
  58. data/app/views/layouts/test.html +58 -41
  59. data/app/views/location/_location.html.erb +3 -0
  60. data/app/views/messages/_form.html.erb +5 -52
  61. data/app/views/messages/_message.html.erb +31 -0
  62. data/app/views/messages/_new.html.erb +10 -16
  63. data/app/views/messages/new.html.erb +48 -3
  64. data/app/views/messages/new.js.erb +38 -1
  65. data/app/views/profiles/_profile.html.erb +194 -0
  66. data/app/views/profiles/edit.html.erb +168 -0
  67. data/app/views/profiles/show.html.erb +2 -175
  68. data/app/views/{users → profiles}/update.js.erb +12 -15
  69. data/app/views/subjects/_contacts.html.erb +2 -3
  70. data/app/views/subjects/_toolbar_home.html.erb +1 -1
  71. data/app/views/subjects/_toolbar_home_menu.html.erb +4 -1
  72. data/app/views/subjects/_toolbar_home_menu_options.html.erb +4 -7
  73. data/app/views/subjects/_toolbar_home_menu_options_subjects.html.erb +0 -3
  74. data/app/views/subjects/_toolbar_logo.html.erb +1 -1
  75. data/app/views/subjects/_toolbar_message_menu.html.erb +17 -0
  76. data/app/views/subjects/_toolbar_profile.html.erb +4 -12
  77. data/app/views/subjects/_toolbar_profile_menu.html.erb +9 -10
  78. data/app/views/subjects/_toolbar_profile_menu_basic_options.html.erb +6 -5
  79. data/app/views/subjects/_toolbar_profile_menu_tie_options.html.erb +13 -13
  80. data/app/views/ties/_new.html.erb +30 -25
  81. data/app/views/ties/_suggestions.html.erb +1 -0
  82. data/app/views/ties/new.js.erb +2 -0
  83. data/app/views/users/_index.html.erb +1 -1
  84. data/app/views/users/index.html.erb +1 -3
  85. data/app/views/users/show.html.erb +4 -3
  86. data/config/locales/en.yml +79 -24
  87. data/config/routes.rb +8 -2
  88. data/lib/generators/social_stream/install_generator.rb +1 -1
  89. data/lib/generators/social_stream/templates/migration.rb +17 -11
  90. data/lib/generators/social_stream/templates/public/images/btn/message_conversation.png +0 -0
  91. data/lib/generators/social_stream/templates/public/images/btn/message_inbox.png +0 -0
  92. data/lib/generators/social_stream/templates/public/images/btn/message_new.png +0 -0
  93. data/lib/generators/social_stream/templates/public/images/btn/message_sentbox.png +0 -0
  94. data/lib/generators/social_stream/templates/public/images/btn/message_trash.png +0 -0
  95. data/lib/generators/social_stream/templates/public/javascripts/ajax.paginate.js +1 -1
  96. data/lib/generators/social_stream/templates/public/javascripts/menu.js +9 -99
  97. data/lib/generators/social_stream/templates/public/stylesheets/default/base.css +14 -5
  98. data/lib/generators/social_stream/templates/public/stylesheets/default/home.css +1 -0
  99. data/lib/generators/social_stream/templates/public/stylesheets/default/jquery-ui.css +13 -10
  100. data/lib/generators/social_stream/templates/public/stylesheets/default/menu.css +5 -11
  101. data/lib/generators/social_stream/templates/public/stylesheets/default/messages.css +96 -20
  102. data/lib/generators/social_stream/templates/relations.yml +1 -0
  103. data/lib/paperclip/social_stream.rb +1 -1
  104. data/lib/social_stream/ability.rb +1 -0
  105. data/lib/social_stream/controllers/helpers.rb +20 -0
  106. data/lib/social_stream/models/subject.rb +13 -12
  107. data/lib/social_stream/rails.rb +4 -1
  108. data/lib/social_stream/version.rb +1 -1
  109. data/lib/tasks/db/populate.rake +14 -4
  110. data/social_stream.gemspec +31 -5
  111. data/spec/controllers/contacts_controller_spec.rb +6 -0
  112. data/spec/controllers/profiles_controller_spec.rb +3 -4
  113. data/spec/dummy/config/initializers/devise.rb +4 -1
  114. data/spec/dummy/config/relations.yml +1 -0
  115. data/spec/models/activity_spec.rb +24 -0
  116. metadata +91 -89
  117. data/app/controllers/logos_controller.rb +0 -37
  118. data/app/models/logo.rb +0 -88
  119. data/app/views/activities/_activities.html.erb +0 -46
  120. data/app/views/groups/_profile.html.erb +0 -142
  121. data/app/views/groups/edit.html.erb +0 -135
  122. data/app/views/groups/update.js.erb +0 -39
  123. data/app/views/logos/_form.html.erb +0 -33
  124. data/app/views/logos/edit.html.erb +0 -6
  125. data/app/views/logos/index.html.erb +0 -27
  126. data/app/views/logos/show.html.erb +0 -5
  127. data/app/views/menu/_group.html.erb +0 -15
  128. data/app/views/menu/_home_user.html.erb +0 -0
  129. data/app/views/menu/_optionsGroups.html.erb +0 -11
  130. data/app/views/menu/_optionsUser.html.erb +0 -11
  131. data/app/views/menu/_services.html.erb +0 -11
  132. data/app/views/menu/_tiesGroup.html.erb +0 -14
  133. data/app/views/menu/_tiesUser.html.erb +0 -11
  134. data/app/views/menu/_user.html.erb +0 -15
  135. data/app/views/messages/_conversation.html.erb +0 -34
  136. data/app/views/messages/_conversation_full.html.erb +0 -65
  137. data/app/views/messages/_index.html.erb +0 -19
  138. data/app/views/messages/_location.html.erb +0 -3
  139. data/app/views/messages/_show.html.erb +0 -22
  140. data/app/views/messages/index.js.erb +0 -1
  141. data/app/views/messages/show.html.erb +0 -10
  142. data/app/views/messages/show.js.erb +0 -1
  143. data/app/views/users/_profile.html.erb +0 -171
  144. data/app/views/users/_sidebar_show.html.erb +0 -1
  145. data/app/views/users/edit.html.erb +0 -194
@@ -1,39 +0,0 @@
1
-
2
- <% puts "llego al js" %>
3
-
4
- if ($("#notice").length == 0){
5
-
6
- $("#content").prepend('<div id="notice"></div>');
7
-
8
- }
9
-
10
- <% if @group.valid? %>
11
-
12
- $("#notice").html("<h2>Form Submitted!</h2><br/>");
13
- $("#notice").removeClass('error_explanation');
14
- $("#notice").addClass('confirmed');
15
- $("#sidebarContent").replaceWith("<%= escape_javascript(render(:partial => 'sidebar_show'))%>");
16
-
17
- $("#contact_info").addClass('section_normal');
18
- $("#personal_info").addClass('section_normal');
19
-
20
- <% if !params[:section].present? or params[:section].eql?("about_us") %>
21
- $("#personal_info").removeClass('section_normal');
22
- $("#personal_info").addClass('section_highlight');
23
- <%end%>
24
-
25
- <% if !params[:section].present? or params[:section].eql?("contact_info") %>
26
- $("#contact_info").removeClass('section_normal');
27
- $("#contact_info").addClass('section_highlight');
28
- <%end%>
29
-
30
-
31
- <% else %>
32
- $("#notice").html("<h2><%= pluralize(@group.errors.count, "error") %> prohibited this user from being saved:</h2>"
33
- +"<ul><% @group.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul><br/>");
34
- $("#notice").removeClass('confirmed');
35
- $("#notice").addClass('error_explanation');
36
-
37
- <% end %>
38
-
39
-
@@ -1,33 +0,0 @@
1
-
2
- <% content_for :javascript do %>
3
-
4
-
5
- $('#new_logoA_form')
6
- .bind("ajax:complete", function(evt, data, status, xhr){
7
-
8
- // Insert response partial into page below the form.
9
- $('#prueba').append(xhr.responseText);
10
-
11
- });
12
-
13
- <%end%>
14
-
15
-
16
- <%= form_for :logo, @logo,:url => logos_path, :html => { :multipart => true, :id=>'new_logo_form' }, :remote => false do |f| %>
17
- <% if @logo.errors.any? %>
18
- <div id="error_explanation">
19
- <h2><%= pluralize(@logo.errors.count, "error") %> prohibited this logo from being saved:</h2>
20
-
21
- <ul>
22
- <% @logo.errors.full_messages.each do |msg| %>
23
- <li><%= msg %></li>
24
- <% end %>
25
- </ul>
26
- </div>
27
- <% end %>
28
- <%= f.file_field :logo %>
29
- <div class="actions">
30
- <%= f.submit %>
31
- </div>
32
- <div id= "prueba"></div>
33
- <% end %>
@@ -1,6 +0,0 @@
1
- <h1>Editing logo</h1>
2
-
3
- <%= render 'form' %>
4
-
5
- <%= link_to 'Show', @logo %> |
6
- <%= link_to 'Back', logos_path %>
@@ -1,27 +0,0 @@
1
- <h1>Listing logos</h1>
2
-
3
- <table>
4
- <tr>
5
- <th></th>
6
- <th></th>
7
- <th></th>
8
- </tr>
9
-
10
- <% @logos.each do |logo| %>
11
- <tr>
12
- <% #debugger %>
13
- <td><%= image_tag logo.logo.url(:profile) %></image_tag></td>
14
- <td><%= image_tag logo.logo.url(:tie) %></image_tag></td>
15
- <td><% image_tag logo.logo.url() %></image_tag></td>
16
- <td><%= image_tag logo.logo.url(:actor) %></image_tag></td>
17
-
18
- <td><%= link_to 'Show', logo %></td>
19
- <td><%= link_to 'Edit', edit_logo_path(logo) %></td>
20
- <td><%= link_to 'Destroy', logo, :confirm => 'Are you sure?', :method => :delete %></td>
21
- </tr>
22
- <% end %>
23
- </table>
24
-
25
- <br />
26
-
27
- <%= link_to 'New Logo', new_logo_path %>
@@ -1,5 +0,0 @@
1
- <p id="notice"><%= notice %></p>
2
-
3
-
4
- <%= link_to 'Edit', edit_logo_path(@logo) %> |
5
- <%= link_to 'Back', logos_path %>
@@ -1,15 +0,0 @@
1
- <div class="menu_header"><b><%=t('tie.options')%></b>
2
- </div>
3
- <div id="menu_lateral_ties">
4
- <%= render :partial => "menu/tiesGroup" %>
5
- </div>
6
- <div class="space_center">
7
- </div>
8
-
9
- <div class="menu_header"><b><%=t('menu.options')%></b>
10
- </div>
11
- <div id="menu_lateral">
12
- <%= render :partial => "menu/optionsGroups" %>
13
- </div>
14
- <div class="space_center">
15
- </div>
File without changes
@@ -1,11 +0,0 @@
1
- <ul class="menu noaccordion">
2
- <li>
3
- <%= link_to( image_tag("btn/btn_inbox.png", :class => "menu_icon")+t('inbox.one'), messages_path) %>
4
- </li>
5
- <li>
6
- <%= link_to( image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'), [@group, :profile]) %>
7
- </li>
8
- <li>
9
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('contact.other'), '#') %>
10
- </li>
11
- </ul>
@@ -1,11 +0,0 @@
1
- <ul class="menu noaccordion">
2
- <li>
3
- <%= link_to( image_tag("btn/btn_inbox.png", :class => "menu_icon")+t('inbox.one'), messages_path) %>
4
- </li>
5
- <li>
6
- <%= link_to( image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'), [@user, :profile]) %>
7
- </li>
8
- <li>
9
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('contact.other'), '#') %>
10
- </li>
11
- </ul>
@@ -1,11 +0,0 @@
1
- <ul class="menu noaccordion">
2
- <li>
3
- <%= link_to( image_tag("btn/btn_inbox.png", :class => "menu_icon")+t('inbox.one'), '#') %>
4
- </li>
5
- <li>
6
- <%= link_to( image_tag("btn/btn_edit.png", :class => "menu_icon")+t('menu.information'), '#') %>
7
- </li>
8
- <li>
9
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('contact.other'), '#') %>
10
- </li>
11
- </ul>
@@ -1,14 +0,0 @@
1
- <ul class="menu noaccordion">
2
- <li>
3
- <%= link_to( image_tag("btn/btn_bookmark.png", :class => "menu_icon")+t('tie.add.bookmark'), '#') %>
4
- </li>
5
- <li>
6
- <%= link_to( image_tag("btn/twitter-follow-icon.png", :size => "19x19", :class => "menu_icon")+t('tie.add.follow'), '#') %>
7
- </li>
8
- <li>
9
- <%= link_to( image_tag("btn/btn_partner.png", :class => "menu_icon")+t('tie.add.partner'), '#') %>
10
- </li>
11
- <li>
12
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('tie.add.contact'), '#') %>
13
- </li>
14
- </ul>
@@ -1,11 +0,0 @@
1
- <ul class="menu noaccordion">
2
- <li>
3
- <%= link_to( image_tag("btn/btn_bookmark.png", :class => "menu_icon")+t('tie.add.bookmark'), '#') %>
4
- </li>
5
- <li>
6
- <%= link_to( image_tag("btn/twitter-follow-icon.png", :size => "19x19", :class => "menu_icon")+t('tie.add.follow'), '#') %>
7
- </li>
8
- <li >
9
- <%= link_to( image_tag("btn/btn_friend.png", :class => "menu_icon")+t('tie.add.contact'), '#') %>
10
- </li>
11
- </ul>
@@ -1,15 +0,0 @@
1
- <div class="menu_header"><b><%=t('tie.options')%></b>
2
- </div>
3
- <div id="menu_lateral_tie">
4
- <%= render :partial => "menu/tiesUser" %>
5
- </div>
6
- <div class="space_center">
7
- </div>
8
-
9
- <div class="menu_header"><b><%=t('menu.options')%></b>
10
- </div>
11
- <div id="menu_lateral">
12
- <%= render :partial => "menu/optionsUser" %>
13
- </div>
14
- <div class="space_center">
15
- </div>
@@ -1,34 +0,0 @@
1
- <%= div_for(conversation, :class => active) do %>
2
- <div class="actor_photo">
3
- <%= link_to image_tag(conversation.last_sender.logo.url(:actor),
4
- :title => conversation.last_sender.name, :alt => conversation.last_sender.name),
5
- conversation.last_sender.subject %>
6
- </div>
7
- <div class="content_left">
8
- <div class="actor_name">
9
- <%= link_to conversation.last_sender.name, conversation.last_sender.subject %>
10
- </div>
11
- <div class="date">
12
- <%= conversation.updated_at %>
13
- </div>
14
- </div>
15
- <div class="content_right">
16
- <div class="subject">
17
- <%= link_to(conversation.subject, message_path(conversation.id,:box => @box)) %>
18
- </div>
19
- <div class="briefing">
20
- <%= truncate(conversation.last_message.body, :length => 50) %>
21
- </div>
22
- <div class="clearfloat"></div>
23
- </div>
24
-
25
- <% unless @box.eql?'trash' %>
26
- <div class="action">
27
- <%= link_to(image_tag('btn/btn_delete.png', :atl => "Delete", :title => "Delete"),
28
- message_path(conversation, :location => @box, :box => @box),
29
- :confirm => 'Do you want to move "' + conversation.subject + '" to trash?',
30
- :method => :delete, :remote => true) %>
31
- </div>
32
- <% end %>
33
- <div class="clearfloat"></div>
34
- <% end %>
@@ -1,65 +0,0 @@
1
- <% content_for :headers do %>
2
- <%= javascript_include_tag 'ckeditor/ckeditor.js','ckeditor/adapters/jquery.js','jquery.scrollTo.min.jsjquery.scrollTo.min.js', 'jquery.validate' %>
3
- <% end %>
4
-
5
- <% content_for :javascript do %>
6
- $('.cont_conversation').validate();
7
- <% unless @box.eql?'trash' %>
8
- $('#body').ckeditor(
9
- function(){$('#cke_top_body').click( updateTextArea);},
10
- function() {$.scrollTo('#message_<%= conversation.last_message.id %>');},
11
- { width:493 }
12
- );
13
- var editor = $('#body').ckeditorGet();
14
- editor.on("instanceReady", function(){
15
- this.document.on("keyup", updateTextArea);
16
- this.document.on("paste", updateTextArea);
17
- this.document.on("mousedown", updateTextArea);
18
- });
19
-
20
- var updateTextArea = function (){
21
- editor.updateElement();
22
- $("#body").trigger('keyup');
23
- }
24
- <% else %>
25
- $.scrollTo('#message_<%= conversation.last_message.id %>');
26
- <% end %>
27
- <% end %>
28
-
29
- <%= div_for (conversation) do %>
30
- <%= conversation.subject %>
31
- <br>
32
- Actions: <% unless @box.eql?'trash' %><%= link_to ( image_tag('btn/btn_delete.png', :atl => "Delete", :title => "Delete"),
33
- message_path(conversation, :location => 'conversation', :box => @box),
34
- :confirm => 'Do you want to move "' + conversation.subject + '" to trash?',
35
- :method => :delete, :remote => true) %><% end %>
36
- <br>
37
- <% conversation.get_recipients.each do |recp| %>
38
- <%= link_to image_tag(recp.logo.url(:tie), :title=>recp.name, :alt => recp.name), recp.subject %>
39
- <% end %><br>
40
-
41
- <% @receipts.each do |receipt| %>
42
- <% message= receipt.message %>
43
- <%= div_for (message) do%>
44
- <%= link_to image_tag(message.sender.logo.url(:tie),:alt => message.sender.name,:title =>message.sender.name), message.sender.subject %><br>
45
- <%= message.sender.name %> on <%= message.created_at %> said:<br>
46
- <%= raw (message.body) %>
47
- <% end %>
48
- <% end %>
49
- <% unless @box.eql?'trash' %>
50
- Write your answer:<br>
51
- <% form_tag message_path(conversation.id), :method => :put, :class => "cont_conversation" do %>
52
- <div class="block">
53
- <div class="form_row">
54
- <%= label_tag :body %>
55
- </div>
56
- <div class="form_row">
57
- <%= text_area_tag :body, nil,:rows =>6, :cols=> 53, :class => "required form_tag" %>
58
- </div>
59
- <div class="actions center">
60
- <%= submit_tag "Reply", :name => :reply_all,:class => "button" %>
61
- </div>
62
- </div>
63
- <% end %>
64
- <%end %>
65
- <% end %>
@@ -1,19 +0,0 @@
1
- <% content_for :headers do %>
2
- <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
3
- <% end %>
4
-
5
- <%= render :partial => 'location' %>
6
-
7
- <br class="clearfloat" />
8
- <div class="space_center">
9
- </div>
10
-
11
- <div id="new_message" ><%= link_to 'Back', :action=>:index %></div>
12
- <div class="space_center">
13
- </div><div class="space_center">
14
- </div>
15
-
16
- <h2><%= t('message.' + @box) %></h2>
17
- <div id="conversations">
18
- <%= render :partial => 'conversations' %>
19
- </div>
@@ -1,3 +0,0 @@
1
- <div id="map_location" class="content_size">
2
- <%= t('location.message', :location => "#{ image_tag('btn/btn_inbox.png' , :class => 'btn_config') } #{ t('message.' + @box) }: <span class=\"name_group\">#{ sanitize current_subject.name }</span>").html_safe %>
3
- </div>
@@ -1,22 +0,0 @@
1
- <% content_for :headers do %>
2
- <%= stylesheet_link_tag "messages.css", :media => "screen, projection" %>
3
- <% end %>
4
-
5
- <%= render :partial => 'location' %>
6
- <br class="clearfloat" />
7
- <div class="space_center">
8
- </div>
9
- <div id="new_message">
10
- <% if @box.present? %>
11
- <%= link_to 'Back', messages_path(:box => @box) %>
12
- <% else %>
13
- <%= link_to 'Back', messages_path %>
14
- <% end %>
15
- </div>
16
- <div class="space_center">
17
- </div>
18
- <div class="space_center">
19
- </div>
20
- <div id="conversation">
21
- <%= render :partial => 'conversation_full', :locals =>{:conversation => @conversation} %>
22
- </div>
@@ -1 +0,0 @@
1
- $("#content").html("<%=escape_javascript(render :partial => 'index') %>");
@@ -1,10 +0,0 @@
1
- <% content_for :sidebar do %>
2
- <%= render :partial => 'home/sidebar' %>
3
- <% end %>
4
-
5
- <% toolbar :option => :messages do %>
6
- <%= render :partial => 'menu_options' %>
7
- <% end %>
8
-
9
-
10
- <%= render :partial => 'show' %>
@@ -1 +0,0 @@
1
- $("#content").html("<%=escape_javascript(render :partial => 'show') %>");
@@ -1,171 +0,0 @@
1
- <div class="space_center"></div>
2
- <div class="block" id="personal_info" >
3
- <div class="header">
4
- <div class="header_text">
5
- <%=t('edit.personal_info')%>
6
- </div>
7
- <div class="header_icon_right">
8
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :users, :action => :edit, :section => :about_me %>
9
- </div>
10
- </div>
11
- <div class="content">
12
- <div class="sub-block" >
13
- <% if @user.profile.organization? %>
14
- <div class="row">
15
- <div class="label">
16
- <%=t('edit.organization')%>:
17
- </div>
18
- <div class="field">
19
- <%=h @user.profile.organization %>
20
- </div>
21
- </div>
22
- <%end%>
23
- <% if @user.profile.birthday? %>
24
- <div class="row">
25
- <div class="label">
26
- <%=t('edit.birthday')%>:
27
- </div>
28
- <div class="field">
29
- <%=h I18n.l @user.profile.birthday, :format => :long %>
30
- </div>
31
- </div>
32
- <div class="row">
33
- <div class="label">
34
- Age:
35
- </div>
36
- <div class="field">
37
- <%=h @user.age %>
38
- </div>
39
- </div>
40
- <%end%>
41
- <% if @user.profile.city? %>
42
- <div class="row">
43
- <div class="label">
44
- <%=t('edit.actualcity')%>:
45
- </div>
46
- <div class="field">
47
- <%=h @user.profile.city %>
48
- <% if @user.profile.country? %>
49
- , <%=@user.profile.country%>
50
- <%end%>
51
- </div>
52
- </div>
53
- <%end%>
54
- <% if @user.profile.description? %>
55
- <div class="row">
56
- <div class="label">
57
- <%=t('edit.aboutme')%>:
58
- </div>
59
- <div class="row">
60
- <%=h @user.profile.description %>
61
- </div>
62
- </div>
63
- <%end%>
64
- </div>
65
- </div>
66
- </div>
67
-
68
- <div class="space_center"></div>
69
- <div class="block" id="contact_info">
70
- <div class="header">
71
- <div class="header_text">
72
- <%=t('edit.contact')%>
73
- </div>
74
- <div class="header_icon_right">
75
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :users, :action => :edit, :section => :contact_info %>
76
- </div>
77
- </div>
78
- <div class="content">
79
- <% if @user.profile.phone? %>
80
- <div class="row">
81
- <div class="label">
82
- <%=t('edit.phone')%>
83
- </div>
84
- <div class="field">
85
- <%=h @user.profile.phone %>
86
- </div>
87
- </div>
88
- <%end%>
89
- <% if @user.profile.mobile? %>
90
- <div class="row">
91
- <div class="label">
92
- <%=t('edit.mobile')%>
93
- </div>
94
- <div class="field">
95
- <%=h @user.profile.mobile %>
96
- </div>
97
- </div>
98
- <%end%>
99
- <% if @user.profile.fax? %>
100
- <div class="row">
101
- <div class="label">
102
- <%=t('edit.fax')%>
103
- </div>
104
- <div class="field">
105
- <%=h @user.profile.fax %>
106
- </div>
107
- </div>
108
- <%end%>
109
- <% if @user.profile.address? %>
110
- <div class="row">
111
- <div class="label">
112
- <%=t('edit.address')%>
113
- </div>
114
- <div class="field">
115
- <%=h @user.profile.address %>
116
- </div>
117
- </div>
118
- <%end%>
119
- <% if @user.profile.website? %>
120
- <div class="row">
121
- <div class="label">
122
- <%=t('edit.website')%>
123
- </div>
124
- <div class="field">
125
- <a href="<%=h @user.profile.website %>"><%=h @user.profile.website %></a>
126
- </div>
127
- </div>
128
- <%end%>
129
-
130
- <div class="row">
131
- <div class="label">
132
- <%=t('edit.email')%>:
133
- </div>
134
- <div class="row">
135
- <%=h @user.email %>
136
- </div>
137
- </div>
138
- </div>
139
- </div>
140
-
141
- <div class="space_center"></div>
142
- <div class="block" id="experience_info">
143
- <div class="header">
144
- <div class="header_text">
145
- <%=t('edit.experience')%>
146
- </div>
147
- <div class="header_icon_right">
148
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :users, :action => :edit, :section => :my_experience %>
149
- </div>
150
- </div>
151
- <div class="content">
152
- <div class="row">
153
- <%=h @user.profile.experience %>
154
- </div>
155
- </div>
156
- </div>
157
-
158
- <div class="space_center"></div>
159
- <% if (@user.to_param==current_user.to_param and @user.authentication_token) %>
160
- <div class="block" id="developer_info">
161
- <div class="header">
162
- <div class="header_text">
163
- ApiKey: <%= @user.authentication_token %>
164
- </div>
165
- <div class="header_icon_right">
166
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :api,
167
- :action => :create_key %>
168
- </div>
169
- </div>
170
- </div>
171
- <% end %>