diff --git a/app/models/person.rb b/app/models/person.rb index 8a6d98e..db2c275 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -601,7 +601,7 @@ class Person < Profile protected def followed_by?(profile) - self == profile || self.is_a_friend?(profile) || self.followers.include(profile) + self == profile || self.is_a_friend?(profile) || self.followers.include?(profile) end end diff --git a/app/views/blocks/profile_info_actions/_person.html.erb b/app/views/blocks/profile_info_actions/_person.html.erb index 4e329d7..3cf9f23 100644 --- a/app/views/blocks/profile_info_actions/_person.html.erb +++ b/app/views/blocks/profile_info_actions/_person.html.erb @@ -11,7 +11,7 @@ <% if profile.follows?(user) %> <%= button(:unfollow, content_tag('span', _('Unfollow')), "#", :class => 'add-friend', :title => _("Unfollow"), :style => 'position: relative;') %> <% else %> - <%= button(:follow, content_tag('span', _('Follow')), "#", :class => 'add-friend', :title => _("Follow"), :style => 'position: relative;') %> + <%= modal_button(:follow, _('Follow'),{ :profile => profile.identifier, :controller => 'followed_people', :action => 'set_category'}, :title => _("Follow"), :style => 'position: relative;') %> <% end %> diff --git a/app/views/followed_people/_profile_list.html.erb b/app/views/followed_people/_profile_list.html.erb index d38a43d..e919c12 100644 --- a/app/views/followed_people/_profile_list.html.erb +++ b/app/views/followed_people/_profile_list.html.erb @@ -3,6 +3,9 @@
  • <%= link_to_profile profile_image(profile) + tag('br') + profile.short_name, profile.identifier, :class => 'profile-link' %> +
    + <%= _(Category) %> +
    <%= button_without_text :remove, content_tag('span',_('remove')), { :action => 'remove', :id => profile.id }, diff --git a/app/views/followed_people/_set_category_modal.html.erb b/app/views/followed_people/_set_category_modal.html.erb index dfa0d32..fa9d159 100644 --- a/app/views/followed_people/_set_category_modal.html.erb +++ b/app/views/followed_people/_set_category_modal.html.erb @@ -2,7 +2,9 @@

    <%= _("Select a category") %>

    <%= labelled_text_field _("Category: "), "person_category" %> - <%= submit_button('save', _('Save')) %> - <%= modal_close_button _("Cancel") %> +
    + <%= submit_button('save', _('Save')) %> + <%= modal_close_button _("Cancel") %> +
    -- libgit2 0.21.2