Commit 5ac57305477ed90bf416b3c795516e9b9135bf5b
1 parent
b90cbfd2
Exists in
master
and in
4 other branches
Sort project services by title. Add textarea support to it
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
app/views/projects/services/_form.html.haml
| @@ -33,6 +33,8 @@ | @@ -33,6 +33,8 @@ | ||
| 33 | .controls | 33 | .controls |
| 34 | - if type == 'text' | 34 | - if type == 'text' |
| 35 | = f.text_field name, class: "input-xlarge", placeholder: placeholder | 35 | = f.text_field name, class: "input-xlarge", placeholder: placeholder |
| 36 | + - elsif type == 'textarea' | ||
| 37 | + = f.textarea name, rows: 5 | ||
| 36 | - elsif type == 'checkbox' | 38 | - elsif type == 'checkbox' |
| 37 | = f.check_box name | 39 | = f.check_box name |
| 38 | 40 |
app/views/projects/services/index.html.haml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | %hr | 3 | %hr |
| 4 | 4 | ||
| 5 | %ul.bordered-list | 5 | %ul.bordered-list |
| 6 | - - @services.each do |service| | 6 | + - @services.sort_by(&:title).each do |service| |
| 7 | %li | 7 | %li |
| 8 | %h4 | 8 | %h4 |
| 9 | = link_to edit_project_service_path(@project, service.to_param) do | 9 | = link_to edit_project_service_path(@project, service.to_param) do |