From 2549d643f39be707c538fe89466935ae50e0a8c3 Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 10 Mar 2011 19:07:45 -0500 Subject: [PATCH] alternative form style --- app/views/posts/partials/show/_edit.html.erb | 108 +++++++++---------- app/views/uploads/new.html.erb | 4 +- app/views/wiki_pages/_form.html.erb | 4 +- public/stylesheets/src/default.scss | 79 +++----------- 4 files changed, 73 insertions(+), 122 deletions(-) diff --git a/app/views/posts/partials/show/_edit.html.erb b/app/views/posts/partials/show/_edit.html.erb index 4bdb3e7d0..30904d25a 100644 --- a/app/views/posts/partials/show/_edit.html.erb +++ b/app/views/posts/partials/show/_edit.html.erb @@ -1,63 +1,61 @@ -
- <% unless CurrentUser.user.is_contributor? %> -
-

Before editing, read the <%= link_to "how to tag guide", wiki_page_path(:id => "howto:tag") %>.

-
- <% end %> +<% unless CurrentUser.user.is_contributor? %> +
+

Before editing, read the <%= link_to "how to tag guide", wiki_page_path(:id => "howto:tag") %>.

+
+<% end %> - <%= form_for(post, :html => {:class => "simple_form"}) do |f| %> - <%= f.hidden_field :old_tags, :value => post.tag_string %> +<%= form_for(post, :html => {:class => "simple_form"}) do |f| %> + <%= f.hidden_field :old_tags, :value => post.tag_string %> -
- <% if post.is_rating_locked? %> - This post is rating locked. - <% else %> - <%= f.label :blank, "Rating" %> - -
- <%= f.radio_button :rating, :e %> - <%= f.label :rating_e, "Explicit" %> - - <%= f.radio_button :rating, :q %> - <%= f.label :rating_q, "Questionable" %> - - <%= f.radio_button :rating, :s %> - <%= f.label :rating_s, "Safe" %> -
- <% end %> -
+
+ <% if post.is_rating_locked? %> + This post is rating locked. + <% else %> + <%= f.label :blank, "Rating" %> - <% if CurrentUser.user.is_privileged? %> -
- <%= f.label :blank, "Lock" %> - -
- <%= f.check_box :is_note_locked %> - <%= f.label :is_note_locked, "Notes" %> +
+ <%= f.radio_button :rating, :e %> + <%= f.label :rating_e, "Explicit" %> - <%= f.check_box :is_rating_locked %> - <%= f.label :is_rating_locked, "Rating" %> -
-
+ <%= f.radio_button :rating, :q %> + <%= f.label :rating_q, "Questionable" %> + + <%= f.radio_button :rating, :s %> + <%= f.label :rating_s, "Safe" %> + <% end %> - +
+ + <% if CurrentUser.user.is_privileged? %>
- <%= f.label :parent_id, "Parent" %> - <%= f.text_field :parent_id, :size => 5 %> -
- -
- <%= f.label :source %> - <%= f.text_field :source %> -
- -
- <%= f.label :tag_string, "Tags" %> - <%= f.text_area :tag_string , :size => "50x3" %> -
- -
- <%= submit_tag "Submit" %> + <%= f.label :blank, "Lock" %> + +
+ <%= f.check_box :is_note_locked %> + <%= f.label :is_note_locked, "Notes" %> + + <%= f.check_box :is_rating_locked %> + <%= f.label :is_rating_locked, "Rating" %> +
<% end %> -
\ No newline at end of file + +
+ <%= f.label :parent_id, "Parent" %> + <%= f.text_field :parent_id, :size => 5 %> +
+ +
+ <%= f.label :source %> + <%= f.text_field :source %> +
+ +
+ <%= f.label :tag_string, "Tags" %> + <%= f.text_area :tag_string , :size => "50x3" %> +
+ +
+ <%= submit_tag "Submit" %> +
+<% end %> diff --git a/app/views/uploads/new.html.erb b/app/views/uploads/new.html.erb index 8884bf792..f073622e6 100644 --- a/app/views/uploads/new.html.erb +++ b/app/views/uploads/new.html.erb @@ -1,5 +1,5 @@ -
-
+
+

Before uploading, please read the <%= link_to "how to upload guide", wiki_pages_path(:title => "howto:upload") %>.

diff --git a/app/views/wiki_pages/_form.html.erb b/app/views/wiki_pages/_form.html.erb index 975c6f482..e9d61982d 100644 --- a/app/views/wiki_pages/_form.html.erb +++ b/app/views/wiki_pages/_form.html.erb @@ -5,6 +5,4 @@ <% if CurrentUser.is_janitor? %> <%= f.input :is_locked %> <% end %> -
- <%= f.button :submit, "Save" %><%= f.button :submit, "Cancel" %><%= f.button :submit, "Preview" %> -
+<%= f.button :submit, "Save" %><%= f.button :submit, "Cancel" %><%= f.button :submit, "Preview" %> diff --git a/public/stylesheets/src/default.scss b/public/stylesheets/src/default.scss index 72a487dc3..0033c8d99 100644 --- a/public/stylesheets/src/default.scss +++ b/public/stylesheets/src/default.scss @@ -266,30 +266,10 @@ body > header > h1 { /*** Simple Form ***/ form.simple_form { - input[type=submit] { - margin-left: 10.3em; - } - - div.input.boolean { - padding-left: 10em; - - label { - margin: 0; - text-align: left; - display: inline; - width: none; - } - } - - div#multiple-buttons { - margin-left: 10em; - input { - margin: 0 0.5em 0 0; - } - } + margin: 1em 0; div.input { - margin-bottom: 0.5em; + margin-bottom: 1em; input[type=text], input[type=file], textarea { width: 300px; @@ -300,21 +280,14 @@ form.simple_form { } label { - vertical-align: top; - display: inline-block; - width: 10em; + display: block; cursor: pointer; font-weight: bold; - margin-top: 3px; - margin-right: 10px; - text-align: right; } span.hint { - margin-left: 11em; color: #666; font-style: italic; - vertical-align: top; display: block; } @@ -569,6 +542,14 @@ div#c-posts { color: black; } } + + section#edit { + fieldset { + label { + display: inline; + } + } + } } } @@ -715,42 +696,16 @@ div.users { } /*** Uploads ***/ -div.uploads { - div.new { +div#c-uploads { + div#a-new { div#upload-guide-notice { margin-bottom: 2em; } - } -} - -/*** notify ***/ -.notify-container { - position: fixed; - top: 0; - left: 0; - width: 100%; - z-index: 1000; - - .notify-notification { - position: relative; - - .notify-background { - position: absolute; - top: 0; - left: 0; - width: 100%; - background-color: #333; - z-index: 1; - } - - .notify-message { - position: relative; - z-index: 2; - padding: 20px; - text-align: center; - color: #FFF; + fieldset.ratings { + label { + display: inline; + } } } } -