Skip to content

Commit

Permalink
Merge branch 'release/0.6.11.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
kalashnikovisme committed Mar 27, 2016
2 parents d41311f + 4234963 commit 0dc4722
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/web/events.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ ->
#{participant.first_name} #{participant.last_name}
</div>
<div class='role'>
#{I18n.t("enumerize.event.registration.role.#{role}")}
#{I18n.t("enumerize.event/registration.role.#{role}")}
</div>
</a>
</section>
Expand All @@ -29,13 +29,13 @@ $ ->
#{participant.first_name} #{participant.last_name}
</div>
<div class='role'>
#{I18n.t("enumerize.event.registration.role.#{role}")}
#{I18n.t("enumerize.event/registration.role.#{role}")}
</div>
</section>
</li>"

set_participants_count_from_span = (changes) ->
count = parseInt $participants_count_span.html().match(/[0-9]/)[0]
count = parseInt $participants_count_span.html().match(/[0-9]+/)[0]
count += changes
$participants_count_span.html("(#{count})")

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/web/admin/unviewed_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def check_notificatable_items
redirect_to params.except(:items)
end
else
params[:items] ||= Concerns::NotificatableItems.items.first
redirect_to admin_unviewed_index_path items: Concerns::NotificatableItems.items.first
end
end

Expand Down
3 changes: 2 additions & 1 deletion app/decorators/position_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ class PositionDecorator < ApplicationDecorator
decorates_association :member

def end_date_datetime
if for_now
# FIXME change for_now type
if for_now == '1'
I18n.t('activerecord.attributes.position.for_now')
else
object.end_date ? I18n.l(object.end_date.to_datetime, format: '%d.%m.%Y') : object.end_date
Expand Down
4 changes: 0 additions & 4 deletions app/helpers/web/admin/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def searchable_model?(model_class)
model_class.methods.include? :search_everywhere
end

def record_path(record)
"#{record.class.name.underscore.pluralize}/#{record.id}"
end

def form_after_save?
referrer = Rails.application.routes.recognize_path request.referrer
referrer[:controller] == params[:controller] && referrer[:action] == params[:action]
Expand Down
5 changes: 4 additions & 1 deletion app/views/web/admin/comments/_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
- comments.each do |comment|
%tr.link{ class: state_color(comment), data: { href: edit_admin_comment_path(comment) } }
%td= comment.id
%td= link_to comment.record.decorate.title, record_path(comment.record)
%td
= link_to comment.record do
= comment.record.decorate.title
= fa_icon 'share-square-o'
%td= comment.user.short_name if comment.user_id
%td= comment.text
%td.actions
Expand Down
2 changes: 1 addition & 1 deletion app/views/web/admin/news/_list.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%td{ width: '67px' }
= link_to news.id, edit_admin_news_path(news)
= link_to news_path(news) do
%span.glyphicon.glyphicon-share
= fa_icon 'share-square-o'
%td= news.author_name
%td
= link_to news.title, edit_admin_news_path(news)
Expand Down
4 changes: 2 additions & 2 deletions lib/concerns/gender_helper.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module GenderHelper
def is_male?
@sex_detector ||= SexDetector.detector
@sex_detector.detect(first_name) == 'M'
@sex_detector.detect(first_name.strip) == 'M'
end

def is_female?
@sex_detector ||= SexDetector.detector
@sex_detector.detect(first_name) == 'F'
@sex_detector.detect(first_name.strip) == 'F'
end
end

0 comments on commit 0dc4722

Please sign in to comment.