social_stream-base 0.9.16 → 0.9.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/app/assets/images/tipsy.gif +0 -0
  2. data/app/assets/javascripts/activities.js.erb +23 -0
  3. data/app/assets/javascripts/invitations.js +7 -0
  4. data/app/assets/javascripts/profiles.js +4 -1
  5. data/app/assets/stylesheets/activities.css.scss +10 -5
  6. data/app/assets/stylesheets/base.css.scss +3 -2
  7. data/app/assets/stylesheets/frontpage.css.scss +2 -1
  8. data/app/assets/stylesheets/header.css.scss +5 -4
  9. data/app/controllers/groups_controller.rb +0 -6
  10. data/app/controllers/search_controller.rb +0 -4
  11. data/app/controllers/users_controller.rb +1 -6
  12. data/app/models/activity.rb +21 -7
  13. data/app/models/actor.rb +5 -3
  14. data/app/views/activities/_new.html.erb +13 -3
  15. data/app/views/activities/_options.html.erb +13 -4
  16. data/app/views/conversations/show.html.erb +1 -1
  17. data/app/views/conversations/show.js.erb +1 -1
  18. data/app/views/devise/registrations/edit.html.erb +1 -1
  19. data/app/views/devise/registrations/new.html.erb +1 -1
  20. data/app/views/devise/shared/_links.erb +6 -6
  21. data/app/views/frontpage/index.html.erb +3 -3
  22. data/app/views/groups/_new.html.erb +1 -1
  23. data/app/views/groups/show.html.erb +0 -5
  24. data/app/views/invitations/_new.html.erb +0 -5
  25. data/app/views/layouts/_header.erb +5 -44
  26. data/app/views/layouts/_header_signed_in.erb +44 -0
  27. data/app/views/layouts/_header_signed_out.erb +36 -0
  28. data/app/views/layouts/frontpage.html.erb +1 -1
  29. data/app/views/messages/_form.html.erb +3 -3
  30. data/app/views/messages/new.html.erb +2 -2
  31. data/app/views/messages/new.js.erb +1 -1
  32. data/app/views/posts/create.js.erb +2 -0
  33. data/app/views/profiles/edit.html.erb +6 -4
  34. data/app/views/search/index.html.erb +0 -4
  35. data/app/views/users/show.html.erb +0 -5
  36. data/config/locales/en.yml +33 -4
  37. data/config/locales/es.yml +33 -4
  38. data/lib/generators/social_stream/base/templates/initializer.rb +3 -0
  39. data/lib/social_stream/base/version.rb +1 -1
  40. data/lib/social_stream/models/object.rb +2 -1
  41. data/lib/social_stream-base.rb +4 -1
  42. data/social_stream-base.gemspec +3 -3
  43. data/spec/dummy/config/initializers/social_stream.rb +3 -0
  44. data/vendor/assets/javascripts/jquery.tipsy.js +104 -0
  45. data/vendor/assets/stylesheets/tipsy.css +7 -0
  46. metadata +18 -25
  47. data/app/assets/images/frontpage/join.gif +0 -0
  48. data/app/assets/stylesheets/ad_next.png +0 -0
  49. data/app/assets/stylesheets/ad_prev.png +0 -0
  50. data/app/assets/stylesheets/ad_scroll_back.png +0 -0
  51. data/app/assets/stylesheets/ad_scroll_forward.png +0 -0
  52. data/app/assets/stylesheets/jquery.ad-gallery.css +0 -171
  53. data/app/assets/stylesheets/loader.gif +0 -0
  54. data/app/views/frontpage/_header.html.erb +0 -30
  55. data/app/views/frontpage/_social_networks.html.erb +0 -5
  56. data/app/views/groups/_show_frontpage.html.erb +0 -11
  57. data/app/views/search/_index_frontpage.html.erb +0 -13
  58. data/app/views/users/_show_frontpage.html.erb +0 -11
Binary file
@@ -1,5 +1,6 @@
1
1
  //= require jquery.livequery
2
2
  //= require chosen.jquery
3
+ //= require jquery.tipsy
3
4
  //
4
5
  //initial state
5
6
  $(function() {
@@ -7,6 +8,10 @@ $(function() {
7
8
  $('#new_<%= SocialStream.activity_forms.first %>').show();
8
9
  $('#select_<%= SocialStream.activity_forms.first %>').addClass('selected');
9
10
  $('#security').chosen();
11
+ // Remove width calculation
12
+ $('#securities input.default').css('width', '');
13
+
14
+ setActivityPrivacyTooltips();
10
15
  });
11
16
 
12
17
 
@@ -192,3 +197,21 @@ $('#left_scroll img').livequery("click",function(){
192
197
 
193
198
  });
194
199
 
200
+ setActivityPrivacyTooltips = function(activityId) {
201
+ var fullId = '.activity_audience';
202
+ var summaryId = '.activity_audience_summary';
203
+
204
+ if (activityId != undefined) {
205
+ fullId = '#' + activityId + ' ' + fullId;
206
+ summaryId = '#' + activityId + ' ' + summaryId;
207
+ }
208
+
209
+ $(fullId).hide();
210
+ $(summaryId).tipsy({
211
+ html: true,
212
+ title: function(){
213
+ return $(this).siblings('.activity_audience').html();
214
+ }
215
+ });
216
+ };
217
+
@@ -1 +1,8 @@
1
1
  //= require jquery.validate
2
+
3
+ $(function() {
4
+ jQuery.validator.addMethod("emails", function(value, element){
5
+ return this.optional(element) || /^((, *)*((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)+$/i.test(value);
6
+ }," Please enter valid email addresses.");
7
+ $(".invitation_form").validate({errorClass: "validation_error"});
8
+ });
@@ -2,5 +2,8 @@
2
2
  //= require jquery.fcbkcomplete
3
3
 
4
4
  $(function() {
5
- $(".edit_profile").validate();
5
+ jQuery.validator.addMethod("phone", function(value, element){
6
+ return this.optional(element) || /^((\((\+?)\d+\))?|(\+\d+)?)[ ]*-?(\d+[ ]*\-?[ ]*\d*)+$/.test(value);
7
+ }, " Please enter a valid telephone number");
8
+ $(".edit_profile").validate({errorClass: "validation_error"});
6
9
  });
@@ -1,10 +1,16 @@
1
1
  /*
2
2
  *= require jquery-ui
3
3
  *= require chosen
4
+ *= require tipsy
4
5
  */
5
6
 
6
7
  @import "colors";
7
8
 
9
+ /* Fixes to tipsy, the plugin for tooltips */
10
+
11
+ .tipsy{ background-image: url(../assets/tipsy.gif); }
12
+ .tipsy-inner { background-color: $secondary-color; color: $sentence-color; }
13
+
8
14
  /****************** WALL - ACTIVITIES *********************/
9
15
  #wrapper_activities {}
10
16
  #wall{ text-align:center;}
@@ -19,6 +25,10 @@
19
25
  #activities_share_btn { text-align: right; padding: 5px 16px 0px 10px; vertical-align: middle;}
20
26
  #securities{ display:inline-block; text-align:left; float: left; padding-left:5px;}
21
27
 
28
+ #security_chzn .chzn-choices {
29
+ padding-left: 20px;
30
+ background: url('btn/btn_security.png') no-repeat 10px center;
31
+ }
22
32
  /******************* WALL - ACTIVITY ***************/
23
33
  .super_activity{width: 95%;}
24
34
  .activity { text-align:left; display: block; vertical-align: top; padding: 10px 0px 5px 0px;
@@ -76,8 +86,3 @@
76
86
  .copy_new_comment{visibility: hidden; padding:6px; padding-bottom: 1.5em;font-size:inherit; line-height: 1.15em;
77
87
  margin-bottom:7px;}
78
88
  .input_new_comments_container{min-height: 30px; position: relative; }
79
- /*********** DROP DOWN**********/
80
- #security_chzn .chzn-choices {
81
- padding-left: 20px;
82
- background: url('btn/btn_security.png') no-repeat 10px center;
83
- }
@@ -34,7 +34,7 @@ margin-top: auto; margin-bottom:auto; background-image:none; padding-bottom: 9px
34
34
  margin-left: auto;
35
35
  margin-right: auto;
36
36
  }
37
- .notice ul, .success ul, .alert ul, .error ul, .validation ul{
37
+ .notice ul, .success ul, .alert ul, .error ul, .validation ul, #error_explanation ul{
38
38
  margin-left:40px;
39
39
 
40
40
  }
@@ -108,8 +108,9 @@ button, input[type=submit]{margin: 10px 0 10px 0px;padding: 3px 20px 3px 20px;co
108
108
  .block .field{ display:inline; padding: 0px; width:50%;}
109
109
  .block .form_tag{color: $main-color; padding: 5px 5px 5px 5px; border:1px solid $input-border-color; width:90%;}
110
110
  .block .form_tag_long{color: $main-color; padding: 5px 5px 5px 5px; border:1px solid $input-border-color; width:91%;}
111
- .block .form_label{display:inline-block; width:25%; font-weight:bold; vertical-align:10%; padding-top:3px;}
111
+ .block .form_label{display:inline-block; width:25%; font-weight:bold; vertical-align:top; padding-top:7px;}
112
112
  .block .form_field{ display:inline-block; padding: 0px; width:73%;}
113
+ .block #form_select.form_field{ padding: 3px 0px;}
113
114
  .block .form_row {display: block; padding:5px; padding-left:20px;}
114
115
  .block .form_sub_row {display: block; padding:5px; padding-left:30px;}
115
116
  .block .label{ display:inline-block; width:49%; }
@@ -38,7 +38,8 @@ span.find{ padding-right:5px;}
38
38
  #icon_meet{ background: transparent url(frontpage/meet.png); width:56px; height:57px;}
39
39
  #icon_collaborate{ background: transparent url(frontpage/collaborate.png); width:56px; height:57px;}
40
40
  .icon_text{ text-align:center; width:100%; font-weight:bold;}
41
- #join_form{ float:right; padding-right:50px;}
41
+ #join_form{ margin: 15px 0px; text-align:center;}
42
+ #join_form input[type="submit"] {font-size: 17px; padding: 6px 20px;}
42
43
  .sentences{ width:80%; display:inline-block; vertical-align:top; padding-top:10px;}
43
44
  .sentences ul,.sentences li{ list-style-type:none; font-size:14px; margin-left:10px; padding-top:3px;}
44
45
  .sentences li.purple{ list-style-image:url("frontpage/purple_sq.png");}
@@ -14,14 +14,15 @@
14
14
  #logo{ width:218px; height:50px; float:left; vertical-align:top; }
15
15
  #logo_txt {color: $text-over-main; display: inline; vertical-align: top; padding-top: 2px; }
16
16
  .div_login { color:$text-over-main; width:65%; display:inline-block; text-align: right; vertical-align: top;
17
- padding-top: 5px; font-weight:normal; margin-top:3px; float:right; }
17
+ font-weight:normal; float:right; }
18
18
  .div_login #username{ height:10px; }
19
- .div_login, .input_username{ position:relative; padding: 0px; border: 0px; }
19
+ .div_login .input_username{ position:relative; padding: 2px; border: 0px; }
20
20
  .div_login #login_button{ width:61px; height:18px; }
21
21
  .div_login #login_data{display: block;}
22
22
  .div_login .login_data_block{ display: inline-block; padding-left: 10px;}
23
- .div_login .login_data_block input{ width: 250px;}
24
- .div_login .subtexto{ padding-top: 8px; height:20px; font-size: 11px; }
23
+ .div_login .login_data_block input{ width: 200px;}
24
+ .div_login .login_data_block input[type=submit]{ width: 70px;}
25
+ .div_login .options{ height:20px; font-size: 11px;}
25
26
  .div_login .a_border{ border-right:thin solid; padding-right:7px; text-decoration:underline; }
26
27
  #new_representation { display: inline-block;}
27
28
  #header_notifications a{color: white; padding: 4px 10px 6px 11px;
@@ -15,15 +15,9 @@ class GroupsController < InheritedResources::Base
15
15
  tagged_with(params[:tag]).
16
16
  page(params[:page]).per(10)
17
17
 
18
- index! do |format|
19
- format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
20
- end
21
18
  end
22
19
 
23
20
  def show
24
- show! do |format|
25
- format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
26
- end
27
21
  end
28
22
 
29
23
  def create
@@ -22,10 +22,6 @@ class SearchController < ApplicationController
22
22
  end
23
23
  end
24
24
  end
25
- respond_to do |format|
26
- format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
27
- format.js
28
- end
29
25
  end
30
26
 
31
27
  private
@@ -10,15 +10,10 @@ class UsersController < InheritedResources::Base
10
10
  tagged_with(params[:tag]).
11
11
  page(params[:page]).per(10)
12
12
 
13
- index! do |format|
14
- format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
15
- end
13
+
16
14
  end
17
15
 
18
16
  def show
19
- show! do |format|
20
- format.html { render :layout => (user_signed_in? ? 'application' : 'frontpage') }
21
- end
22
17
  end
23
18
 
24
19
  # Supported through devise
@@ -262,13 +262,26 @@ class Activity < ActiveRecord::Base
262
262
  end
263
263
 
264
264
  # The {Relation} with which activity is shared
265
- def audience_in_words(subject)
266
- visible_relations =
267
- relations.select{ |r| r.actor_id == Actor.normalize_id(subject) || r.is_a?(Relation::Public) }
265
+ def audience_in_words(subject, options = {})
266
+ options[:details] ||= :full
268
267
 
269
- visible_relations.present? ?
270
- I18n.t('activity.audience.visible', :audience => visible_relations.map(&:name).join(", ")) :
271
- I18n.t('activity.audience.hidden', :audience => relations.map(&:actor).map(&:name).join(", "))
268
+ public_relation = relations.select{ |r| r.is_a?(Relation::Public) }
269
+
270
+ visibility, audience =
271
+ if public_relation.present?
272
+ [ :public, nil ]
273
+ else
274
+ visible_relations =
275
+ relations.select{ |r| r.actor_id == Actor.normalize_id(subject)}
276
+
277
+ if visible_relations.present?
278
+ [ :visible, visible_relations.map(&:name).join(", ") ]
279
+ else
280
+ [ :hidden, relations.map(&:actor).map(&:name).join(", ") ]
281
+ end
282
+ end
283
+
284
+ I18n.t "activity.audience.#{ visibility }.#{ options[:details] }", :audience => audience
272
285
  end
273
286
 
274
287
  private
@@ -279,9 +292,10 @@ class Activity < ActiveRecord::Base
279
292
  def fill_relations
280
293
  return if relation_ids.present?
281
294
 
295
+ # FIXME: repeated in SocialStream::Models::Object#_relation_ids
282
296
  self.relation_ids =
283
297
  if contact.reflexive?
284
- Array(receiver.relation_public.id)
298
+ receiver.relation_customs.map(&:id)
285
299
  else
286
300
  receiver.relation_customs.allow(contact.sender, 'create', 'activity').map(&:id)
287
301
  end
data/app/models/actor.rb CHANGED
@@ -333,9 +333,11 @@ class Actor < ActiveRecord::Base
333
333
  #
334
334
  #
335
335
  def activity_relations(subject, options = {})
336
- return relation_customs if Actor.normalize(subject) == self
337
-
338
- Array.new
336
+ if Actor.normalize(subject) == self
337
+ return relation_customs + Array.wrap(relation_public)
338
+ else
339
+ Array.new
340
+ end
339
341
  end
340
342
 
341
343
  # Are there any activity_relations present?
@@ -22,9 +22,19 @@
22
22
  <% end %>
23
23
  </div>
24
24
 
25
- <% if current_subject == receiver %>
26
- <div id="securities"><%= select_tag :_relation_ids, options_for_select(current_subject.activity_relations(receiver).sort.map{ |r| [ r.name, r.id ] }), :id => 'security', :multiple => true, :title => t('relation_public.name') %></div>
27
- <% end %>
25
+ <div id="securities">
26
+ <% if current_subject == receiver %>
27
+ <%= select_tag :_relation_ids, options_for_select(current_subject.activity_relations(receiver).sort.map{ |r| [ r.name, r.id ] }), :id => 'security', :multiple => true, :title => t("activity.privacy.contacts.#{ receiver.class.to_s.underscore }", :receiver => receiver.name) %>
28
+ <% else %>
29
+ <div id="security_chzn" class="chzn-container chzn-container-multi">
30
+ <ul class="chzn-choices">
31
+ <li class="search-field">
32
+ <input type="text" value="<%= t "activity.privacy.contacts.#{ receiver.class.to_s.underscore }", :receiver => receiver.name %>" class="default" disabled="disabled">
33
+ </li>
34
+ </ul>
35
+ </div>
36
+ <% end %>
37
+ </div>
28
38
 
29
39
  <div id="activities_share_btn">
30
40
  <%= submit_tag(t('share'), :class => "button submitActivity", :id => "masterSubmitButton") %>
@@ -1,12 +1,21 @@
1
1
  <div class="activity_options">
2
- <% if user_signed_in? %>
3
- <div class="security"><%= image_tag('btn/btn_security.png', :title => activity.audience_in_words(current_subject)) %></div>
4
- <% end %>
5
2
  <div class="post_time_ago"><%= t('time.ago', :time => time_ago_in_words(activity.created_at)) %></div>
6
3
  <% if activity.is_root? && user_signed_in? %>
7
4
  <div class="verb_comment"> · <%= link_to t('activity.to_comment'), "#", :class => "to_comment" %> </div>
8
5
  <% end %>
9
- <div class="verb_like" id="like_<%= dom_id(activity) %>"> · <%= link_like(activity)%></div>
6
+
7
+ <div class="verb_like" id="like_<%= dom_id(activity) %>"> · <%= link_like(activity)%></div>
8
+
9
+ <% if user_signed_in? %>
10
+ ·
11
+ <%= link_to activity.audience_in_words(current_subject, :details => :summary),
12
+ '#',
13
+ :class => 'activity_audience_summary' %>
14
+ <div class="activity_audience">
15
+ <%= activity.audience_in_words(current_subject) %>
16
+ </div>
17
+ <% end %>
18
+
10
19
  <% if activity.delete_object_by?(current_subject) %>
11
20
  <div class="verb_delete">
12
21
  · <%= link_to t('activity.delete'), activity.direct_object , :confirm => t('confirm_delete',
@@ -9,7 +9,7 @@
9
9
  <% toolbar :option => :messages %>
10
10
 
11
11
  <% content_for :javascript do %>
12
- $('.cont_conversation').validate();
12
+ $('.cont_conversation').validate({errorClass: "validation_error"});
13
13
  <% unless @box.eql?'trash' %>
14
14
  $("#body").cleditor({
15
15
  width:493,
@@ -2,7 +2,7 @@ $("#content").html("<%= escape_javascript(render :partial => 'show') %>");
2
2
 
3
3
  <%= toolbar :option => :messages %>
4
4
 
5
- $('.cont_conversation').validate();
5
+ $('.cont_conversation').validate({errorClass: "validation_error"});
6
6
  <% unless @box.eql?'trash' %>
7
7
  $("#body").cleditor({
8
8
  width:493,
@@ -7,7 +7,7 @@
7
7
  <%= devise_error_messages! %>
8
8
 
9
9
  <% content_for :javascript do %>
10
- $(".user_edit").validate();
10
+ $(".user_edit").validate({errorClass: "validation_error"});
11
11
  <%end%>
12
12
 
13
13
  <div class="space_center"></div>
@@ -23,7 +23,7 @@
23
23
  </div>
24
24
  <div class="form_row">
25
25
  <div class="form_label" id="user_password_confirmation_label">
26
- <%= f.label t('devise.passwords.confirm') %>
26
+ <%= f.label :password_confirmation %>
27
27
  </div>
28
28
  <div class="form_field"><%= f.password_field :password_confirmation, :class =>"form_tag" %></div>
29
29
  </div>
@@ -1,25 +1,25 @@
1
1
  <%- if controller_name != 'sessions' %>
2
- <%= link_to "Sign in", new_user_session_path %><br />
2
+ <%= link_to t('devise.links.sign_in'), new_user_session_path %><br />
3
3
  <% end -%>
4
4
 
5
5
  <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
- <%= link_to "Sign up", new_registration_path(resource_name) %><br />
6
+ <%= link_to t('devise.links.sign_up'), new_registration_path(resource_name) %><br />
7
7
  <% end -%>
8
8
 
9
9
  <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
10
- <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
10
+ <%= link_to t('devise.links.forgot_password'), new_password_path(resource_name) %><br />
11
11
  <% end -%>
12
12
 
13
13
  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
14
+ <%= link_to t('devise.links.confirmation_instructions'), new_confirmation_path(resource_name) %><br />
15
15
  <% end -%>
16
16
 
17
17
  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
18
+ <%= link_to t('devise.links.unlock_instructions'), new_unlock_path(resource_name) %><br />
19
19
  <% end -%>
20
20
 
21
21
  <%- if devise_mapping.omniauthable? %>
22
22
  <%- resource_class.omniauth_providers.each do |provider| %>
23
- <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br />
23
+ <%= link_to t('devise.links.sign_in_with', :provider => provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br />
24
24
  <% end -%>
25
25
  <% end -%>
@@ -57,13 +57,13 @@
57
57
  </div>
58
58
  </div>
59
59
  <div class="espacio"></div>
60
- <div id="join_form">
61
- <%= link_to image_tag("frontpage/join.gif", :alt=>"register"), new_user_registration_path, :class => "register_link" %>
62
- </div>
63
60
  </div>
64
61
 
65
62
  <div id="wrapper_right">
66
63
  <%= render :partial => 'frontpage/caracteristics' %>
67
64
  </div>
68
65
 
66
+ <div id="join_form">
67
+ <%= button_to t('frontpage.register'), new_user_registration_path, :method=> :get %>
68
+ </div>
69
69
  <div id="espacio_body_bottom"></div>
@@ -1,6 +1,6 @@
1
1
  <% content_for :javascript do %>
2
2
  $(function() {
3
- $(".new_group").validate();
3
+ $(".new_group").validate({errorClass: "validation_error"});
4
4
  });
5
5
  $("#group__participants").fcbkcomplete({
6
6
  json_url: "<%= contacts_path(:form => true, :format => :json) %>",
@@ -1,6 +1 @@
1
- <% if user_signed_in? %>
2
1
  <%= render :partial => 'show' %>
3
- <% else %>
4
- <% toolbar :profile => @group %>
5
- <%= render :partial => 'show_frontpage' %>
6
- <% end %>
@@ -1,8 +1,3 @@
1
- <% content_for :javascript do %>
2
- $(function() {
3
- $(".invitation_form").validate();
4
- });
5
- <% end %>
6
1
 
7
2
  <div class="space_center"></div>
8
3
 
@@ -1,44 +1,5 @@
1
- <div id="headerFront">
2
- <div class="banner_top banner_top_height">
3
- <div id="header_left">
4
- <div id="logo_txt">
5
- <%= link_to(image_tag('header-logo.png', :alt => t('site.name')), root_path) %>
6
- </div>
7
- </div>
8
- <% if user_signed_in? %>
9
- <%= render :partial => 'layouts/search' %>
10
- <%end%>
11
- <div id="header_right">
12
- <% if user_signed_in? %>
13
- <div class="menu_list menu_white" id="menu_home">
14
- <ul>
15
- <li>
16
- <%= link_to(t('home'), root_path)%>
17
- </li>
18
- <li class="pipe">·</li>
19
- <li>
20
- <%= link_to(t('profile.one'), current_subject)%>
21
- </li>
22
- <li class="pipe">·</li>
23
- <li>
24
- <%= link_to(t('message.other'), conversations_path) %>
25
- <span id="header_inbox_count">
26
- <%= link_to(current_subject.mailbox.inbox(:unread => true).count.to_s, conversations_path) %>
27
- </span>
28
- </li>
29
- <li class="pipe">·</li>
30
- <li>
31
- <span id="header_notifications">
32
- <%= link_to( current_subject.mailbox.notifications.not_trashed.unread.count.to_s, notifications_path) %>
33
- </span>
34
- </li>
35
- <li class="pipe">·</li>
36
- <li>
37
- <%= render :partial => 'layouts/header_dropdown_menu' %>
38
- </li>
39
- </ul>
40
- </div>
41
- <% end %>
42
- </div>
43
- </div>
44
- </div>
1
+ <% if user_signed_in? %>
2
+ <%= render :partial => 'layouts/header_signed_in' %>
3
+ <% else %>
4
+ <%= render :partial => 'layouts/header_signed_out' %>
5
+ <% end %>
@@ -0,0 +1,44 @@
1
+ <div id="headerFront">
2
+ <div class="banner_top banner_top_height">
3
+ <div id="header_left">
4
+ <div id="logo_txt">
5
+ <%= link_to(image_tag('header-logo.png', :alt => t('site.name')), root_path) %>
6
+ </div>
7
+ </div>
8
+ <% if user_signed_in? %>
9
+ <%= render :partial => 'layouts/search' %>
10
+ <%end%>
11
+ <div id="header_right">
12
+ <% if user_signed_in? %>
13
+ <div class="menu_list menu_white" id="menu_home">
14
+ <ul>
15
+ <li>
16
+ <%= link_to(t('home'), root_path)%>
17
+ </li>
18
+ <li class="pipe">·</li>
19
+ <li>
20
+ <%= link_to(t('profile.one'), current_subject)%>
21
+ </li>
22
+ <li class="pipe">·</li>
23
+ <li>
24
+ <%= link_to(t('message.other'), conversations_path) %>
25
+ <span id="header_inbox_count">
26
+ <%= link_to(current_subject.mailbox.inbox(:unread => true).count.to_s, conversations_path) %>
27
+ </span>
28
+ </li>
29
+ <li class="pipe">·</li>
30
+ <li>
31
+ <span id="header_notifications">
32
+ <%= link_to( current_subject.mailbox.notifications.not_trashed.unread.count.to_s, notifications_path) %>
33
+ </span>
34
+ </li>
35
+ <li class="pipe">·</li>
36
+ <li>
37
+ <%= render :partial => 'layouts/header_dropdown_menu' %>
38
+ </li>
39
+ </ul>
40
+ </div>
41
+ <% end %>
42
+ </div>
43
+ </div>
44
+ </div>
@@ -0,0 +1,36 @@
1
+ <div id="headerFront">
2
+ <div class="banner_top">
3
+ <div id="logo">
4
+ <%= link_to(image_tag('logo.png', :alt => t('site.name')), '/'); %>
5
+ </div>
6
+ <% unless params[:controller].eql? 'devise/sessions' and params[:action].eql? 'new' %>
7
+ <div class="div_login">
8
+ <%= form_for User.new, :as => :user, :url => user_session_path do |f| -%>
9
+ <div id="login_data">
10
+ <div class="login_data_block">
11
+ <span><%= f.label :email %></span>
12
+ <%= f.email_field :email, :class => "input_username" %>
13
+ </div>
14
+ <div class="login_data_block">
15
+ <span><%= f.label :password %></span>
16
+ <%= f.password_field :password, :class => "input_username" %>
17
+ </div>
18
+
19
+ <div class="login_data_block">
20
+ <%= f.submit t(:sign_in), :class => 'other_blue'%>
21
+ </div>
22
+ </div>
23
+ <div class="options">
24
+ <%= link_to t('sign_up'), new_user_registration_path, :class => "register_link" %>
25
+ <span>|</span>
26
+ <%= link_to t('forgot_password'), new_user_password_path, :class => "register_link" %>
27
+ <span>|</span>
28
+ <%= link_to image_tag('btn/facebook.png'), user_omniauth_authorize_path(:facebook), :class => "menu_icon" %>
29
+ <%= link_to image_tag('btn/linkedin.png'), user_omniauth_authorize_path(:linked_in), :class => "menu_icon" %>
30
+ </div>
31
+ <% end -%>
32
+ </div>
33
+ <% end %>
34
+ <br class="clearfloat" />
35
+ </div>
36
+ </div>
@@ -23,7 +23,7 @@
23
23
  <body>
24
24
  <div id="wrapper">
25
25
  <header>
26
- <%= render :partial => "frontpage/header" %>
26
+ <%= render :partial => "layouts/header" %>
27
27
  </header>
28
28
  <section>
29
29
  <div id="wrapper_body">
@@ -14,20 +14,20 @@
14
14
  <% end %>
15
15
  <div class="block">
16
16
  <div class="form_row">
17
- <%= label_tag :recipients %>
17
+ <%= label_tag t('mailboxer.form.recipients') %>
18
18
  </div>
19
19
  <div class="form_row">
20
20
  <%= select_tag :_recipients, "", :class => "required form_tag" %>
21
21
 
22
22
  </div>
23
23
  <div class="form_row">
24
- <%= label_tag :subject %>
24
+ <%= label_tag t('mailboxer.form.subject') %>
25
25
  </div>
26
26
  <div class="form_row">
27
27
  <%= text_field_tag :subject,nil, :class => "required form_tag" %>
28
28
  </div>
29
29
  <div class="form_row">
30
- <%= label_tag :body %>
30
+ <%= label_tag t('mailboxer.form.body') %>
31
31
  </div>
32
32
  <div class="form_row" id="ck_editor" >
33
33
  <%= text_area_tag :body, nil,:rows =>6, :cols=> 53, :class => "required form_tag", :maxlength => 5000 %>
@@ -24,14 +24,14 @@
24
24
 
25
25
  $("#body").cleditor({
26
26
  width:493,
27
- controls: "<%= t('cleditor.controls')%>"
27
+ controls: "<%= SocialStream.cleditor_controls %>"
28
28
  });
29
29
 
30
30
  <% unless @recipient.nil? %>
31
31
  $("#_recipients").trigger("addItem",[{"title": "<%= truncate_name @recipient.name %>", "value": "<%= @recipient.id %>"}]);
32
32
  <% end %>
33
33
 
34
- $(".new_message").validate();
34
+ $(".new_message").validate({errorClass: "validation_error"});
35
35
 
36
36
  <% end %>
37
37
 
@@ -25,4 +25,4 @@ var recipients = $("#_recipients").fcbkcomplete({
25
25
  $("#_recipients").trigger("addItem",[{"title": "<%= @recipient.name %>", "value": "<%= @recipient.id %>"}]);
26
26
  <% end %>
27
27
 
28
- $(".new_message").validate();
28
+ $(".new_message").validate({errorClass: "validation_error"});
@@ -1,5 +1,7 @@
1
1
  //Display the new post
2
2
  $("#wall").prepend("<%= escape_javascript(render @post.post_activity) %>");
3
3
 
4
+ setActivityPrivacyTooltips("<%= escape_javascript dom_id(@post.post_activity) %>");
5
+
4
6
  unblock_all_forms();
5
7