From 5ac57305477ed90bf416b3c795516e9b9135bf5b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 17 Dec 2013 12:42:13 +0200 Subject: [PATCH] Sort project services by title. Add textarea support to it --- app/views/projects/services/_form.html.haml | 2 ++ app/views/projects/services/index.html.haml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 202bf32..e220d6a 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -33,6 +33,8 @@ .controls - if type == 'text' = f.text_field name, class: "input-xlarge", placeholder: placeholder + - elsif type == 'textarea' + = f.textarea name, rows: 5 - elsif type == 'checkbox' = f.check_box name diff --git a/app/views/projects/services/index.html.haml b/app/views/projects/services/index.html.haml index 190aa69..9543d97 100644 --- a/app/views/projects/services/index.html.haml +++ b/app/views/projects/services/index.html.haml @@ -3,7 +3,7 @@ %hr %ul.bordered-list - - @services.each do |service| + - @services.sort_by(&:title).each do |service| %li %h4 = link_to edit_project_service_path(@project, service.to_param) do -- libgit2 0.21.2