social_stream-base 0.9.13 → 0.9.14
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.
- data/app/assets/stylesheets/base.css +33 -2
- data/app/assets/stylesheets/header.css +4 -1
- data/app/assets/stylesheets/search.css +1 -23
- data/app/controllers/search_controller.rb +4 -0
- data/app/controllers/settings_controller.rb +1 -1
- data/app/helpers/toolbar_helper.rb +10 -2
- data/app/views/devise/sessions/new.html.erb +1 -1
- data/app/views/devise/shared/_links.erb +25 -0
- data/app/views/frontpage/_header.html.erb +12 -5
- data/app/views/layouts/_search.html.erb +5 -1
- data/app/views/search/_focus_search.html.erb +5 -10
- data/app/views/search/_form.html.erb +1 -1
- data/app/views/search/_index_frontpage.html.erb +29 -0
- data/app/views/search/index.html.erb +8 -9
- data/app/views/toolbar/_messages.html.erb +11 -0
- data/config/locales/en.yml +0 -1
- data/lib/social_stream/base/version.rb +1 -1
- data/lib/social_stream/toolbar_config/base.rb +23 -27
- data/spec/controllers/settings_controller_spec.rb +1 -1
- metadata +6 -3
@@ -44,8 +44,8 @@ label.validation_error{color: #D8000C;background-color: #FFBABA;border: 1px soli
|
|
44
44
|
.error, #error_explanation {color: #D8000C;background-color: #FFBABA;background-image: url('btn/error.png');}
|
45
45
|
|
46
46
|
/************Forms SECTION **************/
|
47
|
-
input.other_blue{ background:#497FC1; border:0px; cursor:pointer;
|
48
|
-
|
47
|
+
input.other_blue{ background-color:#497FC1 !important; border:0px; cursor:pointer; line-height:135%;
|
48
|
+
padding: 1px 5px !important; margin: 5px 0px !important;}
|
49
49
|
textarea.new_contact_text_area{ height: 100px; color: #2A3890;}
|
50
50
|
.colum_field_title{ text-align: center; }
|
51
51
|
.needed{color:#6C6D6F;font-weight: normal;}
|
@@ -203,3 +203,34 @@ button, input[type=submit]{margin: 10px 0 10px 0px;padding: 3px 20px 3px 20px;co
|
|
203
203
|
text-align: center;
|
204
204
|
}
|
205
205
|
|
206
|
+
/********************************* Menu list options ***********/
|
207
|
+
.menu_plain_list {
|
208
|
+
list-style: none;
|
209
|
+
}
|
210
|
+
.menu_plain_list li {
|
211
|
+
line-height: 27px;
|
212
|
+
vertical-align: top;
|
213
|
+
display: inline;
|
214
|
+
}
|
215
|
+
.menu_plain_list li span:hover {
|
216
|
+
background: #CFDEFF;
|
217
|
+
color: #2A3890;
|
218
|
+
}
|
219
|
+
.menu_plain_list li a:hover {
|
220
|
+
text-decoration: none;
|
221
|
+
}
|
222
|
+
.menu_plain_list li span {
|
223
|
+
padding: 5px 10px;
|
224
|
+
background-color: #E1EEF5;
|
225
|
+
}
|
226
|
+
.menu_plain_list li span.selected {
|
227
|
+
border: solid 1px #2A3890;
|
228
|
+
}
|
229
|
+
|
230
|
+
.menu_plain_list img{
|
231
|
+
vertical-align: middle;
|
232
|
+
padding-bottom: 3px;
|
233
|
+
padding-right: 3px;
|
234
|
+
padding-left: 3px;
|
235
|
+
display: inline-block;
|
236
|
+
}
|
@@ -16,8 +16,11 @@
|
|
16
16
|
.div_login #username{ height:10px; }
|
17
17
|
.div_login, .input_username{ position:relative; padding: 0px; border: 0px; }
|
18
18
|
.div_login #login_button{ width:61px; height:18px; }
|
19
|
+
.div_login #login_data{display: block;}
|
20
|
+
.div_login .login_data_block{ display: inline-block; padding-left: 10px;}
|
21
|
+
.div_login .login_data_block input{ width: 250px;}
|
19
22
|
.div_login a.login{ background-color:#497FC1; padding-right:2px; padding-left:2px; color:white; }
|
20
|
-
.div_login .subtexto{ padding-top: 8px; height:
|
23
|
+
.div_login .subtexto{ padding-top: 8px; height:20px; font-size: 11px; }
|
21
24
|
.div_login .a_border{ border-right:thin solid; padding-right:7px; text-decoration:underline; }
|
22
25
|
#new_representation { display: inline-block;}
|
23
26
|
#header_notifications a{color: white; background: transparent url('btn/header_notifications.png') no-repeat center center;padding: 4px 10px 6px 11px;}
|
@@ -144,27 +144,5 @@
|
|
144
144
|
#search_form .error {
|
145
145
|
display: none;
|
146
146
|
}
|
147
|
-
|
148
|
-
#focus_options ul {
|
149
|
-
list-style: none;
|
150
|
-
}
|
151
|
-
#focus_options ul li {
|
152
|
-
line-height: 27px;
|
153
|
-
vertical-align: top;
|
154
|
-
display: inline;
|
155
|
-
}
|
156
|
-
#focus_options li span:hover {
|
157
|
-
background: #CFDEFF;
|
158
|
-
color: #2A3890;
|
159
|
-
}
|
160
|
-
#focus_options ul li a:hover {
|
161
|
-
text-decoration: none;
|
162
|
-
}
|
163
|
-
#focus_options ul li span {
|
164
|
-
padding: 5px 10px;
|
165
|
-
background-color: #E1EEF5;
|
166
|
-
}
|
167
|
-
#focus_options ul li span.selected {
|
168
|
-
border: solid 1px #2A3890;
|
169
|
-
}
|
147
|
+
|
170
148
|
/******************** Search css END ***********************/
|
@@ -16,7 +16,8 @@ module ToolbarHelper
|
|
16
16
|
# For example, the messages menu when you are looking your inbox. This is done through :option element.
|
17
17
|
#
|
18
18
|
# To get it working, you should use the proper :option to be expanded, ":option => :messages" in the
|
19
|
-
# mentioned example. This will try
|
19
|
+
# mentioned example. This will try
|
20
|
+
# Base toolbar items, automatically, to expand the section of the menu where its root
|
20
21
|
# list link, the one expanding the section, has an id equal to "#messages_menu". If you use
|
21
22
|
# ":options => :contacts" it will try to expand "#contacts_menu".
|
22
23
|
#
|
@@ -49,6 +50,8 @@ module ToolbarHelper
|
|
49
50
|
content = capture do
|
50
51
|
if options[:profile]
|
51
52
|
render :partial => 'toolbar/profile', :locals => { :subject => options[:profile] }
|
53
|
+
elsif options[:option].present? and options[:option].to_s.eql? 'messages'
|
54
|
+
render :partial => 'toolbar/messages'
|
52
55
|
else
|
53
56
|
render :partial => 'toolbar/home'
|
54
57
|
end
|
@@ -88,10 +91,15 @@ module ToolbarHelper
|
|
88
91
|
render_items home_toolbar_items
|
89
92
|
end
|
90
93
|
|
91
|
-
#Prints the
|
94
|
+
#Prints the profile toolbar menu.
|
92
95
|
def profile_toolbar_menu(subject=current_subject)
|
93
96
|
render_items profile_toolbar_items(subject)
|
94
97
|
end
|
98
|
+
|
99
|
+
#Prints the messages toolbar menu.
|
100
|
+
def messages_toolbar_menu
|
101
|
+
render_items messages_toolbar_items
|
102
|
+
end
|
95
103
|
|
96
104
|
#Renders array of navigation items with simple_navigation
|
97
105
|
def render_items(items)
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<h2><%= t('sign_in') %></h2>
|
8
8
|
<div class="space_center"></div>
|
9
9
|
<div class="space_center"></div>
|
10
|
-
<%= form_for(resource, :as => resource_name, :url =>
|
10
|
+
<%= form_for(resource, :as => resource_name, :url => user_session_path) do |f| %>
|
11
11
|
<%= devise_error_messages! %>
|
12
12
|
<div class="form_row">
|
13
13
|
<div class="form_label"><%= f.label :email %></div>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to "Sign in", new_user_session_path %><br />
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
10
|
+
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
15
|
+
<% end -%>
|
16
|
+
|
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 />
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
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 />
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -3,11 +3,19 @@
|
|
3
3
|
<div id="logo"><%= link_to(image_tag('logo.png', :alt => t('site.name')), '/'); %></div>
|
4
4
|
<div class="div_login">
|
5
5
|
<%= form_for User.new, :as => :user, :url => user_session_path do |f| -%>
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
<div id="login_data">
|
7
|
+
<div class="login_data_block">
|
8
|
+
<span><%= f.label :email %></span>
|
9
|
+
<%= f.email_field :email, :class => "input_username" %>
|
10
|
+
</div>
|
11
|
+
<div class="login_data_block">
|
12
|
+
<span><%= f.label :password %></span>
|
13
|
+
<%= f.password_field :password, :class => "input_username" %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div>
|
10
17
|
<%= f.submit t(:sign_in), :class => 'other_blue'%>
|
18
|
+
</div>
|
11
19
|
<% end -%>
|
12
20
|
<div class="subtexto">
|
13
21
|
<%= link_to t('sign_up'), new_user_registration_path, :class => "register_link" %>
|
@@ -22,4 +30,3 @@
|
|
22
30
|
<br class="clearfloat" />
|
23
31
|
</div>
|
24
32
|
</div>
|
25
|
-
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div id="header_search">
|
2
|
-
<form action="<%=search_path%>" method="get">
|
2
|
+
<form action="<%=search_path%>" method="get" id="header_search_form">
|
3
3
|
<%= text_field_tag :search_query, nil,:autocomplete => :off, :id => :header_search_input %>
|
4
4
|
</form>
|
5
5
|
<div id="header_search_display">
|
@@ -23,6 +23,10 @@ $(document).ready(function() {
|
|
23
23
|
e.stopPropagation();
|
24
24
|
});
|
25
25
|
|
26
|
+
$("#header_search_form").submit(function(){
|
27
|
+
$("#header_search_display").hide();
|
28
|
+
});
|
29
|
+
|
26
30
|
$("#header_search_input").Watermark("<%= escape_javascript(I18n.t('search.name')) %>");
|
27
31
|
|
28
32
|
$("#header_search_input").keyup(function() {
|
@@ -1,22 +1,17 @@
|
|
1
1
|
<div class="title">
|
2
|
-
|
2
|
+
<%= @search_class_sym.to_s.capitalize.pluralize %>
|
3
3
|
</div>
|
4
4
|
<br class="clearfloat" />
|
5
5
|
<% if @search_result.empty? %>
|
6
6
|
<div class="subject_with_details">
|
7
|
-
|
7
|
+
<%= I18n.t('search.no_subject_found', :subject => @search_class_sym.to_s) %>
|
8
8
|
</div>
|
9
9
|
<% else %>
|
10
10
|
<% total = 0 %>
|
11
|
+
<% @search_result.each do |subject|%>
|
11
12
|
<div class="subject_search_results block left">
|
12
|
-
|
13
|
-
<%= subject_with_details subject %>
|
14
|
-
<% total+=1 %>
|
15
|
-
<% if (total%(SearchController::FOCUS_SEARCH_PER_PAGE/2)==0) %>
|
16
|
-
</div>
|
17
|
-
<div class="subject_search_results block left">
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
13
|
+
<%= subject_with_details subject %>
|
20
14
|
</div>
|
15
|
+
<% end %>
|
21
16
|
<%= paginate @search_result %>
|
22
17
|
<% end %>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<%= text_field_tag :search_query, params[:search_query].present? ? params[:search_query] : nil ,:autocomplete => :off, :id => :global_search_input %>
|
7
7
|
</div>
|
8
8
|
<div id="focus_options" class="form_row search_row">
|
9
|
-
<ul>
|
9
|
+
<ul class="menu_plain_list">
|
10
10
|
<li><%= link_to content_tag(:span,t('search.show_all'),:class => params[:focus].blank? ? 'global selected' : 'global'), search_path(:search_query => params[:search_query]), :remote => true %></li>
|
11
11
|
<% SocialStream.subjects.each do |subject| %>
|
12
12
|
<% selected_class = (params[:focus].present? and params[:focus].pluralize.downcase.eql?(subject.to_s.pluralize.downcase)) ? 'selected' : ''%>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<nav id="toolbar">
|
2
|
+
<div id="toolbarContent" class="block">
|
3
|
+
<div class="space_center"></div>
|
4
|
+
</div>
|
5
|
+
</nav>
|
6
|
+
<div id= "center_body">
|
7
|
+
<section id="content">
|
8
|
+
<%= location(link_to(t('search.global.name')))%>
|
9
|
+
<br class="clearfloat" />
|
10
|
+
<div class="space_center"></div>
|
11
|
+
<h2><%= t('search.name') %></h2>
|
12
|
+
<div class="space_center"></div>
|
13
|
+
<div id="search_form_div">
|
14
|
+
<%= render :partial => 'form' %>
|
15
|
+
</div>
|
16
|
+
<div class="space_center"></div>
|
17
|
+
<div class="space_center"></div>
|
18
|
+
<div id="search_results" class="block">
|
19
|
+
<% unless params[:focus].present? %>
|
20
|
+
<%= render :partial => 'global_search' %>
|
21
|
+
<% else %>
|
22
|
+
<%= render :partial => 'focus_search' %>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
</section>
|
26
|
+
</div>
|
27
|
+
<aside id="sidebar">
|
28
|
+
<div id="sidebarContent"></div>
|
29
|
+
</aside>
|
@@ -1,16 +1,15 @@
|
|
1
1
|
<% content_for :title do %>
|
2
|
-
|
2
|
+
<%= t('search.name')%> <%= params[:search_query].present? ? ": #{params[:search_query]}" : ""%>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :sidebar do %>
|
6
|
-
|
6
|
+
<%= render :partial => 'home/sidebar' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
|
-
<% toolbar %>
|
9
|
+
<% toolbar if user_signed_in? %>
|
10
10
|
|
11
|
-
<%
|
12
|
-
|
13
|
-
<%
|
14
|
-
|
15
|
-
|
16
|
-
<%= render :partial => 'index' %>
|
11
|
+
<% if user_signed_in? %>
|
12
|
+
<%= render :partial => 'index' %>
|
13
|
+
<% else %>
|
14
|
+
<%= render :partial => 'index_frontpage' %>
|
15
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%= render :partial => 'toolbar/logo', :locals => {:subject => current_subject} %>
|
2
|
+
|
3
|
+
<div class="block space_center">
|
4
|
+
</div>
|
5
|
+
|
6
|
+
<div id="menu_lateral" class="toolbar_menu">
|
7
|
+
<%= messages_toolbar_menu %>
|
8
|
+
</div>
|
9
|
+
|
10
|
+
<div class="block space_center">
|
11
|
+
</div>
|
data/config/locales/en.yml
CHANGED
@@ -4,32 +4,7 @@ module SocialStream
|
|
4
4
|
# Base toolbar items
|
5
5
|
def home_toolbar_items
|
6
6
|
Array.new.tap do |items|
|
7
|
-
|
8
|
-
items << {
|
9
|
-
:key => :messages,
|
10
|
-
:name => image_tag("btn/new.png")+t('message.other')+' (' + current_subject.mailbox.inbox(:unread => true).count.to_s + ')',
|
11
|
-
:url => "#",
|
12
|
-
:options => {:link => {:id => "messages_menu"}},
|
13
|
-
:items => [
|
14
|
-
{ :key => :message_new,
|
15
|
-
:name => image_tag("btn/message_new.png")+ t('message.new'),
|
16
|
-
:url => new_message_path,
|
17
|
-
:options => {:link =>{:remote=> false}}},
|
18
|
-
{ :key => :message_inbox,
|
19
|
-
:name => image_tag("btn/message_inbox.png")+t('message.inbox')+' (' + current_subject.mailbox.inbox(:unread => true).count.to_s + ')',
|
20
|
-
:url => conversations_path,
|
21
|
-
:options => {:link =>{:remote=> false}}},
|
22
|
-
{ :key => :message_sentbox,
|
23
|
-
:name => image_tag("btn/message_sentbox.png")+t('message.sentbox'),
|
24
|
-
:url => conversations_path(:box => :sentbox),
|
25
|
-
:options => {:link =>{:remote=> false}}},
|
26
|
-
{ :key => :message_trash,
|
27
|
-
:name => image_tag("btn/message_trash.png")+t('message.trash'),
|
28
|
-
:url => conversations_path(:box => :trash)}
|
29
|
-
]
|
30
|
-
}
|
31
|
-
|
32
|
-
#Contacts
|
7
|
+
#Contacts
|
33
8
|
items << {
|
34
9
|
:key => :contacts,
|
35
10
|
:name => image_tag("btn/btn_friend.png")+t('contact.other'),
|
@@ -48,7 +23,7 @@ module SocialStream
|
|
48
23
|
# Builds the default profile toolbar items
|
49
24
|
def profile_toolbar_items(subject = current_subject)
|
50
25
|
Array.new.tap do |items|
|
51
|
-
|
26
|
+
#Information button
|
52
27
|
items << {
|
53
28
|
:key => :subject_info,
|
54
29
|
:name => image_tag("btn/btn_edit.png")+t('menu.information'),
|
@@ -81,6 +56,27 @@ module SocialStream
|
|
81
56
|
end
|
82
57
|
end
|
83
58
|
end
|
59
|
+
|
60
|
+
def messages_toolbar_items
|
61
|
+
Array.new.tap do |items|
|
62
|
+
# Messages
|
63
|
+
items << { :key => :message_new,
|
64
|
+
:name => image_tag("btn/message_new.png")+ t('message.new'),
|
65
|
+
:url => new_message_path,
|
66
|
+
:options => {:link =>{:remote=> false}}}
|
67
|
+
items << { :key => :message_inbox,
|
68
|
+
:name => image_tag("btn/message_inbox.png")+t('message.inbox')+' (' + current_subject.mailbox.inbox(:unread => true).count.to_s + ')',
|
69
|
+
:url => conversations_path,
|
70
|
+
:options => {:link =>{:remote=> false}}}
|
71
|
+
items << { :key => :message_sentbox,
|
72
|
+
:name => image_tag("btn/message_sentbox.png")+t('message.sentbox'),
|
73
|
+
:url => conversations_path(:box => :sentbox),
|
74
|
+
:options => {:link =>{:remote=> false}}}
|
75
|
+
items << { :key => :message_trash,
|
76
|
+
:name => image_tag("btn/message_trash.png")+t('message.trash'),
|
77
|
+
:url => conversations_path(:box => :trash)}
|
78
|
+
end
|
79
|
+
end
|
84
80
|
end
|
85
81
|
end
|
86
82
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: social_stream-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 14
|
10
|
+
version: 0.9.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- GING - DIT - UPM
|
@@ -774,6 +774,7 @@ files:
|
|
774
774
|
- app/views/devise/registrations/edit.html.erb
|
775
775
|
- app/views/devise/registrations/new.html.erb
|
776
776
|
- app/views/devise/sessions/new.html.erb
|
777
|
+
- app/views/devise/shared/_links.erb
|
777
778
|
- app/views/frontpage/_header.html.erb
|
778
779
|
- app/views/frontpage/_sponsor.html.erb
|
779
780
|
- app/views/frontpage/host_meta.xml.builder
|
@@ -870,6 +871,7 @@ files:
|
|
870
871
|
- app/views/search/_global_search.html.erb
|
871
872
|
- app/views/search/_header_search.html.erb
|
872
873
|
- app/views/search/_index.html.erb
|
874
|
+
- app/views/search/_index_frontpage.html.erb
|
873
875
|
- app/views/search/index.html.erb
|
874
876
|
- app/views/search/index.js.erb
|
875
877
|
- app/views/settings/_api_key.html.erb
|
@@ -885,6 +887,7 @@ files:
|
|
885
887
|
- app/views/ties/index.html.erb
|
886
888
|
- app/views/toolbar/_home.html.erb
|
887
889
|
- app/views/toolbar/_logo.html.erb
|
890
|
+
- app/views/toolbar/_messages.html.erb
|
888
891
|
- app/views/toolbar/_profile.html.erb
|
889
892
|
- app/views/users/_groups.html.erb
|
890
893
|
- app/views/users/_index.html.erb
|