From 3041a646e291153206351a5a914906757c4f112e Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Mon, 18 Nov 2013 13:04:12 +0100 Subject: [PATCH] Update asciicast edit page to new layout --- app/views/asciicasts/_form.html.erb | 50 ----------------------------- app/views/asciicasts/edit.html.erb | 1 - app/views/asciicasts/edit.html.slim | 19 +++++++++++ 3 files changed, 19 insertions(+), 51 deletions(-) delete mode 100644 app/views/asciicasts/_form.html.erb delete mode 100644 app/views/asciicasts/edit.html.erb create mode 100644 app/views/asciicasts/edit.html.slim diff --git a/app/views/asciicasts/_form.html.erb b/app/views/asciicasts/_form.html.erb deleted file mode 100644 index 79b9c1e..0000000 --- a/app/views/asciicasts/_form.html.erb +++ /dev/null @@ -1,50 +0,0 @@ -
-
- - <%= form_for @asciicast, :html => { :class => 'form-horizontal' } do |f| %> -
- <%= controller.action_name.capitalize %> asciicast - -
- <%= f.label :title, :class => 'control-label' %> -
- <%= f.text_field :title, :class => 'text_field span6' %> -
-
- -
- <%= f.label :description, :class => 'control-label' %> -
- <%= f.text_area :description, :class => 'text_area span6', :rows => 15 %> -
-
- Parsed with GitHub Flavored Markdown -
-
- -
- <%= f.label :time_compression, :class => 'control-label' %> -
- - - -
-
- -
- <%= f.submit 'Update asciicast', :class => 'btn btn-primary' %> - <%= link_to 'Cancel', asciicast_path, :class => 'btn' %> -
-
- <% end %> - -
-
diff --git a/app/views/asciicasts/edit.html.erb b/app/views/asciicasts/edit.html.erb deleted file mode 100644 index 786950e..0000000 --- a/app/views/asciicasts/edit.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= render :partial => 'form' %> diff --git a/app/views/asciicasts/edit.html.slim b/app/views/asciicasts/edit.html.slim new file mode 100644 index 0000000..8f2a2d0 --- /dev/null +++ b/app/views/asciicasts/edit.html.slim @@ -0,0 +1,19 @@ +.container + = form_for @asciicast, html: { class: 'form-horizontal' } do |f| + legend Asciicast properties + + .form-group + = f.label :title, class: 'col-sm-2 control-label' + .col-sm-10 = f.text_field :title, class: 'form-control' + .form-group + = f.label :description, class: 'col-sm-2 control-label' + .col-sm-10 + = f.text_area :description, class: 'form-control', rows: 15 + p.help-block + | Parsed with + a[href="http://github.github.com/github-flavored-markdown/" target="_blank"] + | GitHub Flavored Markdown + .form-group + .col-sm-offset-2.col-sm-10 + = f.submit 'Update asciicast', class: 'btn btn-primary' + = link_to 'Cancel', asciicast_path, class: 'btn'