diff --git a/Gemfile b/Gemfile index 6ef2a48018a03c845112c009588d3a8b0855b839..ef0adb5e2bea87b2f95feb86a5edb791dcd29f63 100644 --- a/Gemfile +++ b/Gemfile @@ -13,6 +13,9 @@ gem "rails", "~> 4.1.0" gem "protected_attributes" gem 'rails-observers' +# Make links from text +gem 'rails_autolink', '~> 1.1' + # Default values for AR models gem "default_value_for", "~> 3.0.0" diff --git a/Gemfile.lock b/Gemfile.lock index 133fc693f0802a5207a58cee9c18d88aa774e48b..3bea962f6ac0f08aca2cca7142d2d64fb37d01b6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -367,6 +367,8 @@ GEM sprockets-rails (~> 2.0) rails-observers (0.1.2) activemodel (~> 4.0) + rails_autolink (1.1.6) + rails (> 3.1) rails_best_practices (1.14.4) activesupport awesome_print @@ -641,6 +643,7 @@ DEPENDENCIES rack-mini-profiler rails (~> 4.1.0) rails-observers + rails_autolink (~> 1.1) rails_best_practices raphael-rails (~> 2.1.2) rb-fsevent diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 17475288a874c877d46076e2fb4e8b2972606999..06183dd74a91550cc464633987fe662f7c2bff95 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -5,7 +5,7 @@ = link_to dashboard_path, class: 'btn btn-tiny' do ← To dashboard - %span.cgray + %span.cgray Currently you are only seeing events from the = @group.name group @@ -23,7 +23,8 @@ %h3.page-title = @group.name - if @group.description.present? - %p= @group.description + %p + = auto_link @group.description, link: :urls = render "projects", projects: @projects - if current_user .prepend-top-20 diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index b24fd5a8514a5a5e450efd0f4a55c663fb918c0d..3851fd6c15b84d88c4f42c99d2553a5843a309b4 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -17,7 +17,7 @@ .col-md-8 .project-home-desc - if @project.description.present? - = @project.description + = auto_link @project.description, link: :urls - if can?(current_user, :admin_project, @project) – %strong= link_to 'Edit', edit_project_path