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
@@ -0,0 +1,194 @@
1
+ <div class="space_center"></div>
2
+ <div class="block" id="personal_info" >
3
+ <div class="header">
4
+ <div class="header_text">
5
+ <%=t('profile.' + current_subject.class.to_s.downcase + '.info')%>
6
+ </div>
7
+ <div class="header_icon_right">
8
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "about_me"%>
9
+ </div>
10
+ </div>
11
+ <div class="content">
12
+ <div class="sub-block" >
13
+ <% if @profile.organization? %>
14
+ <div class="row">
15
+ <div class="label">
16
+ <%=t('profile.organization')%>:
17
+ </div>
18
+ <div class="field">
19
+ <%=h @profile.organization %>
20
+ </div>
21
+ </div>
22
+ <%end%>
23
+ <% if @profile.birthday? %>
24
+ <div class="row">
25
+ <div class="label">
26
+ <%=t('profile.' + current_subject.class.to_s.downcase + '.birthday')%>:
27
+ </div>
28
+ <div class="field">
29
+ <%=h I18n.l @profile.birthday, :format => :long %>
30
+ </div>
31
+ </div>
32
+ <% if current_subject.class.eql?(User) %>
33
+ <div class="row">
34
+ <div class="label">
35
+ <%=t('profile.age')%>:
36
+ </div>
37
+ <div class="field">
38
+ <%=h @profile.age %>
39
+ </div>
40
+ </div>
41
+ <%end%>
42
+ <%end%>
43
+ <% if @profile.city? %>
44
+ <div class="row">
45
+ <div class="label">
46
+ <%=t('profile.actualcity')%>:
47
+ </div>
48
+ <div class="field">
49
+ <%=h @profile.city %>
50
+ <% if @profile.country? %>
51
+ , <%=@profile.country%>
52
+ <%end%>
53
+ </div>
54
+ </div>
55
+ <%end%>
56
+ <% if @profile.description? %>
57
+ <div class="row">
58
+ <div class="label">
59
+ <%=t('profile.' + current_subject.class.to_s.downcase + '.about')%>:
60
+ </div>
61
+ <div class="row">
62
+ <%=h @profile.description %>
63
+ </div>
64
+ </div>
65
+ <%end%>
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+
71
+ <div class="space_center"></div>
72
+ <div class="block" id="contact_info">
73
+ <div class="header">
74
+ <div class="header_text">
75
+ <%=t('profile.contact')%>
76
+ </div>
77
+ <div class="header_icon_right">
78
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "contact_info"%>
79
+ </div>
80
+ </div>
81
+ <div class="content">
82
+ <div class="sub-block" >
83
+ <% if @profile.phone? %>
84
+ <div class="row">
85
+ <div class="label">
86
+ <%=t('profile.phone')%>
87
+ </div>
88
+ <div class="field">
89
+ <%=h @profile.phone %>
90
+ </div>
91
+ </div>
92
+ <%end%>
93
+ <% if @profile.mobile? %>
94
+ <div class="row">
95
+ <div class="label">
96
+ <%=t('profile.mobile')%>
97
+ </div>
98
+ <div class="field">
99
+ <%=h @profile.mobile %>
100
+ </div>
101
+ </div>
102
+ <%end%>
103
+ <% if @profile.fax? %>
104
+ <div class="row">
105
+ <div class="label">
106
+ <%=t('profile.fax')%>
107
+ </div>
108
+ <div class="field">
109
+ <%=h @profile.fax %>
110
+ </div>
111
+ </div>
112
+ <%end%>
113
+ <% if @profile.address? %>
114
+ <div class="row">
115
+ <div class="label">
116
+ <%=t('profile.address')%>
117
+ </div>
118
+ <div class="field">
119
+ <%=h @profile.address %>
120
+ </div>
121
+ </div>
122
+ <%end%>
123
+ <% if @profile.website? %>
124
+ <div class="row">
125
+ <div class="label">
126
+ <%=t('profile.website')%>
127
+ </div>
128
+ <div class="field">
129
+ <a href="<%=h @profile.website %>"><%=h @profile.website %></a>
130
+ </div>
131
+ </div>
132
+ <%end%>
133
+
134
+ <div class="row">
135
+ <div class="label">
136
+ <%=t('profile.email')%>:
137
+ </div>
138
+ <div class="field">
139
+ <%=h @profile.subject.email %>
140
+ </div>
141
+ </div>
142
+ </div>
143
+ </div>
144
+ </div>
145
+
146
+ <div class="space_center"></div>
147
+ <div class="block" id="experience_info">
148
+ <div class="header">
149
+ <div class="header_text">
150
+ <%=t('profile.' + current_subject.class.to_s.downcase + '.experience')%>
151
+ </div>
152
+ <div class="header_icon_right">
153
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :profiles , :action => :edit, :section => "my_experience"%>
154
+ </div>
155
+ </div>
156
+ <div class="content">
157
+ <div class="row">
158
+ <%=h @profile.experience %>
159
+ </div>
160
+ </div>
161
+ </div>
162
+ <% if (!@profile.blank?) && (!current_subject.blank?)%>
163
+ <% if (@profile.actor == current_subject.actor) %>
164
+ <div class="space_center"></div>
165
+ <div class="block" id="avatar_info">
166
+ <div class="header">
167
+ <div class="header_text">
168
+ <%= t('avatar.profile_change')%>
169
+ </div>
170
+ <div class="header_icon_right">
171
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => "avatars" , :action => "index" %>
172
+ </div>
173
+ </div>
174
+ <div class="content">
175
+ <div class="row">
176
+ </div>
177
+ </div>
178
+ </div>
179
+ <% end %>
180
+ <% end %>
181
+ <div class="space_center"></div>
182
+ <% if (@profile.to_param==current_user.to_param and @profile.authentication_token) %>
183
+ <div class="block" id="developer_info">
184
+ <div class="header">
185
+ <div class="header_text">
186
+ ApiKey: <%= @profile.authentication_token %>
187
+ </div>
188
+ <div class="header_icon_right">
189
+ <%= link_to (image_tag('/images/btn/edit.png')), :controller => :api,
190
+ :action => :create_key %>
191
+ </div>
192
+ </div>
193
+ </div>
194
+ <% end %>
@@ -0,0 +1,168 @@
1
+ <% toolbar :profile => current_subject %>
2
+
3
+ <% content_for :sidebar do %>
4
+ <%= render :partial => "#{ current_subject.class.to_s.tableize }/sidebar_index" %>
5
+ <% end %>
6
+
7
+ <% content_for :headers do %>
8
+ <%= stylesheet_link_tag "jquery-ui", :media => "screen, projection" %>
9
+ <%= javascript_include_tag 'jquery.validate' %>
10
+ <% end %>
11
+
12
+ <% content_for :javascript do %>
13
+ $(function() {
14
+ $(".edit_profile").validate();
15
+ });
16
+ <% end %>
17
+
18
+ <%= form_for(@profile, :url => [current_subject, :profile], :remote => true) do |f| %>
19
+
20
+ <div class="block">
21
+ <% if !params[:section].present? or params[:section].eql?("about_me") %>
22
+ <% content_for :javascript do %>
23
+ $(function () {
24
+ $( "#profile_birthday" ).datepicker({ yearRange: '1900:<%= Time.now.utc.to_date.year%>',
25
+ changeYear: true, maxDate: '+0d', defaultDate: '-30y'});
26
+ $("#personal_info").addClass('section_highlight');
27
+
28
+ });
29
+ <% end %>
30
+ <div class="row">
31
+ <div class="form_row">
32
+ <h2><%=t('profile.' + current_subject.class.to_s.downcase + '.info')%></h2>
33
+ </div>
34
+
35
+ <%= f.fields_for :actor do |actor_form| %>
36
+ <div class="form_row">
37
+ <div class="form_label">
38
+ <%= f.label t('actor.name') %>
39
+ </div>
40
+ <div class="form_field">
41
+ <%= actor_form.text_field :name, :class => "required form_tag" %>
42
+ </div>
43
+ </div>
44
+ <%end%>
45
+
46
+ </div>
47
+
48
+ <div class="form_row">
49
+ <div class="form_label">
50
+ <%= f.label t('profile.organization')%>
51
+ </div>
52
+ <div class="form_field">
53
+ <%= f.text_field :organization , :class => "form_tag" %>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="form_row">
58
+ <div class="form_label">
59
+ <%= f.label t('profile.' + current_subject.class.to_s.downcase + '.birthday')%>
60
+ </div>
61
+ <div class="form_field">
62
+ <%= f.text_field( :birthday , :class => "date form_tag") %>
63
+ </div>
64
+ </div>
65
+
66
+ <div class="form_row">
67
+ <div class="form_label">
68
+ <%= f.label t('profile.actualcity')%>
69
+ </div>
70
+ <div class="form_field">
71
+ <%= f.text_field :city, :class => "form_tag" %>
72
+ </div>
73
+ </div>
74
+
75
+ <div class="form_row">
76
+ <div class="form_label">
77
+ <%= f.label t('profile.country') %>
78
+ </div>
79
+ <div class="form_field">
80
+ <%= f.text_field :country, :class => "form_tag" %>
81
+ </div>
82
+ </div>
83
+
84
+ <div class="form_row form_label">
85
+ <%= f.label t('profile.' + current_subject.class.to_s.downcase + '.about') %>
86
+ </div>
87
+ <div class="form_row">
88
+ <%= f.text_area :description, :maxlength => 200, :rows => 10, :class => "form_tag_long" %>
89
+ </div>
90
+ <% end %>
91
+ <% if !params[:section].present? or params[:section].eql?("contact_info") %>
92
+
93
+ <% content_for :javascript do %>
94
+ $(function() {
95
+ $("#contact_info").addClass('section_highlight');
96
+ });
97
+ <% end %>
98
+
99
+ <div class="form_row">
100
+ <h2><%=t('profile.contact')%></h2>
101
+ </div>
102
+
103
+ <div class="form_row">
104
+ <div class="form_label">
105
+ <%= f.label t('profile.phone')%>
106
+ </div>
107
+ <div class="form_field">
108
+ <%= f.text_field :phone, :class => "phone form_tag" %>
109
+ </div>
110
+ </div>
111
+ <div class="form_row">
112
+ <div class="form_label">
113
+ <%= f.label t('profile.mobile') %>
114
+ </div>
115
+ <div class="form_field">
116
+ <%= f.text_field :mobile, :class => "phone form_tag" %>
117
+ </div>
118
+ </div>
119
+ <div class="form_row">
120
+ <div class="form_label">
121
+ <%= f.label t('profile.fax') %>
122
+ </div>
123
+ <div class="form_field">
124
+ <%= f.text_field :fax, :class => "phone form_tag" %>
125
+ </div>
126
+ </div>
127
+ <div class="form_row">
128
+ <div class="form_label">
129
+ <%= f.label t('profile.address') %>
130
+ </div>
131
+ <div class="form_field">
132
+ <%= f.text_field :address, :class => "form_tag" %>
133
+ </div>
134
+ </div>
135
+ <div class="form_row">
136
+ <div class="form_label">
137
+ <%= f.label t('profile.website')%>
138
+ </div>
139
+ <div class="form_field">
140
+ <%= f.text_field :website, :class => "url form_tag" %>
141
+ </div>
142
+ </div>
143
+ <% end %>
144
+ <% if !params[:section].present? or params[:section].eql?("my_experience") %>
145
+ <% content_for :javascript do %>
146
+ $(function() {
147
+ $("#experience_info").addClass('section_highlight');
148
+ });
149
+ <% end %>
150
+ <div class="form_row">
151
+ <h2><%=t('profile.' + current_subject.class.to_s.downcase + '.experience')%></h2>
152
+ </div>
153
+ <div class="row center">
154
+ <%= f.text_area :experience, :maxlength => 500, :rows => 10, :class => "form_tag_long" %>
155
+ </div>
156
+ <% end %>
157
+
158
+ <% if params[:section].present? %>
159
+ <%= hidden_field_tag("section", params[:section]) %>
160
+ <% end %>
161
+ <div class="form_row space_center">
162
+ <%= f.submit "Update", :class => "button" %>&nbsp;
163
+ <button class="button" onclick="window.location.href='<%= polymorphic_path(current_subject) %>';">Cancel</button>
164
+ </div>
165
+
166
+ <% end %>
167
+ </div>
168
+
@@ -1,180 +1,7 @@
1
- <%= link_to @profile.subject.name, @profile.subject %>
2
-
3
1
  <% content_for :sidebar do %>
4
- <%= render :partial => 'users/sidebar_show' %>
2
+ <%= render :partial => 'users/sidebar_index' %>
5
3
  <% end %>
6
4
 
7
5
  <% toolbar :profile => @profile.subject %>
8
6
 
9
- <div class="space_center"></div>
10
- <div class="block" id="personal_info" >
11
- <div class="header">
12
- <div class="header_text">
13
- <%=t('edit.personal_info')%>
14
- </div>
15
- <div class="header_icon_right">
16
- <%= link_to (image_tag('/images/btn/edit.png')), '#' %>
17
- </div>
18
- </div>
19
- <div class="content">
20
- <div class="sub-block" >
21
- <% if @profile.organization? %>
22
- <div class="row">
23
- <div class="label">
24
- <%=t('edit.organization')%>:
25
- </div>
26
- <div class="field">
27
- <%=h @profile.organization %>
28
- </div>
29
- </div>
30
- <%end%>
31
- <% if @profile.birthday? %>
32
- <div class="row">
33
- <div class="label">
34
- <%=t('edit.birthday')%>:
35
- </div>
36
- <div class="field">
37
- <%=h I18n.l @profile.profile.birthday, :format => :long %>
38
- </div>
39
- </div>
40
- <div class="row">
41
- <div class="label">
42
- Age:
43
- </div>
44
- <div class="field">
45
- <%=h @profile.age %>
46
- </div>
47
- </div>
48
- <%end%>
49
- <% if @profile.city? %>
50
- <div class="row">
51
- <div class="label">
52
- <%=t('edit.actualcity')%>:
53
- </div>
54
- <div class="field">
55
- <%=h @profile.city %>
56
- <% if @profile.country? %>
57
- , <%=@profile.country%>
58
- <%end%>
59
- </div>
60
- </div>
61
- <%end%>
62
- <% if @profile.description? %>
63
- <div class="row">
64
- <div class="label">
65
- <%=t('edit.aboutme')%>:
66
- </div>
67
- <div class="row">
68
- <%=h @profile.description %>
69
- </div>
70
- </div>
71
- <%end%>
72
- </div>
73
- </div>
74
- </div>
75
-
76
-
77
- <div class="space_center"></div>
78
- <div class="block" id="contact_info">
79
- <div class="header">
80
- <div class="header_text">
81
- <%=t('edit.contact')%>
82
- </div>
83
- <div class="header_icon_right">
84
- <%= link_to (image_tag('/images/btn/edit.png')), '#' %>
85
- </div>
86
- </div>
87
- <div class="content">
88
- <% if @profile.phone? %>
89
- <div class="row">
90
- <div class="label">
91
- <%=t('edit.phone')%>
92
- </div>
93
- <div class="field">
94
- <%=h @profile.phone %>
95
- </div>
96
- </div>
97
- <%end%>
98
- <% if @profile.mobile? %>
99
- <div class="row">
100
- <div class="label">
101
- <%=t('edit.mobile')%>
102
- </div>
103
- <div class="field">
104
- <%=h @profile.mobile %>
105
- </div>
106
- </div>
107
- <%end%>
108
- <% if @profile.fax? %>
109
- <div class="row">
110
- <div class="label">
111
- <%=t('edit.fax')%>
112
- </div>
113
- <div class="field">
114
- <%=h @profile.fax %>
115
- </div>
116
- </div>
117
- <%end%>
118
- <% if @profile.address? %>
119
- <div class="row">
120
- <div class="label">
121
- <%=t('edit.address')%>
122
- </div>
123
- <div class="field">
124
- <%=h @profile.address %>
125
- </div>
126
- </div>
127
- <%end%>
128
- <% if @profile.website? %>
129
- <div class="row">
130
- <div class="label">
131
- <%=t('edit.website')%>
132
- </div>
133
- <div class="field">
134
- <a href="<%=h @profile.website %>"><%=h @profile.website %></a>
135
- </div>
136
- </div>
137
- <%end%>
138
-
139
- <div class="row">
140
- <div class="label">
141
- <%=t('edit.email')%>:
142
- </div>
143
- <div class="row">
144
- <%=h @profile.subject.email %>
145
- </div>
146
- </div>
147
- </div>
148
- </div>
149
-
150
- <div class="space_center"></div>
151
- <div class="block" id="experience_info">
152
- <div class="header">
153
- <div class="header_text">
154
- <%=t('edit.experience')%>
155
- </div>
156
- <div class="header_icon_right">
157
- <%= link_to (image_tag('/images/btn/edit.png')), '#' %>
158
- </div>
159
- </div>
160
- <div class="content">
161
- <div class="row">
162
- <%=h @profile.experience %>
163
- </div>
164
- </div>
165
- </div>
166
-
167
- <div class="space_center"></div>
168
- <% if (@profile.to_param==current_user.to_param and @profile.authentication_token) %>
169
- <div class="block" id="developer_info">
170
- <div class="header">
171
- <div class="header_text">
172
- ApiKey: <%= @profile.authentication_token %>
173
- </div>
174
- <div class="header_icon_right">
175
- <%= link_to (image_tag('/images/btn/edit.png')), :controller => :api,
176
- :action => :create_key %>
177
- </div>
178
- </div>
179
- </div>
180
- <% end %>
7
+ <%= render :partial => "profile" %>