diff options
| author | hukl <contact@smyck.org> | 2009-09-03 20:06:12 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-03 20:06:12 +0200 |
| commit | d749383308a19b7c284ef199f715a2713bd5b7ca (patch) | |
| tree | 6ab0288094032bf08cb4cbef1e92c22c3c4c39ad | |
| parent | f32413bff3725cea32a30e93dd1253eb8d25cb45 (diff) | |
visual clean up: it all starts with the login screen. this will be so minimal!
| -rw-r--r-- | app/controllers/sessions_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/sessions/new.html.erb | 35 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 17 |
3 files changed, 39 insertions, 15 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 779e260..813344b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb | |||
| @@ -35,7 +35,7 @@ class SessionsController < ApplicationController | |||
| 35 | protected | 35 | protected |
| 36 | # Track failed login attempts | 36 | # Track failed login attempts |
| 37 | def note_failed_signin | 37 | def note_failed_signin |
| 38 | flash[:error] = "Couldn't log you in as '#{params[:login]}'" | 38 | flash[:error] = "login not successful" |
| 39 | logger.warn "Failed login for '#{params[:login]}'" \ | 39 | logger.warn "Failed login for '#{params[:login]}'" \ |
| 40 | "from #{request.remote_ip} at #{Time.now.utc}" | 40 | "from #{request.remote_ip} at #{Time.now.utc}" |
| 41 | end | 41 | end |
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 3a27464..fef0912 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb | |||
| @@ -1,11 +1,24 @@ | |||
| 1 | <h1>Log In</h1> | 1 | <div id="login_form"> |
| 2 | 2 | <% form_tag session_path do -%> | |
| 3 | <% form_tag session_path do -%> | 3 | <table> |
| 4 | <p><%= label_tag 'login' %><br /> | 4 | <tr> |
| 5 | <%= text_field_tag 'login', @login %></p> | 5 | <td></td> |
| 6 | 6 | <td> | |
| 7 | <p><%= label_tag 'password' %><br/> | 7 | <%= flash[:error] %> |
| 8 | <%= password_field_tag 'password', nil %></p> | 8 | </td> |
| 9 | 9 | </tr> | |
| 10 | <p><%= submit_tag 'Log in' %></p> | 10 | <tr> |
| 11 | <% end -%> | 11 | <td class="description">Login</td> |
| 12 | <td><%= text_field_tag 'login', @login %></td> | ||
| 13 | </tr> | ||
| 14 | <tr> | ||
| 15 | <td class="description">Password</td> | ||
| 16 | <td><%= password_field_tag 'password', nil %></td> | ||
| 17 | </tr> | ||
| 18 | <tr> | ||
| 19 | <td></td> | ||
| 20 | <td class="right"><%= submit_tag 'log in' %></td> | ||
| 21 | </tr> | ||
| 22 | </table> | ||
| 23 | <% end -%> | ||
| 24 | </div> \ No newline at end of file | ||
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index d68d69f..2caffd3 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -83,7 +83,7 @@ div.pagination span.current, div.pagination a:hover { | |||
| 83 | background-color: #000000; | 83 | background-color: #000000; |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | #main_navigation a, #sub_navigation a, #metadata a { | 86 | #main_navigation a, #sub_navigation a, #metadata a, input[type=submit]{ |
| 87 | letter-spacing: 1px; | 87 | letter-spacing: 1px; |
| 88 | padding-left: 5px; | 88 | padding-left: 5px; |
| 89 | padding-right: 5px; | 89 | padding-right: 5px; |
| @@ -229,15 +229,26 @@ input[type=password] { | |||
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | input[type=submit] { | 231 | input[type=submit] { |
| 232 | min-width: 65px; | 232 | border: none; |
| 233 | border: 1px solid #989898; | 233 | padding-top: 0px; |
| 234 | padding-bottom: 1px; | ||
| 234 | background-color: #ffffff; | 235 | background-color: #ffffff; |
| 235 | } | 236 | } |
| 236 | 237 | ||
| 238 | input[type=submit]:hover { | ||
| 239 | border: none; | ||
| 240 | color: #ffffff; | ||
| 241 | background-color: #ff9600; | ||
| 242 | } | ||
| 243 | |||
| 237 | input[type=radio] { | 244 | input[type=radio] { |
| 238 | border: 1px solid #989898; | 245 | border: 1px solid #989898; |
| 239 | } | 246 | } |
| 240 | 247 | ||
| 248 | div#login_form input[type=text], div#login_form input[type=password] { | ||
| 249 | width: 150px; | ||
| 250 | } | ||
| 251 | |||
| 241 | textarea#page_abstract { | 252 | textarea#page_abstract { |
| 242 | width: 690px; | 253 | width: 690px; |
| 243 | height: 150px; | 254 | height: 150px; |
