From cb3d7e9e9bec055403d9443c55347ec9dda1b7d5 Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 8 Oct 2010 19:07:47 -0400 Subject: [PATCH] changes --- .../default.scssc | Bin 16904 -> 19266 bytes app/views/artists/_form.html.erb | 47 +----- ...nks.html.erb => _secondary_links.html.erb} | 2 +- app/views/artists/edit.html.erb | 8 +- app/views/artists/index.html.erb | 62 +++---- app/views/artists/new.html.erb | 8 +- app/views/artists/show.html.erb | 158 +++++++++--------- app/views/sessions/new.html.erb | 76 +++++---- config/initializers/simple_form.rb | 52 ++++++ config/locales/simple_form.en.yml | 24 +++ lib/templates/erb/scaffold/_form.html.erb | 23 +++ public/stylesheets/compiled/default.css | 27 ++- public/stylesheets/src/default.scss | 42 ++++- script/custom/watch_stylesheets | 3 + 14 files changed, 335 insertions(+), 197 deletions(-) rename app/views/artists/{_secondary_nav_links.html.erb => _secondary_links.html.erb} (90%) create mode 100644 config/initializers/simple_form.rb create mode 100644 config/locales/simple_form.en.yml create mode 100644 lib/templates/erb/scaffold/_form.html.erb create mode 100755 script/custom/watch_stylesheets diff --git a/.sass-cache/b118d4c1b1aae4efe3003ca592302b34dd7f51b1/default.scssc b/.sass-cache/b118d4c1b1aae4efe3003ca592302b34dd7f51b1/default.scssc index 757869c647bf528c65a3185ebe3b8602d3852b98..5bb4eaff86bdef44c8dde61fc65778a63bec0e9d 100644 GIT binary patch literal 19266 zcmXrkGte_KRM2qFNh~g|RB%o#F3wD;)Z{X=FgGzzOEfpNOiME|vP`ltPcyVMHZ@5# zGB7tXPBSwzF-T2JNlD{k;mEg=3{EUAwz3K-N=>!03d+wf@ykz1<+9>)NY2R2NhwOr zi?+?Tl0{Y&mROXTn3R(WQpjz^<&c+{o9d~=pOcxF9iN<^lV8MU#pW7f#pRG%QBag` zB>~YJoLrPyP-11}3{t^m#qCg*m{Xc+V8!c@oS#>cT2W%flaiX2SejE}#qE$-Qc_f0 z&1uC^l$w&sV8xYQl$x5CSz^VRlvA3T$@t5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Vs5%nhuO z3Kei{f!&&!n+`S@78ju61{9L$nHjRe2%?3|1w$Yw!mL4xaz{r;v{DD;F;2`iJ5~xN z1r^p@oLHCNKqYIrxG+~efGmcG1IT8GIXK;dzJ>*s2FY|2N{I^g8)P=tN&&jO13grs z>wX}MH9(HX;vmpc3^y~dPSDB>e&~FBoZ# z5z-QX588tm7$uf5D9NGK{E*rf$6OzhRmk&pT##{B98+^(_ks&iNI3~^xPnarkJe(< z1)jA6Ys8V1K$SOWCJ>iygaObP2gMwsXomzB${ZCa8R$VbcEV?&6skc<6L}f|Ha`WK zXac1Zs0AhY1qkzzb%1<;m=ywh3aSOA!ckDblI-!A1D_cNH{OtwCp;~IrcS^Cjn|lz z%rdZ}z+>C6Bn~$NG-m-e0}^B?^ADgPgU>L4%>X6uywq|qTLHFu0m_3L37RATl^O~P z3JPeJDk#))ae>6aNdsLYXtW-uMzA&og`7;dE~F3z#Q}H_9i|=LfPuvUcvKuA3)X;K zfQ!*<#ad42G7H%8mx$);Tz2K@kKRdWGtQ54Bn;fJRrXA%PEV z+kngf8;z20L82I;hvXTsw_&4~P-`&MgNs9mNk}$;2OMER3=s!!09SwvA6kPnfQ<(S znF6@K0|_+5@EBrX1RUg(U>A zbCJ>{R5e<%K{6QRV9X&bxNS)8gcjVe$N@JMK@I|8s5P*(W(-SfFlRx1ftFn$K@RTU zfyawrQ2|nxmkJ#WvQmH+;2?W2%tNlxAPS)MnxO@xvVjOq9KM*3JDnq2@Xs2 zQ4@H`AUPhzfnagW%%K2YwGJ7>uu^~wTfqE_UJ!#EhvWoM6oJPU;C7=0H#~KNG=Z`< Nc&Hh4ssUtAGXV4L4;=si diff --git a/app/views/artists/_form.html.erb b/app/views/artists/_form.html.erb index 4d18a66e8..908d3f168 100644 --- a/app/views/artists/_form.html.erb +++ b/app/views/artists/_form.html.erb @@ -1,41 +1,8 @@ -<%= form_for(@artist) do |f| %> - <%= error_messages_for "artist" %> - - - - - - - - - - - - - - - - - - - - - - - - - -
<%= f.label :name %> - <%= f.text_field "name", :size => 30 %>
- <%= f.label :other_names %> - - <%= f.text_field "other_names", :size => 30 %> - Separate with commas -
<%= f.label :group_name %><%= f.text_field "group_name", :size => 30 %>
<%= f.label :url_string, "URLs" %><%= f.text_area "url_string", :size => "50x6", :class => "no-block" %>
<%= f.label :notes %> - <%= f.text_area "notes", :size => "50x10", :class => "no-block" %> - <%= link_to "Formatting help", wiki_page_path(:id => "help:dtext") %> -
- <%= submit_tag "Save" %> - <%= button_to_function "Cancel", "history.back()" %> -
+<%= simple_form_for(@artist) do |f| %> + <%= f.input :name %> + <%= f.input :other_names, :hint => "Separate with commas", :as => :text %> + <%= f.input :group_name %> + <%= f.input :url_string, :label => "URLs", :as => :text, :size => "10x5" %> + <%= f.input :notes, :as => :text %> + <%= f.button :submit %> <% end %> \ No newline at end of file diff --git a/app/views/artists/_secondary_nav_links.html.erb b/app/views/artists/_secondary_links.html.erb similarity index 90% rename from app/views/artists/_secondary_nav_links.html.erb rename to app/views/artists/_secondary_links.html.erb index 7ea4f645c..b32c31a7a 100644 --- a/app/views/artists/_secondary_nav_links.html.erb +++ b/app/views/artists/_secondary_links.html.erb @@ -1,4 +1,4 @@ -<% content_for(:secondary_nav_links) do %> +<% content_for(:secondary_links) do %>
  • <%= link_to "Listing", artists_path %>
  • <%= link_to "New", new_artist_path %>
  • diff --git a/app/views/artists/edit.html.erb b/app/views/artists/edit.html.erb index 851b02092..758ac5d86 100644 --- a/app/views/artists/edit.html.erb +++ b/app/views/artists/edit.html.erb @@ -1,3 +1,7 @@ -
    - <%= render :partial => "form" %> +
    +
    + <%= render :partial => "form" %> +
    + +<%= render :partial => "secondary_links" %> diff --git a/app/views/artists/index.html.erb b/app/views/artists/index.html.erb index 12fede550..07968e726 100644 --- a/app/views/artists/index.html.erb +++ b/app/views/artists/index.html.erb @@ -1,35 +1,37 @@ -
    - <%= render :partial => "search" %> +
    +
    + <%= render :partial => "search" %> - - - - - - - - - <% @artists.each do |artist| %> - <% content_tag(:tr, :id => "artist-#{artist.id}") do %> - - +
    Name
    - <%= link_to "P", posts_path(:tags => artist.name), :title => "Find posts for artist" %> - <%= link_to "E", edit_artist_path(artist), :title => "Edit artist" %> - <%= link_to "D", artist_path(artist, :method => :delete, :confirm => "Do you really want to delete this artist?") %> - - <%= link_to h(artist.name), artist_path(artist) %> - <% if !artist.group_name.blank? %> - [<%= link_to(artist.group_name, artist_path(artist)) %>] - <% end %> -
    + + + + + + + + <% @artists.each do |artist| %> + <% content_tag(:tr, :id => "artist-#{artist.id}") do %> + + + <% end %> <% end %> - <% end %> - -
    Name
    + <%= link_to "P", posts_path(:tags => artist.name), :title => "Find posts for artist" %> + <%= link_to "E", edit_artist_path(artist), :title => "Edit artist" %> + <%= link_to "D", artist_path(artist, :method => :delete, :confirm => "Do you really want to delete this artist?") %> + + <%= link_to h(artist.name), artist_path(artist) %> + <% if !artist.group_name.blank? %> + [<%= link_to(artist.group_name, artist_path(artist)) %>] + <% end %> +
    + + -
    - <%= will_paginate(@artists) %> +
    + <%= will_paginate(@artists) %> +
    + + <%= render :partial => "secondary_links" %>
    - - <%= render :partial => "secondary_nav_links" %>
    diff --git a/app/views/artists/new.html.erb b/app/views/artists/new.html.erb index c4cf99a16..2c27eb546 100644 --- a/app/views/artists/new.html.erb +++ b/app/views/artists/new.html.erb @@ -1,5 +1,7 @@ -
    - <%= render :partial => "form" %> +
    +
    + <%= render :partial => "form" %> +
    -<%= render :partial => "secondary_nav_links" %> +<%= render :partial => "secondary_links" %> diff --git a/app/views/artists/show.html.erb b/app/views/artists/show.html.erb index 4a1cafd02..a7d021c4e 100644 --- a/app/views/artists/show.html.erb +++ b/app/views/artists/show.html.erb @@ -1,90 +1,84 @@ -
    -

    Artist: <%= @artist.name.tr("_", " ") %>

    - - <% unless @artist.notes.blank? %> +
    +
    +

    Artist: <%= @artist.name.tr("_", " ") %>

    + + <% unless @artist.notes.blank? %> +
    + <%= format_text(@artist.notes) %> +
    + <% end %> +
    - <%= format_text(@artist.notes) %> -
    - <% end %> - -
    - - - - - - - <% if @artist.has_tag_alias? %> +
    Status - <% if @artist.is_banned? %> - Banned - <% elsif @artist.is_active? %> - Active - <% else %> - Inactive - <% end %> -
    + - - - - <% end %> - <% if !@artist.other_names.blank? %> - - - - - <% end %> - <% if !@artist.group_name.blank? %> - - - - - <% end %> - <% if @artist.members.any? %> - - - - - <% end %> - <% @artist.urls.each do |url| %> - - - + - <% end %> - -
    Tag Alias - <%= @artist.tag_alias_name %> -
    Other Names - <%= link_to_artists(@artist.other_names.split(/,/)) %> -
    Group - <%= link_to_artist(@artist.group_name) %> -
    Members - <%= link_to_artists(@artist.members.map(&:name)) %> -
    URLs - <%= link_to h(url.to_s), h(url.to_s) %> - <% if CurrentUser.user.is_moderator? %> - (<%= link_to("mass edit", mass_edit_admin_posts_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>) + Status + <% if @artist.is_banned? %> + Banned + <% elsif @artist.is_active? %> + Active + <% else %> + Inactive <% end %>
    -
    - -

    * Indicates new artist

    - -
    -

    Recent Posts

    -
    - <%#= @post_set.presenter.post_previews_html %> + <% if @artist.has_tag_alias? %> + + Tag Alias + + <%= @artist.tag_alias_name %> + + + <% end %> + <% if !@artist.other_names.blank? %> + + Other Names + + <%= link_to_artists(@artist.other_names.split(/,/)) %> + + + <% end %> + <% if !@artist.group_name.blank? %> + + Group + + <%= link_to_artist(@artist.group_name) %> + + + <% end %> + <% if @artist.members.any? %> + + Members + + <%= link_to_artists(@artist.members.map(&:name)) %> + + + <% end %> + <% @artist.urls.each do |url| %> + + URLs + + <%= link_to h(url.to_s), h(url.to_s) %> + <% if CurrentUser.user.is_moderator? %> + (<%= link_to("mass edit", mass_edit_admin_posts_path(:antecedent => "-#{@artist.name} source:#{ArtistUrl.normalize_for_search(url.to_s)}", :consequent => @artist.name)) %>) + <% end %> + + + <% end %> + +
    + +

    * Indicates new artist

    + +
    +

    Recent Posts

    +
    + <%#= @post_set.presenter.post_previews_html %> +
    +
    + + <%= render :partial => "secondary_links" %>
    - - <% content_for("footer") do %> -
  • |
  • -
  • <%= link_to "Posts", posts_path(:tags => @artist.name) %>
  • -
  • <%= link_to "Edit", edit_artist_path(@artist) %>
  • -
  • <%= link_to "Delete", artist_path(@artist, :method => :delete) %>
  • -
  • <%= link_to "History", artist_versions_path(:artist_id => @artist.id) %>
  • - <% end %> - - <%= render :partial => "secondary_nav_links" %>
    diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 62a03644a..02ba7ddfe 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -1,41 +1,43 @@ -
    -
    -

    Login

    - <% form_tag(sessions_path) do %> - - - - - - - - - - - - - - - - - -
    <%= submit_tag "Login" %>
    - <%= label_tag :name %> - - <%= text_field_tag :name %> -
    <%= label_tag :password %><%= password_field_tag :password %>
    - <% end %> -
    +
    +
    +
    +

    Login

    + <% form_tag(sessions_path) do %> + + + + + + + + + + + + + + + + + +
    <%= submit_tag "Login" %>
    + <%= label_tag :name %> + + <%= text_field_tag :name %> +
    <%= label_tag :password %><%= password_field_tag :password %>
    + <% end %> +
    - + +
    <% content_for(:page_title) do %> diff --git a/config/initializers/simple_form.rb b/config/initializers/simple_form.rb new file mode 100644 index 000000000..040e7e3f1 --- /dev/null +++ b/config/initializers/simple_form.rb @@ -0,0 +1,52 @@ +# Use this setup block to configure all options available in SimpleForm. +SimpleForm.setup do |config| + + # Components used by the form builder to generate a complete input. You can remove + # any of them, change the order, or even add your own components to the stack. + # config.components = [ :label_input, :hint, :error ] + + # Default tag used on hints. + # config.hint_tag = :span + + # Default tag used on errors. + # config.error_tag = :span + + # Method used to tidy up errors. + # config.error_method = :first + + # Default tag used for error notification helper. + # config.error_notification_tag = :p + + # You can wrap all inputs in a pre-defined tag. + # config.wrapper_tag = :div + + # CSS class to add to all wrapper tags. + # config.wrapper_class = :input + + # CSS class to add to the wrapper if the field has errors. + # config.wrapper_error_class = :field_with_errors + + # How the label text should be generated altogether with the required text. + # config.label_text = lambda { |label, required| "#{required} #{label}" } + + # Whether attributes are required by default (or not). Default is true. + # config.required_by_default = true + + # Series of attemps to detect a default label method for collection. + # config.collection_label_methods = [ :to_label, :name, :title, :to_s ] + + # Series of attemps to detect a default value method for collection. + # config.collection_value_methods = [ :id, :to_s ] + + # Collection of methods to detect if a file type was given. + # config.file_methods = [ :file?, :public_filename ] + + # Default priority for time_zone inputs. + # config.time_zone_priority = nil + + # Default priority for country inputs. + # config.country_priority = nil + + # Default size for text inputs. + config.default_input_size = 30 +end diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml new file mode 100644 index 000000000..409e2651d --- /dev/null +++ b/config/locales/simple_form.en.yml @@ -0,0 +1,24 @@ +en: + simple_form: + "yes": 'Yes' + "no": 'No' + required: + text: 'required' + mark: '*' + # You can uncomment the line below if you need to overwrite the whole required html. + # When using html, text and mark won't be used. + # html: '*' + error_notification: + default_message: "Some errors were found, please take a look:" + # Labels and hints examples + # labels: + # password: 'Password' + # user: + # new: + # email: 'E-mail para efetuar o sign in.' + # edit: + # email: 'E-mail.' + # hints: + # username: 'User name to sign in.' + # password: 'No special characters, please.' + diff --git a/lib/templates/erb/scaffold/_form.html.erb b/lib/templates/erb/scaffold/_form.html.erb new file mode 100644 index 000000000..62de5dff8 --- /dev/null +++ b/lib/templates/erb/scaffold/_form.html.erb @@ -0,0 +1,23 @@ +<%%= simple_form_for(@<%= singular_name %>) do |f| %> + <%% if @<%= singular_name %>.errors.any? %> +
    +

    <%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:

    + +
      + <%% @<%= singular_name %>.errors.full_messages.each do |msg| %> +
    • <%%= msg %>
    • + <%% end %> +
    +
    + <%% end %> + +
    + <%- attributes.each do |attribute| -%> + <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> + <%- end -%> +
    + +
    + <%%= f.button :submit %> +
    +<%% end %> diff --git a/public/stylesheets/compiled/default.css b/public/stylesheets/compiled/default.css index 10389ab8e..adf90659e 100644 --- a/public/stylesheets/compiled/default.css +++ b/public/stylesheets/compiled/default.css @@ -85,7 +85,7 @@ img { border: none; vertical-align: middle; } -input[type=text], input[type=password], textarea, button { +input[type=text], input[type=password], input[type=url], textarea, button { border: 1px solid #AAA; font-size: 1em; -moz-border-radius: 4px; @@ -100,6 +100,9 @@ input[type=submit] { font-size: 1em; cursor: pointer; } +input:focus, textarea:focus { + background-color: #FFD; } + input[type=submit]:hover { background-color: #F6F6F6; } @@ -154,6 +157,28 @@ aside.sidebar > section > ul li { aside.sidebar > section > ul ul li { margin-left: 1em; } +/*** Simple Form ***/ +form.simple_form input[type=submit] { + margin-left: 10em; } +form.simple_form div.input { + margin-bottom: 0.5em; } + form.simple_form div.input input, form.simple_form div.input textarea { + width: 300px; } + form.simple_form div.input textarea { + height: 100px; } + form.simple_form div.input label { + vertical-align: top; + display: inline-block; + width: 10em; + cursor: pointer; + font-weight: bold; } + form.simple_form div.input span.hint { + margin-left: 10em; + color: #666; + font-style: italic; + vertical-align: top; + display: block; } + /*** Comments ***/ div.comment-response > div { margin-top: 1em; } diff --git a/public/stylesheets/src/default.scss b/public/stylesheets/src/default.scss index 0a28fcd65..6ab838948 100644 --- a/public/stylesheets/src/default.scss +++ b/public/stylesheets/src/default.scss @@ -110,7 +110,7 @@ img { vertical-align: middle; } -input[type=text], input[type=password], textarea, button { +input[type=text], input[type=password], input[type=url], textarea, button { border: 1px solid #AAA; font-size: 1em; -moz-border-radius: 4px; @@ -127,6 +127,10 @@ input[type=submit] { cursor: pointer; } +input:focus, textarea:focus { + background-color: #FFD; +} + input[type=submit]:hover { background-color: #F6F6F6; } @@ -203,6 +207,42 @@ aside.sidebar > section > ul ul li { } +/*** Simple Form ***/ +form.simple_form { + input[type=submit] { + margin-left: 10em; + } + + div.input { + margin-bottom: 0.5em; + + input, textarea { + width: 300px; + } + + textarea { + height: 100px; + } + + label { + vertical-align: top; + display: inline-block; + width: 10em; + cursor: pointer; + font-weight: bold; + } + + span.hint { + margin-left: 10em; + color: #666; + font-style: italic; + vertical-align: top; + display: block; + } + } +} + + /*** Comments ***/ div.comment-response { } diff --git a/script/custom/watch_stylesheets b/script/custom/watch_stylesheets new file mode 100755 index 000000000..26eac9ea7 --- /dev/null +++ b/script/custom/watch_stylesheets @@ -0,0 +1,3 @@ +#!/bin/sh + +sass --watch public/stylesheets/src/default.scss:public/stylesheets/compiled/default.css