Commit a5cbb4cb82a6911b5c1de117ae6ed4cbf667a679
Exists in
spb-stable
and in
2 other branches
Merge branch 'autolink-in-project-description' into 'master'
Autolink in project/group description Group:  Project:  - - - Fixes http://feedback.gitlab.com/forums/176466-general/suggestions/4110570-group-description-should-support-markdown
Showing
4 changed files
with
10 additions
and
3 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -367,6 +367,8 @@ GEM |
367 | 367 | sprockets-rails (~> 2.0) |
368 | 368 | rails-observers (0.1.2) |
369 | 369 | activemodel (~> 4.0) |
370 | + rails_autolink (1.1.6) | |
371 | + rails (> 3.1) | |
370 | 372 | rails_best_practices (1.14.4) |
371 | 373 | activesupport |
372 | 374 | awesome_print |
... | ... | @@ -641,6 +643,7 @@ DEPENDENCIES |
641 | 643 | rack-mini-profiler |
642 | 644 | rails (~> 4.1.0) |
643 | 645 | rails-observers |
646 | + rails_autolink (~> 1.1) | |
644 | 647 | rails_best_practices |
645 | 648 | raphael-rails (~> 2.1.2) |
646 | 649 | rb-fsevent | ... | ... |
app/views/groups/show.html.haml
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | = link_to dashboard_path, class: 'btn btn-tiny' do |
6 | 6 | ← To dashboard |
7 | 7 | |
8 | - %span.cgray | |
8 | + %span.cgray | |
9 | 9 | Currently you are only seeing events from the |
10 | 10 | = @group.name |
11 | 11 | group |
... | ... | @@ -23,7 +23,8 @@ |
23 | 23 | %h3.page-title |
24 | 24 | = @group.name |
25 | 25 | - if @group.description.present? |
26 | - %p= @group.description | |
26 | + %p | |
27 | + = auto_link @group.description, link: :urls | |
27 | 28 | = render "projects", projects: @projects |
28 | 29 | - if current_user |
29 | 30 | .prepend-top-20 | ... | ... |
app/views/projects/_home_panel.html.haml
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | .col-md-8 |
18 | 18 | .project-home-desc |
19 | 19 | - if @project.description.present? |
20 | - = @project.description | |
20 | + = auto_link @project.description, link: :urls | |
21 | 21 | - if can?(current_user, :admin_project, @project) |
22 | 22 | – |
23 | 23 | %strong= link_to 'Edit', edit_project_path | ... | ... |