Skip to content

Commit

Permalink
Now showing the full description and the description of disabled spaces
Browse files Browse the repository at this point in the history
so that the highlight can show description findings on long texts and disabled spaces
  • Loading branch information
RafaFP committed Oct 18, 2016
1 parent d0b379f commit cf0291a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/views/manage/_disabled_space.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
.space-text
%span.space-name
= Mconf::Highlighter.highlight(space.name, params[:q].try(:split))

%span.space-description
= Mconf::Highlighter.highlight(sanitize(space.description), params[:q].try(:split))

2 changes: 1 addition & 1 deletion app/views/manage/_enabled_space.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
= Mconf::Highlighter.highlight(space.name, params[:q].try(:split))

%span.space-description
= Mconf::Highlighter.highlight(sanitize(first_words(space.description, 100)), params[:q].try(:split))
= Mconf::Highlighter.highlight(sanitize(space.description), params[:q].try(:split))

- if current_site.require_space_approval? && !space.approved?
.resource-waiting-moderation-tooltip
Expand Down
2 changes: 1 addition & 1 deletion spec/features/manage/admin_manages_spaces_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
it { should have_content @enabled_space.name }
it { should have_content @enabled_space.description }
it { should have_content @disabled_space.name }
it { should_not have_content @disabled_space.description }
it { should have_content @disabled_space.description }

context 'elements for an approved space' do
let(:space) { @approved_space }
Expand Down

0 comments on commit cf0291a

Please sign in to comment.