social_stream 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. data/.gitignore +3 -0
  2. data/Rakefile +2 -0
  3. data/app/controllers/contacts_controller.rb +28 -0
  4. data/app/controllers/groups_controller.rb +11 -0
  5. data/app/controllers/users_controller.rb +11 -0
  6. data/app/helpers/contacts_helper.rb +2 -0
  7. data/app/models/group.rb +21 -2
  8. data/app/models/profile.rb +26 -0
  9. data/app/views/contacts/index.html.erb +2 -0
  10. data/app/views/groups/_index.html.erb +2 -4
  11. data/app/views/groups/_middle_index.html.erb +74 -0
  12. data/app/views/groups/_new.html.erb +22 -3
  13. data/app/views/groups/_right_index.html.erb +19 -0
  14. data/app/views/groups/_right_show.html.erb +3 -3
  15. data/app/views/groups/index.html.erb +15 -51
  16. data/app/views/groups/index.js.erb +1 -0
  17. data/app/views/home/_options.html.erb +1 -1
  18. data/app/views/layouts/application.html.erb +5 -10
  19. data/app/views/users/_index.html.erb +2 -4
  20. data/app/views/users/_middle_index.html.erb +6 -0
  21. data/app/views/users/_profile.html.erb +60 -10
  22. data/app/views/users/_right_index.html.erb +19 -0
  23. data/app/views/users/edit.html.erb +19 -14
  24. data/app/views/users/index.html.erb +14 -33
  25. data/app/views/users/index.js.erb +1 -0
  26. data/app/views/users/update.js.erb +32 -10
  27. data/config/locales/en.yml +7 -1
  28. data/config/routes.rb +1 -1
  29. data/lib/generators/social_stream/templates/migration.rb +1 -0
  30. data/lib/generators/social_stream/templates/public/images/btn/search.png +0 -0
  31. data/lib/generators/social_stream/templates/public/images/fcbkcomplete/close.gif +0 -0
  32. data/lib/generators/social_stream/templates/public/images/loader.gif +0 -0
  33. data/lib/generators/social_stream/templates/public/javascripts/ajax.paginate.js +53 -0
  34. data/lib/generators/social_stream/templates/public/javascripts/jqcloud-0.1.3.min.js +11 -0
  35. data/lib/generators/social_stream/templates/public/javascripts/jquery.ba-url.js +1091 -0
  36. data/lib/generators/social_stream/templates/public/javascripts/jquery.fcbkcomplete.min.js +77 -0
  37. data/lib/generators/social_stream/templates/public/javascripts/jquery.js +640 -344
  38. data/lib/generators/social_stream/templates/public/javascripts/jquery.min.js +16 -0
  39. data/lib/generators/social_stream/templates/public/javascripts/jquery.validate.js +31 -19
  40. data/lib/generators/social_stream/templates/public/javascripts/rails.js +157 -146
  41. data/lib/generators/social_stream/templates/public/stylesheets/edit_user.css +14 -3
  42. data/lib/generators/social_stream/templates/public/stylesheets/fcbkComplete.css +36 -0
  43. data/lib/generators/social_stream/templates/public/stylesheets/jqcloud.css +62 -0
  44. data/lib/generators/social_stream/templates/public/stylesheets/social_stream.css +3 -0
  45. data/lib/generators/social_stream/templates/public/stylesheets/users.css +22 -0
  46. data/lib/social_stream/models/subject.rb +2 -1
  47. data/lib/social_stream/version.rb +1 -1
  48. data/social_stream.gemspec +2 -1
  49. data/spec/controllers/contacts_controller_spec.rb +12 -0
  50. metadata +40 -7
data/.gitignore CHANGED
@@ -3,3 +3,6 @@ pkg/*gem
3
3
  **.tmp_*
4
4
  Gemfile.lock
5
5
  .idea
6
+ nbproject
7
+ .loadpath
8
+ .project
data/Rakefile CHANGED
@@ -6,6 +6,8 @@ require 'rubygems'
6
6
 
7
7
  require 'rspec/core/rake_task'
8
8
 
9
+ require 'ci/reporter/rake/rspec'
10
+
9
11
  require 'bundler'
10
12
 
11
13
  require File.join(File.dirname(__FILE__), 'lib', 'social_stream', 'version')
@@ -0,0 +1,28 @@
1
+ class ContactsController < ApplicationController
2
+
3
+ def index
4
+
5
+
6
+ return if current_subject.blank?
7
+
8
+ myContacts = Array.new
9
+ mySubjects = current_subject.subjects(:direction => :receivers)
10
+
11
+ return if mySubjects.blank?
12
+
13
+ #Fill the array with actor name/actorId of all the actors which has a tie with current_subject
14
+ mySubjects.each do |aSubject|
15
+ aSubjectD = {}
16
+ aSubjectD['key'] = aSubject.name
17
+ aSubjectD['value'] = aSubject.actor_id.to_s
18
+ myContacts << aSubjectD
19
+ end
20
+
21
+ respond_to do |format|
22
+ format.html #index.html.erb
23
+ format.json { render :text => myContacts.to_json }
24
+ end
25
+
26
+ end
27
+
28
+ end
@@ -1,4 +1,15 @@
1
1
  class GroupsController < InheritedResources::Base
2
+ def index
3
+ if params[:search]
4
+ @groups = Group.search("%"+params[:search]+"%").paginate(:per_page => 10, :page => params[:page])
5
+ else
6
+ if params[:letter] && params[:letter]!="undefined"
7
+ @groups = Group.search(params[:letter]+"%").paginate(:per_page => 10, :page => params[:page])
8
+ else
9
+ @groups = Group.alphabetic.paginate(:per_page => 10, :page => params[:page])
10
+ end
11
+ end
12
+ end
2
13
  protected
3
14
 
4
15
  # Overwrite resource method to support permalink
@@ -1,4 +1,15 @@
1
1
  class UsersController < ApplicationController
2
+ def index
3
+ if params[:search]
4
+ @users = User.search("%"+params[:search]+"%").paginate(:per_page => 10, :page => params[:page])
5
+ else
6
+ if params[:letter] && params[:letter]!="undefined"
7
+ @users = User.search(params[:letter]+"%").paginate(:per_page => 10, :page => params[:page])
8
+ else
9
+ @users = User.alphabetic.paginate(:per_page => 10, :page => params[:page])
10
+ end
11
+ end
12
+ end
2
13
 
3
14
  def show
4
15
  @user = User.find_by_permalink!(params[:id])
@@ -0,0 +1,2 @@
1
+ module ContactsHelper
2
+ end
data/app/models/group.rb CHANGED
@@ -1,14 +1,18 @@
1
1
  class Group < ActiveRecord::Base
2
2
  attr_accessor :_founder
3
+ attr_accessor :_participants
3
4
 
4
5
  def followers
5
6
  subjects(:subject_type => :user, :direction => :senders)
6
7
  end
7
8
 
8
9
  after_create :create_founder
9
-
10
+ after_create :create_participants
11
+
12
+
10
13
  private
11
14
 
15
+ #Creates the ties betwbeen the group and the founder
12
16
  def create_founder
13
17
  founder =
14
18
  Actor.find_by_permalink(_founder) || raise("Cannot create group without founder")
@@ -16,4 +20,19 @@ class Group < ActiveRecord::Base
16
20
  sent_ties.create! :receiver => founder,
17
21
  :relation => relations.sort.first
18
22
  end
19
- end
23
+
24
+ #Creates the ties betwbeen the group and the participants
25
+ def create_participants
26
+
27
+ return if @_participants.blank?
28
+
29
+ @_participants.each do |participant|
30
+
31
+ participantActor = Actor.find_by_id(participant.to_i)
32
+ sent_ties.create! :receiver => participantActor,
33
+ :relation => relations.sort.first
34
+ end
35
+
36
+ end
37
+
38
+ end
@@ -1,3 +1,29 @@
1
1
  class Profile < ActiveRecord::Base
2
2
  belongs_to :actor
3
+
4
+ validates_format_of :mobile, :phone, :fax,
5
+ :allow_nil => true,
6
+ :with => /(^$)|(((\((\+?)\d+\))?|(\+\d+)?)[ ]*-?(\d+[ ]*\-?[ ]*\d*)+$)/,
7
+ :message => "has a invalid format"
8
+
9
+ validates_format_of :website,
10
+ :allow_nil => true,
11
+ :with => /(^$)|((https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([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])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$)/ ,
12
+ :message => "has a invalid format"
13
+
14
+ validate :validate_birthday
15
+
16
+ def birthday=(value)
17
+ @birthday_formatted_invalid = false
18
+ super Date.parse(value)
19
+ rescue ArgumentError
20
+ @birthday_formatted_invalid = true
21
+ end
22
+
23
+
24
+ def validate_birthday
25
+ errors.add(:birthday, "is invalid. Please, use \"month/day/year\" format and make sure you choose a valid date" ) if @birthday_formatted_invalid || (birthday.present? && birthday > Date.today)
26
+ end
27
+
28
+
3
29
  end
@@ -0,0 +1,2 @@
1
+ <h1>Contacts#index</h1>
2
+ <p>Find me in app/views/contacts/index.html.erb</p>
@@ -1,8 +1,6 @@
1
- <% groups = Group.alphabetic.paginate(:page => params[:page]) %>
2
-
3
1
  <% cont=0; %>
4
2
 
5
- <% groups.each do |group| %>
3
+ <% @groups.each do |group| %>
6
4
 
7
5
  <% if (cont%2) == 0
8
6
  cont+=1; %>
@@ -33,4 +31,4 @@
33
31
  </div>
34
32
  <% end %>
35
33
 
36
- <%= will_paginate(groups) %>
34
+ <%= will_paginate @groups %>
@@ -0,0 +1,74 @@
1
+ <% content_for :head, stylesheet_link_tag("jqcloud") %>
2
+
3
+ <div class="space_center">
4
+ </div>
5
+ <div class="middle_box">
6
+ <div class="middle_box_header">
7
+ <%= image_tag('btn/btn_tag.png', :class => "middle_box_picture_icon") %>
8
+ <div class="middle_box_text_header"><%= t 'group.cloud' %></div>
9
+ <div class="title_righ">
10
+ </div>
11
+ </div>
12
+
13
+ <div id="wordcloud"></div>
14
+
15
+ </div>
16
+
17
+ <% if user_signed_in? %>
18
+ <div class="space_center"></div>
19
+ <%= render :partial => "ties/suggestions" %>
20
+ <div class="space_center"></div>
21
+ <%= render :partial => 'ties/pendings' %>
22
+
23
+ <%= javascript_include_tag "jqcloud-0.1.3.min.js" %>
24
+ <% end %>
25
+
26
+ <script type="text/javascript">
27
+ var word_list = new Array(
28
+ {text: "Lorem", weight: 13, url: "https://github.com/DukeLeNoir/jQCloud"},
29
+ {text: "Ipsum", weight: 10.5, url: "http://jquery.com/"},
30
+ {text: "Dolor", weight: 9.4},
31
+ {text: "Sit", weight: 8},
32
+ {text: "Amet", weight: 6.2},
33
+ {text: "Consectetur", weight: 5},
34
+ {text: "Adipiscing", weight: 5},
35
+ {text: "Elit", weight: 5},
36
+ {text: "Nam et", weight: 5},
37
+ {text: "Leo", weight: 4},
38
+ {text: "Sapien", weight: 4, url: "http://www.lucaongaro.eu/"},
39
+ {text: "Pellentesque", weight: 3},
40
+ {text: "habitant", weight: 3},
41
+ {text: "morbi", weight: 3},
42
+ {text: "tristisque", weight: 3},
43
+ {text: "senectus", weight: 3},
44
+ {text: "et netus", weight: 3},
45
+ {text: "et malesuada", weight: 3},
46
+ {text: "fames", weight: 2},
47
+ {text: "ac turpis", weight: 2},
48
+ {text: "egestas", weight: 2},
49
+ {text: "Aenean", weight: 2},
50
+ {text: "vestibulum", weight: 2},
51
+ {text: "elit", weight: 2},
52
+ {text: "sit amet", weight: 2},
53
+ {text: "metus", weight: 2},
54
+ {text: "adipiscing", weight: 2},
55
+ {text: "ut ultrices", weight: 2},
56
+ {text: "justo", weight: 1},
57
+ {text: "dictum", weight: 1},
58
+ {text: "Ut et leo", weight: 1},
59
+ {text: "metus", weight: 1},
60
+ {text: "at molestie", weight: 1},
61
+ {text: "purus", weight: 1},
62
+ {text: "Curabitur", weight: 1},
63
+ {text: "diam", weight: 1},
64
+ {text: "dui", weight: 1},
65
+ {text: "ullamcorper", weight: 1},
66
+ {text: "id vuluptate ut", weight: 1},
67
+ {text: "mattis", weight: 1},
68
+ {text: "et nulla", weight: 1},
69
+ {text: "Sed", weight: 1}
70
+ );
71
+ $(document).ready(function() {
72
+ $("#wordcloud").jQCloud(word_list);
73
+ });
74
+ </script>
@@ -15,11 +15,30 @@
15
15
  <% end %>
16
16
 
17
17
  <div class="field">
18
- <%= f.label :name %><br />
19
- <%= f.text_field :name %>
18
+ <%= f.label t('group.new.name') %><br />
19
+ <%= f.text_field :name, :size=> 71 %>
20
20
  </div>
21
-
21
+ <div class="field">
22
+ <%= f.label t('group.new.description') %><br />
23
+ <%= f.text_area :description, :rows =>6, :cols=> 53 %>
24
+ </div>
25
+ <div class="field">
26
+ <%= f.label t('group.new.participants') %><br />
27
+ <%= f.select :_participants, "" %>
28
+ </div>
29
+ <br>
22
30
  <div class="actions">
23
31
  <%= f.submit %>
24
32
  </div>
25
33
  <% end %>
34
+ <br><br>
35
+ <% content_for :javascript do %>
36
+ $("#group__participants").fcbkcomplete({
37
+ json_url: "../contacts/index.json",
38
+ cache: true,
39
+ filter_case: true,
40
+ filter_hide: true,
41
+ newel: false,
42
+ height: 6
43
+ });
44
+ <% end %>
@@ -0,0 +1,19 @@
1
+ <% if user_signed_in? %>
2
+ <div id="logo">
3
+ <b><%= link_to(current_subject.name, current_subject)%></b><br/>
4
+ <%= link_to(image_tag(current_subject.logo.url(:profile) , :alt => current_subject.name ), current_subject ) %>
5
+ </div>
6
+ <div class="space_center">
7
+ </div>
8
+ <div class="menu_header"><b><%=t('menu.options')%></b>
9
+ </div>
10
+ <div id="menu_lateral">
11
+ <%= render :partial => "home/options" %>
12
+ </div>
13
+ <div class="space_center">
14
+ </div>
15
+ <div class="space_center">
16
+ </div>
17
+ <div class="space_center">
18
+ </div>
19
+ <% end %>
@@ -2,7 +2,7 @@
2
2
 
3
3
  <%= render :partial => 'logo' %>
4
4
  <%= render :partial => 'tabs' %>
5
- <div class="space_center">
6
- </div>
5
+ <div class="space_center">
6
+ </div>
7
7
 
8
- <%= render :partial => 'subjects/contacts', :locals => { :subject => @group } %>
8
+ <%= render :partial => 'subjects/contacts', :locals => { :subject => @group } %>
@@ -1,3 +1,5 @@
1
+ <% content_for :head, stylesheet_link_tag("users") %>
2
+
1
3
  <% content_for :middle do %>
2
4
  <%= render :partial => "groups/middle_index" %>
3
5
  <% end %>
@@ -8,22 +10,18 @@
8
10
 
9
11
 
10
12
  <div id="map_location" class="content_size">
11
- Your are here ><img src="images/btn/btn_browse.png" class="btn_config"%> <%=t('browse')%>: <span id="name_group"><%= t('group.other')%></span>
13
+ Your are here ><img src="images/btn/btn_browse.png" class="btn_config"%> <%=t('browse')%>: <span id="name_group"><%= t('group.all')%></span>
12
14
  </div>
13
15
  <div id="by_options" class="content_size"><%= link_to(t('user.by'), users_path) %> </div>
14
16
  <br class="clearfloat" />
15
17
  <div class="space_center">
16
18
  </div>
17
19
 
18
-
19
- <div class="space_center">
20
- </div>
21
-
22
20
  <div id="my_conferences">
23
21
  <div id="tabconference_browse" class="widget content_size">
24
22
  <ul class="tabconference_browse">
25
23
  <li>
26
- <a href="#spaces"> <%= t('group.other')%> (<%=Group.count%>) </a>
24
+ <a href="/groups">All <%= t('group.other')%> (<%=Group.count%>) </a>
27
25
  </li>
28
26
  <li>
29
27
  <a href="#most_popular"> <%= t('group.popular.most')%></a>
@@ -35,58 +33,23 @@
35
33
  <div id="spaces" class="tabconference_browse">
36
34
  <div class="space_center">
37
35
  </div>
38
- <div class="letters" class="content_size">
39
- <a href="#">A</a>
40
- <a href="#">B</a>
41
- <a href="#">C</a>
42
- <a href="#">D</a>
43
- <a href="#">E</a>
44
- <a href="#">F</a>
45
- <a href="#">G</a>
46
- <a href="#">H</a>
47
- <a href="#">I</a>
48
- <a href="#">J</a>
49
- <a href="#">K</a>
50
- <a href="#">L</a>
51
- <a href="#">M</a>
52
- <a href="#">N</a>
53
- <a href="#">O</a>
54
- <a href="#">P</a>
55
- <a href="#">Q</a>
56
- <a href="#">R</a>
57
- <a href="#">S</a>
58
- <a href="#">T</a>
59
- <a href="#">U</a>
60
- <a href="#">V</a>
61
- <a href="#">W</a>
62
- <a href="#">X</a>
63
- <a href="#">Y</a>
64
- <a href="#">Z</a>
36
+ <div><input type="text" value="Search by name" id="search_field" class="search_input" /><%= image_tag("btn/search.png",:size=>"20x20",:id=>"search_button") %></div>
37
+ <div class="space_center">
38
+ </div>
39
+ <div class="letters" class="content_size">
40
+ <% for char in 'A'..'Z' %>
41
+ <%= link_to char,{:letter => char,:page => 1},:class => "user_letter_link" %>
42
+ <% end %>
65
43
  </div>
66
44
  <div class="space_center" class="content_size">
67
45
 
68
46
  </div>
69
- <%= render :partial => "groups/index"%>
47
+ <div id="list_users_ajax">
48
+ <%= render :partial => "groups/index"%>
49
+ </div>
70
50
  <div class="space_center">
71
51
  </div>
72
52
  </div>
73
-
74
- <div id="most_popular" class="tabconference_browse">
75
- <div class="space_center">
76
- </div>
77
-
78
- <div class="space_center">
79
- Most popular groups
80
- </div>
81
- </div>
82
- <div id="most_voted" class="tabconference_browse">
83
- <div class="space_center">
84
- </div>
85
-
86
- <div class="space_center">
87
- Most voted groups
88
- </div>
89
- </div>
90
53
  </div>
91
54
  </div>
92
55
 
@@ -94,3 +57,4 @@
94
57
  <br class="clearfloat" />
95
58
  <div class="space_center">
96
59
  </div>
60
+ <%= javascript_include_tag "ajax.paginate" %>
@@ -0,0 +1 @@
1
+ $('#list_users_ajax').html("<%= escape_javascript(render :partial => "groups/index") %>");
@@ -3,6 +3,6 @@
3
3
  <%= link_to( image_tag("btn/btn_inbox.png", :class => "menu_icon")+t('inbox.one'), messages_path, :remote => true) %>
4
4
  </li>
5
5
  <li>
6
- <%= link_to( image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.new'), new_group_path, :remote => true) %>
6
+ <%= link_to( image_tag("btn/btn_group.png", :class => "menu_icon")+t('group.new.action'), new_group_path, :remote => true) %>
7
7
  </li>
8
8
  </ul>
@@ -11,20 +11,21 @@
11
11
  <%= stylesheet_link_tag "right", :media => "screen, projection" %>
12
12
  <%= stylesheet_link_tag "home", :media => "screen, projection" %>
13
13
  <%= stylesheet_link_tag "browse", :media => "screen, projection" %>
14
- <%= stylesheet_link_tag "social_stream", :media => "screen, projection" %>
14
+ <%= stylesheet_link_tag "social_stream", :media => "screen, projection" %>
15
15
  <%= stylesheet_link_tag "boxy", :media => "screen, projection" %>
16
16
  <%= stylesheet_link_tag "middle", :media => "screen, projection" %>
17
17
  <%= stylesheet_link_tag "menu", :media => "screen, projection" %>
18
18
  <%= stylesheet_link_tag "carousel", :media => "screen, projection" %>
19
19
  <%= stylesheet_link_tag "smoothness/jquery-ui-1.8.4.custom", :media => "screen, projection" %>
20
20
  <%= stylesheet_link_tag "ui.dropdownchecklist", :media => "screen, projection" %>
21
- <%= stylesheet_link_tag "jquery-ui.css", :media => "screen, projection" %>
21
+ <%= stylesheet_link_tag "jquery-ui.css", :media => "screen, projection" %>
22
+ <%= stylesheet_link_tag "fcbkComplete.css", :media => "screen, projection" %>
22
23
 
23
24
  <%= stylesheet_link_tag "edit_user", :media => "screen, projection" %>
24
25
  <%= javascript_include_tag :defaults %>
25
26
 
26
- <%= javascript_include_tag 'jquery', 'jquery-ui.min', 'jquery.livequery',
27
- 'jquery.boxy', 'menu','ui.dropdownchecklist','jquery.form', 'jquery.validate' %>
27
+ <%= javascript_include_tag 'jquery', 'jquery-ui.min', 'jquery.livequery','jquery.boxy', 'menu','ui.dropdownchecklist','jquery.form', 'jquery.validate','jquery.fcbkcomplete.min', 'jquery.ba-url' %>
28
+
28
29
 
29
30
 
30
31
  <% if protect_against_forgery? %>
@@ -55,12 +56,6 @@
55
56
  </div>
56
57
  <div id="middle">
57
58
  <div id="middleContent">
58
- <div class="space_profile">
59
- </div>
60
- <div class="space_profile">
61
- </div>
62
- <div class="space_profile">
63
- </div>
64
59
  <%= yield :middle %>
65
60
  </div>
66
61
  </div>
@@ -1,8 +1,6 @@
1
- <% users = User.alphabetic.paginate(:page => params[:page]) %>
2
1
 
3
2
  <% cont=0; %>
4
-
5
- <% users.each do |user| %>
3
+ <% @users.each do |user| %>
6
4
 
7
5
  <% if (cont%2) == 0
8
6
  cont+=1; %>
@@ -30,4 +28,4 @@
30
28
  </div>
31
29
  <% end %>
32
30
 
33
- <%= will_paginate(users) %>
31
+ <%= will_paginate @users %>
@@ -0,0 +1,6 @@
1
+ <% if user_signed_in? %>
2
+ <div class="space_center"></div>
3
+ <%= render :partial => "ties/suggestions" %>
4
+ <div class="space_center"></div>
5
+ <%= render :partial => 'ties/pendings' %>
6
+ <% end %>
@@ -1,10 +1,7 @@
1
-
2
-
1
+
3
2
 
4
3
  <div class="future_conference" id="personal_info" >
5
4
  <div class="future_header">
6
-
7
- <br/><br/>
8
5
  <div class="title_section">
9
6
  Personal Information
10
7
  </div>
@@ -15,6 +12,7 @@
15
12
  </div>
16
13
  </div>
17
14
  <div class="post_future_conference" >
15
+ <% if @user.profile.organization? %>
18
16
  <div class="info_post">
19
17
  <div class="info_left">
20
18
  Organization:
@@ -23,12 +21,14 @@
23
21
  <%=h @user.profile.organization %>
24
22
  </div>
25
23
  </div>
24
+ <%end%>
25
+ <% if @user.profile.birthday? %>
26
26
  <div class="info_post">
27
27
  <div class="info_left">
28
28
  BirthDay:
29
29
  </div>
30
30
  <div class="info_right">
31
- <%=h @user.profile.birthday.to_s() %>
31
+ <%=h I18n.l @user.profile.birthday, :format => :long %>
32
32
  </div>
33
33
  </div>
34
34
  <div class="info_post">
@@ -39,15 +39,21 @@
39
39
  <%=h @user.age %>
40
40
  </div>
41
41
  </div>
42
+ <%end%>
43
+ <% if @user.profile.city? %>
42
44
  <div class="info_post">
43
45
  <div class="info_left">
44
46
  Actual City:
45
47
  </div>
46
48
  <div class="info_right">
47
- <%=h @user.profile.city %>,
48
- <%=h @user.profile.country %>
49
+ <%=h @user.profile.city %>
50
+ <% if @user.profile.country? %>
51
+ , <%=@user.profile.country%>
52
+ <%end%>
49
53
  </div>
50
54
  </div>
55
+ <%end%>
56
+ <% if @user.profile.description? %>
51
57
  <div class="info_post">
52
58
  <div class="info_left">
53
59
  About me:
@@ -56,6 +62,7 @@
56
62
  <%=h @user.profile.description %>
57
63
  </div>
58
64
  </div>
65
+ <%end%>
59
66
  </div>
60
67
  </div>
61
68
 
@@ -70,19 +77,62 @@
70
77
  </div>
71
78
  <div class="post_future_conference">
72
79
  <div class="future_content">
80
+ <% if @user.profile.phone? %>
81
+ <div class="info_post">
82
+ <div class="info_left">
83
+ Phone
84
+ </div>
85
+ <div class="info_right">
86
+ <%=h @user.profile.phone %>
87
+ </div>
88
+ </div>
89
+ <%end%>
90
+ <% if @user.profile.mobile? %>
91
+ <div class="info_post">
92
+ <div class="info_left">
93
+ Mobile
94
+ </div>
95
+ <div class="info_right">
96
+ <%=h @user.profile.mobile %>
97
+ </div>
98
+ </div>
99
+ <%end%>
100
+ <% if @user.profile.fax? %>
101
+ <div class="info_post">
102
+ <div class="info_left">
103
+ Fax
104
+ </div>
105
+ <div class="info_right">
106
+ <%=h @user.profile.fax %>
107
+ </div>
108
+ </div>
109
+ <%end%>
110
+ <% if @user.profile.address? %>
111
+ <div class="info_post">
112
+ <div class="info_left">
113
+ Address
114
+ </div>
115
+ <div class="info_right">
116
+ <%=h @user.profile.address %>
117
+ </div>
118
+ </div>
119
+ <%end%>
120
+ <% if @user.profile.website? %>
73
121
  <div class="info_post">
74
- <div>
122
+ <div class="info_left">
75
123
  Website
76
124
  </div>
77
125
  <div class="contact_link">
78
126
  <a href="<%=h @user.profile.website %>"><%=h @user.profile.website %></a>
79
127
  </div>
80
128
  </div>
129
+ <%end%>
130
+
81
131
  <div class="info_post">
82
- <div>
132
+ <div class="info_left">
83
133
  E-mail
84
134
  </div>
85
- <div class="contact_link">
135
+ <div class="info_right">
86
136
  <%=h @user.email %>
87
137
  </div>
88
138
  </div>
@@ -0,0 +1,19 @@
1
+ <% if user_signed_in? %>
2
+ <div id="logo">
3
+ <b><%= link_to(current_subject.name, current_subject)%></b><br/>
4
+ <%= link_to(image_tag(current_subject.logo.url(:profile) , :alt => current_subject.name ), current_subject ) %>
5
+ </div>
6
+ <div class="space_center">
7
+ </div>
8
+ <div class="menu_header"><b><%=t('menu.options')%></b>
9
+ </div>
10
+ <div id="menu_lateral">
11
+ <%= render :partial => "home/options" %>
12
+ </div>
13
+ <div class="space_center">
14
+ </div>
15
+ <div class="space_center">
16
+ </div>
17
+ <div class="space_center">
18
+ </div>
19
+ <% end %>