Skip to content

Commit c9f0fe8

Browse files
author
Angel Solorio
committed
Social links added in the sidebar and some controller and integration tests were fixed
1 parent 65d9d3b commit c9f0fe8

File tree

9 files changed

+106
-12
lines changed

9 files changed

+106
-12
lines changed

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ group :assets do
3838
gem 'bootstrap-datepicker-rails',
3939
:require => 'bootstrap-datepicker-rails',
4040
github: 'Nerian/bootstrap-datepicker-rails'
41-
gem 'font-awesome-sass-rails'
41+
gem 'font-awesome-rails'
4242
end
4343

4444
gem 'jquery-rails'

Gemfile.lock

+3-4
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ GEM
147147
net-ssh (>= 2.1.4)
148148
nokogiri (>= 1.4.4)
149149
ruby-hmac
150-
font-awesome-sass-rails (3.0.2.2)
151-
railties (>= 3.1.1)
152-
sass-rails (>= 3.1.1)
150+
font-awesome-rails (3.2.1.2)
151+
railties (>= 3.2, < 5.0)
153152
foreman (0.63.0)
154153
dotenv (>= 0.7)
155154
thor (>= 0.13.6)
@@ -322,7 +321,7 @@ DEPENDENCIES
322321
dalli
323322
exception_notification (~> 4.0.0.rc1)
324323
fog
325-
font-awesome-sass-rails
324+
font-awesome-rails
326325
foreman
327326
friendly_id!
328327
geocoder

app/assets/stylesheets/railsmx/_application.css.scss

+42-2
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ sidebar {
224224
font-family: "Helvetica" !important;
225225
font-size: 0.8em !important;
226226

227-
p {
227+
p {
228228
margin-top: 0;
229-
font-weight: 300;
229+
font-weight: 300;
230230
}
231231
}
232232
}
@@ -244,6 +244,46 @@ sidebar {
244244
}
245245
}
246246

247+
.social-links {
248+
margin: $margin 0;
249+
250+
ul {
251+
margin: ($margin / 4) 0;
252+
padding: 0;
253+
}
254+
255+
.icons {
256+
color: gray;
257+
width: 100%;
258+
display: inline-block;
259+
padding: ($padding / 3) 0;
260+
261+
i {
262+
font-family: FontAwesome;
263+
font-style: normal;
264+
text-decoration: inherit;
265+
}
266+
267+
a {
268+
color: gray;
269+
padding-right: 0;
270+
font-weight: normal;
271+
font-size: .8em !important;
272+
-webkit-font-smoothing: antialiased;
273+
}
274+
}
275+
276+
.icons:hover {
277+
color: $red;
278+
279+
a { color: $red; }
280+
}
281+
282+
.icon-microphone {
283+
i { padding-left: 5px; }
284+
}
285+
}
286+
247287
h4 {
248288
margin: 0 !important;
249289
color: $black !important;

app/views/railsmx/crowdblog/posts/index.html.erb

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
<% title t('.blog') %>
22
<div class="content posts-index">
33
<section class="left-section">
4-
<sidebar>
4+
 <sidebar>
55
<div class="events">
66
<h4><%= t('.coming_events') %></h4>
77
<div class="sidebar-events">
88
<%= !@current_events.empty? ? (render partial: 'shared/event', collection: @current_events) : t('.not_content') %>
99
</div>
1010
</div>
11+
<div class="social-links">
12+
<h4><%= t('.social') %></h4>
13+
<ul>
14+
<div class="icons icon-twitter">
15+
<i><%= link_to '@railsmx', 'http://twitter.com/railsmx', target: '_blank' %></i>
16+
</div>
17+
<div class="icons icon-google-plus">
18+
<i><%= link_to 'RailsMX', 'https://plus.google.com/communities/113995479213399624141', target: '_blank' %></i>
19+
</div>
20+
<div class="icons icon-microphone">
21+
<i><%= link_to 'Ruby en Español', 'http://rubyen.es', target: '_blank' %></i>
22+
</div>
23+
<div class="icons icon-group">
24+
<i><%= link_to 'Codificadas MX', 'https://www.facebook.com/Codificadas', target: '_blank' %></i>
25+
</div>
26+
</ul>
27+
</div>
1128
</sidebar>
1229
</section>
1330

app/views/railsmx/events/index.html.erb

+17
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,23 @@
1010
<%= !@current_posts.empty? ? (render partial: 'shared/post', collection: @current_posts) : t('.not_content') %>
1111
</div>
1212
</div>
13+
<div class="social-links">
14+
<h4><%= t('.social') %></h4>
15+
<ul>
16+
<div class="icons icon-twitter">
17+
<i><%= link_to '@railsmx', 'http://twitter.com/railsmx', target: '_blank' %></i>
18+
</div>
19+
<div class="icons icon-google-plus">
20+
<i><%= link_to 'RailsMX', 'https://plus.google.com/communities/113995479213399624141', target: '_blank' %></i>
21+
</div>
22+
<div class="icons icon-microphone">
23+
<i><%= link_to 'Ruby en Español', 'http://rubyen.es', target: '_blank' %></i>
24+
</div>
25+
<div class="icons icon-group">
26+
<i><%= link_to 'Codificadas MX', 'https://www.facebook.com/Codificadas', target: '_blank' %></i>
27+
</div>
28+
</ul>
29+
</div>
1330
</sidebar>
1431
</section>
1532

app/views/railsmx/shared/_sidebar.html.erb

+18
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,22 @@
1616
</div>
1717
<% end %>
1818
</div>
19+
20+
<div class="social-links">
21+
<h4><%= t('.social') %></h4>
22+
<ul>
23+
<div class="icons icon-twitter">
24+
<i><%= link_to '@railsmx', 'http://twitter.com/railsmx', target: '_blank' %></i>
25+
</div>
26+
<div class="icons icon-google-plus">
27+
<i><%= link_to 'RailsMX', 'https://plus.google.com/communities/113995479213399624141', target: '_blank' %></i>
28+
</div>
29+
<div class="icons icon-microphone">
30+
<i><%= link_to 'Ruby en Español', 'http://rubyen.es', target: '_blank' %></i>
31+
</div>
32+
<div class="icons icon-group">
33+
<i><%= link_to 'Codificadas MX', 'https://www.facebook.com/Codificadas', target: '_blank' %></i>
34+
</div>
35+
</ul>
36+
</div>
1937
</sidebar>

config/locales/es.yml

+3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ es:
4747
coming_events: 'Próximos Eventos'
4848
blog: 'Blog'
4949
not_content: 'No hay contenido disponible'
50+
social: 'Social'
5051
post:
5152
details: 'Ver detalles...'
5253
event:
@@ -91,6 +92,7 @@ es:
9192
blog: 'Blog'
9293
coming_events: 'Próximos Eventos'
9394
not_content: 'No hay contenido disponible'
95+
social: 'Social'
9496
admin:
9597
posts:
9698
index:
@@ -126,6 +128,7 @@ es:
126128
add_event: 'Registrar evento'
127129
create_event: 'Su evento ha sido creado'
128130
edit: 'Modificar'
131+
social: 'Social'
129132
edit:
130133
update_event: 'Actualizar evento'
131134
edit_event_title: 'Actualizar un evento'

test/integration/blog_management_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
feature 'BlogManagement Feature Test' do
44
background do
5-
mock_omniauth(12334, '[email protected]')
5+
mock_omniauth('12334', '[email protected]')
66
Rails.application.config.publishers = '[email protected]'
77
end
88

@@ -15,7 +15,7 @@
1515
end
1616

1717
scenario "when current user isn't publisher" do
18-
mock_omniauth(12263, '[email protected]')
18+
mock_omniauth('12263', '[email protected]')
1919

2020
login_user
2121

test/models/identity_test.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require "test_helper"
22

33
describe Identity do
4-
let(:identity_valid) { identity_valid = Identity.find_by_uid(3345444) }
4+
let(:identity_valid) { identity_valid = Identity.find_by_uid('3345444') }
55
let(:identity_invalid) { identity_invalid = Identity.new }
66

7-
let(:auth) { auth = { "provider" => 'github', "uid" => 3345444, "info" => { "nickname" => 'test_user',
7+
let(:auth) { auth = { "provider" => 'github', "uid" => '3345444', "info" => { "nickname" => 'test_user',
88
"email" => '[email protected]' } } }
99

1010
describe "Validations" do

0 commit comments

Comments
 (0)