diff --git a/Gemfile b/Gemfile
index 9a6fa1190..68de76b3d 100644
--- a/Gemfile
+++ b/Gemfile
@@ -29,14 +29,19 @@ gem 'pg'
# group :development, :test do
# gem 'webrat'
# end
-gem "rspec-rails", ">= 2.0.1", :group => [:development, :test]
-gem 'factory_girl_rails', :group => [:development, :test]
+
+group :development, :test do
+ gem "rspec-rails", ">= 2.0.1"
+ gem 'factory_girl_rails'
+ gem 'web-app-theme', '>= 0.6.2'
+ gem 'hpricot'
+ gem 'ruby_parser'
+end
gem "devise"
gem "haml", ">= 3.0.0"
gem "haml-rails"
gem "compass", ">= 0.10.6"
-gem "html5-boilerplate"
gem "capistrano"
gem "capistrano-ext"
gem "will_paginate", "~> 3.0.pre2"
diff --git a/Gemfile.lock b/Gemfile.lock
index 1434abf45..b80e4cb30 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -65,6 +65,7 @@ GEM
hoptoad_notifier (2.4.6)
activesupport
builder
+ hpricot (0.8.4)
html5-boilerplate (0.3.2)
compass (>= 0.10.0)
i18n (0.5.0)
@@ -119,7 +120,10 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.5.0)
+ ruby_parser (2.0.6)
+ sexp_processor (~> 3.0)
russian (0.2.7)
+ sexp_processor (3.0.5)
thor (0.14.6)
treetop (1.4.9)
polyglot (>= 0.3.1)
@@ -129,6 +133,7 @@ GEM
rack
warden (1.0.3)
rack (>= 1.0.0)
+ web-app-theme (0.6.3)
will_paginate (3.0.pre2)
yui-compressor (0.9.5)
@@ -145,11 +150,14 @@ DEPENDENCIES
haml (>= 3.0.0)
haml-rails
hoptoad_notifier (~> 2.3)
+ hpricot
html5-boilerplate
jammit
pg
rails (= 3.0.5)
rspec-rails (>= 2.0.1)
+ ruby_parser
russian
unicorn
+ web-app-theme (>= 0.6.2)
will_paginate (~> 3.0.pre2)
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index e8065d950..067db12ee 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -1,3 +1,13 @@
class ApplicationController < ActionController::Base
protect_from_forgery
+ layout :layout_by_resource
+
+ protected
+ def layout_by_resource
+ if devise_controller?
+ "sessions"
+ else
+ "application"
+ end
+ end
end
diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb
index dab61bb92..4fb233af5 100644
--- a/app/controllers/users_controller.rb
+++ b/app/controllers/users_controller.rb
@@ -1,18 +1,22 @@
class UsersController < ApplicationController
+ before_filter :find_user, :only => [:show, :edit, :update, :destroy]
+
def index
@users = User.all
end
+ def show
+ end
+
def new
@user = User.new
end
def edit
- @user = User.find params[:id]
end
def destroy
- User.destroy params[:id]
+ @user.destroy
redirect_to users_path
end
@@ -28,7 +32,6 @@ class UsersController < ApplicationController
end
def update
- @user = User.find params[:id]
if @user.update_attributes(params[:user])
flash[:notice] = t('flash.user.saved')
redirect_to users_path
@@ -37,4 +40,9 @@ class UsersController < ApplicationController
render :action => :edit
end
end
+
+ protected
+ def find_user
+ @user = User.find(params[:id])
+ end
end
diff --git a/app/stylesheets/handheld.scss b/app/stylesheets/handheld.scss
deleted file mode 100644
index b5782a455..000000000
--- a/app/stylesheets/handheld.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-* {
- float: none; // Screens are not big enough to account for floats
- background: #fff; // As much contrast as possible */
- color: #000;
-}
-
-// Slightly reducing font size to reduce need to scroll
-body { font-size: 80%; }
diff --git a/app/stylesheets/partials/_base.scss b/app/stylesheets/partials/_base.scss
deleted file mode 100644
index a77a5daf9..000000000
--- a/app/stylesheets/partials/_base.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-// This file must be imported before loading html5-boilerplate
-
-$base-font-family: unquote('sans-serif'); // default font-family
-
-$base-font-size: 13px; // default font-size for YUI fonts
-
-$base-line-height: 1.231; // default line-height for YUI fonts
-
-$font-color: #444;
-
-$link-color: #607890;
-
-$link-hover-color: #036;
-
-$link-active-color: #607890;
-
-$link-visited-color: #607890;
-
-$selected-font-color: #fff; // color for selected text
-
-$selected-background-color: #ff5E99; // bg-color for selected text
-
-$list-left-margin: 2em; // left margin for ul an ol
\ No newline at end of file
diff --git a/app/stylesheets/partials/_fonts.scss b/app/stylesheets/partials/_fonts.scss
deleted file mode 100644
index 37a6e1891..000000000
--- a/app/stylesheets/partials/_fonts.scss
+++ /dev/null
@@ -1,4 +0,0 @@
-// font-face fonts
-// see http://compass-style.org/docs/reference/compass/css3/font_face/
-
-//@import "compass/css3/font-face"
diff --git a/app/stylesheets/partials/_media.scss b/app/stylesheets/partials/_media.scss
deleted file mode 100644
index a3b2d4a94..000000000
--- a/app/stylesheets/partials/_media.scss
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// These are in their own partial because you probably
-// want to customize on a per-site basis
-//
-
-@media print {
- @include media-print;
-}
-
-@media all and (orientation:portrait) {
- // Style adjustments for portrait mode goes here
-}
-
-@media all and (orientation:landscape) {
- // Style adjustments for landscape mode goes here
-}
-
-@media screen and (max-device-width: 480px) {
- // Pass in false if you don't want iOS and WinMobile to mobile-optimize the text for you
- @include media-mobile(true);
-}
\ No newline at end of file
diff --git a/app/stylesheets/partials/_overrides.scss b/app/stylesheets/partials/_overrides.scss
deleted file mode 100644
index 224759ebc..000000000
--- a/app/stylesheets/partials/_overrides.scss
+++ /dev/null
@@ -1,59 +0,0 @@
-//--------------------------------
-// CSS Reset
-//--------------------------------
-@include html5-boilerplate-reset;
-
-
-//--------------------------------
-// Base Fonts
-//--------------------------------
-@include html5-boilerplate-fonts($base-font-family, $base-font-size, $base-line-height);
-
-
-//--------------------------------
-// Minimal Base Styles
-//--------------------------------
-html { @include force-scrollbar; }
-
-ul, ol { margin-left: $list-left-margin; }
-ol { list-style-type: decimal; }
-
-td, td img { vertical-align: top; }
-
-sub { @include sub; }
-
-sup { @include sup; }
-
-textarea { overflow: auto; }
-
-@include accessible-focus;
-
-@include quoted-pre;
-
-@include align-input-labels;
-
-@include hand-cursor-inputs;
-
-@include webkit-reset-form-elements;
-
-@include selected-text;
-
-@include webkit-tap-highlight;
-
-@include ie-hacks;
-
-@include no-nav-margins;
-
-
-//--------------------------------
-// Helpers
-//--------------------------------
-.ir { @include image-replacement; }
-
-.hidden { @include hidden; }
-
-.visuallyhidden { @include visually-hidden; }
-
-.clearfix {
- @include pie-clearfix; // defined by compass core
-}
diff --git a/app/stylesheets/partials/_page.scss b/app/stylesheets/partials/_page.scss
deleted file mode 100644
index 5bb7b5ac7..000000000
--- a/app/stylesheets/partials/_page.scss
+++ /dev/null
@@ -1,185 +0,0 @@
-@import "compass/css3";
-
-//-----------------------------------------------
-// The following html5-boilerplate styles should
-// probably be customized for each site
-//-----------------------------------------------
-
-body, select, input, textarea {
- color: $font-color;
- // Set your base font here, to apply evenly
- // font-family: Georgia, serif;
-}
-
-//Headers (h1, h2, etc) have no default font-size or margin; define those yourself
-h1, h2, h3, h4, h5, h6 {
- // Bold might not be the best choice if you are
- // embedding a @font-face that's already bold
- font-weight: bold;
-}
-
-a, a:active, a:visited { color: $link-color; }
-a:hover { color: $link-hover-color; }
-
-strong, th {
- font-weight: bold;
-}
-
-small {
- // Use font-size mixin to convert to percentage for YUI
- // http://developer.yahoo.com/yui/3/cssfonts/#fontsize
- @include font-size(11px); // approx 85% when base-font-size eq 13px
-}
-
-// Add the 'required' attribute on your
-// inputs if you want to use these
-input:valid, textarea:valid {}
-input:invalid, textarea:invalid {
- @include border-radius(1px);
- @include box-shadow(red, 0, 0, 5px, 0);
-}
-.no-boxshadow input:invalid,
-.no-boxshadow textarea:invalid { background-color: #f0dddd; }
-
-
-//-----------------------------------
-// Add your own custom styles below
-//-----------------------------------
-
-body {}
-
-#container {}
-
-header {
- display:block;
- background: #ccf;
- height:3em;
- #logout {
- float:right;
- }
-}
-
-#main {
- #login_form {
- margin: 0 auto;
- width:250px;
- padding:2em;
- }
-}
-
-footer {}
-
-.row {
- margin: 10px;
-}
-
-.commit_row {
- margin-bottom: 20px;
-}
-
-.commit_row .author {
- font-weight: bold;
-}
-
-table tr .line_numbers {
- text-align: right;
- vertical-align: top;
- background: #eee;
- color: #777;
- font-size: 92%;
- padding: 0 3px 0 2px;
- width: 35px;
- border-right: 1px solid #ccc;
- border-bottom: 1px solid #cdcdcd;
-}
-
-table tr td.code {
- width: 95%;
- padding-left: 10px;
- /*white-space: pre;*/
- white-space: pre-wrap; /* CSS-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- background: #fff;
- font: 95%/110% "Bitstream Vera Sans Mono", Monaco, monospace;
- border-right: 1px solid #ccc;
-}
-
-table tr td.code pre {
- margin: 0;
- padding: 0;
- font-size: inherit;
- line-height: inherit;
-}
-
-table tr td.unwrapped {
- white-space: pre;
-}
-
-table tr td.softwrapped {
- white-space: pre-wrap; /* CSS-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
-}
-
-table.sidebyside tr td.code {
- padding: 2px;
-}
-
-table.diff {
- border: 1px solid #ccc;
- width: 100%;
- border-collapse: collapse;
- font: 95%/105% "Bitstream Vera Sans Mono", Monaco, monospace;
-}
-table.diff tr td {
- padding: 0;
-}
-table.diff .line_num_cut {
- background: #ccc;
- border-top: 1px dashed #ccc;
- border-bottom: 1px dashed #ccc;
-}
-
-table.diff thead .line_numbers, table.diff thead { background: #ddd; }
-table.diff td.code { padding-left: 2px; }
-table.diff .cut-line {
- background: #eee;
- border-top: 1px dashed #aaa;
- border-bottom: 1px dashed #aaa;
-}
-table.diff td.hidden del { display:none; }
-table.diff td.del { background: #ffdddd; }
-table.diff td.del span.idiff { background: #F2ACAD; }
-table.diff td.ins { background: #ddffdd; }
-table.diff td.ins span.idiff { background: #BAFBAD; }
-/*table.sidebyside tbody.mod td ins span.idiff,
- table.sidebyside tbody.mod td del span.idiff { background: #fd4; }*/
-table.diff td.del del { text-decoration: none; }
-table.diff td.ins ins { text-decoration: none; }
-table.diff col.lines {
- width: 3em;
-}
-
-ul.diff_stats {
- list-style: none;
-}
-
-table.blame {
- border: 1px solid #ccc;
- width: 100%;
- border-collapse: collapse;
- font: 95%/105% "Bitstream Vera Sans Mono", Monaco, monospace;
-}
-
-table.blame tr td {
- padding: 0;
- vertical-align: top;
-}
-
-table.blame thead .line_numbers, table.blame thead { background: #ddd; }
-table.balme td.code { padding-left: 2px; }
\ No newline at end of file
diff --git a/app/stylesheets/style.scss b/app/stylesheets/style.scss
deleted file mode 100644
index 396092e5e..000000000
--- a/app/stylesheets/style.scss
+++ /dev/null
@@ -1,28 +0,0 @@
-// Here's where we define some default constants
-@import "partials/base";
-
-// Then we'll import the compass extension
-@import "html5-boilerplate";
-
-// Now, you can simply include everything
-// (except media) by uncommeting this line
-//@include html5-boilerplate;
-
-// Or, you can pick and choose only the sections
-// you want by using the these includes
-@include html5-boilerplate-reset;
-@include html5-boilerplate-fonts;
-@include html5-boilerplate-styles;
-@include html5-boilerplate-helpers;
-
-// Or, you can import the "overrides" partial if
-// you want more control over individual mixins
-//@import "partials/overrides";
-
-// Finally, put your own styles in these partials
-// and add more as needed (i.e. forms, tables, nav)
-@import "partials/fonts";
-@import "partials/page";
-
-// Media should come last
-@import "partials/media";
diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml
index 810b8caff..feaf26526 100644
--- a/app/views/devise/confirmations/new.html.haml
+++ b/app/views/devise/confirmations/new.html.haml
@@ -1,9 +1,22 @@
-%h2 Resend confirmation instructions
-= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f|
- = devise_error_messages!
- %p
- = f.label :email
- %br/
- = f.text_field :email
- %p= f.submit "Resend confirmation instructions"
-= render :partial => "devise/shared/links"
+.block
+ %h2= t("devise.confirmations.resend_header")
+ .content
+ - if resource.errors.present?
+ .flash
+ .message.error
+ - messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
+ = messages
+
+ = form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post, :class => "form" }) do |f|
+ = f.hidden_field :reset_password_token
+ .group.wat-cf
+ .left
+ = f.label :email, :class => "label"
+ .right
+ = f.text_field :email, :class => "text_field"
+
+ .group.navform.wat-cf
+ %button.button{ :tyle => "submit" }
+ #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.confirmations.send"))} #{t("devise.confirmations.send")}
+ %span.text_button_padding
+ = render :partial => "devise/shared/links"
\ No newline at end of file
diff --git a/app/views/devise/passwords/edit.html.haml b/app/views/devise/passwords/edit.html.haml
index 145739993..8857fe42a 100644
--- a/app/views/devise/passwords/edit.html.haml
+++ b/app/views/devise/passwords/edit.html.haml
@@ -1,13 +1,26 @@
-%h2= t('devise.passwords.edit')
-= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f|
- = devise_error_messages!
- = f.hidden_field :reset_password_token
- %p
- = f.label :password
- %br/
- = f.password_field :password
- %p
- = f.label :password_confirmation
- %br/
- = f.password_field :password_confirmation
- %p= f.submit t('devise.password.edit_button')
+.block
+ %h2= t('devise.passwords.edit')
+ .content
+ - if resource.errors.present?
+ .flash
+ .message.error
+ - messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
+ = messages
+
+ = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
+ = f.hidden_field :reset_password_token
+ .group.wat-cf
+ .left
+ = f.label :password, :class => "label"
+ .right
+ = f.text_field :password, :class => "text_field"
+ .group.wat-cf
+ .left
+ = f.label :password_confirmation, :class => "label"
+ .right
+ = f.text_field :password_confirmation, :class => "text_field"
+
+ .group.navform.wat-cf
+ %button.button{ :tyle => "submit" }
+ #{image_tag("web-app-theme/icons/application_edit.png", :alt => t("devise.passwords.edit_button"))} #{t("devise.passwords.edit_button")}
+
diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml
index 64f01bf59..b440c0144 100644
--- a/app/views/devise/passwords/new.html.haml
+++ b/app/views/devise/passwords/new.html.haml
@@ -1,8 +1,19 @@
-%h2= t('devise.passwords.link')
-= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f|
- = devise_error_messages!
- %p
- = f.label :email
- %br/
- = f.text_field :email
- %p= f.submit t('devise.passwords.button')
+.block
+ %h2= t('devise.passwords.link')
+ .content
+ - if resource.errors.present?
+ .flash
+ .message.error
+ - messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
+ = messages
+
+ = form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post, :class => "form" }) do |f|
+ .group.wat-cf
+ .left
+ = f.label :email, :class => "label"
+ .right
+ = f.text_field :email, :class => "text_field"
+
+ .group.navform.wat-cf
+ %button.button{ :tyle => "submit" }
+ #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.passwords.button"))} #{t("devise.passwords.button")}
\ No newline at end of file
diff --git a/app/views/devise/registrations/edit.html.haml b/app/views/devise/registrations/edit.html.haml
index d252d9af4..ce7201d56 100644
--- a/app/views/devise/registrations/edit.html.haml
+++ b/app/views/devise/registrations/edit.html.haml
@@ -1,27 +1,45 @@
-%h2
- Edit #{resource_name.to_s.humanize}
-= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f|
- = devise_error_messages!
- %p
- = f.label :email
- %br/
- = f.text_field :email
- %p
- = f.label :password
- %i (leave blank if you don't want to change it)
- %br/
- = f.password_field :password
- %p
- = f.label :password_confirmation
- %br/
- = f.password_field :password_confirmation
- %p
- = f.label :current_password
- %i (we need your current password to confirm your changes)
- %br/
- = f.password_field :current_password
- %p= f.submit "Update"
-%h3 Cancel my account
-%p
- Unhappy? #{link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete}.
-= link_to "Back", :back
+#block-signup.block
+ %h2 #{t("devise.registrations.edit")} #{resource_name.to_s.humanize}
+ .content
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form" }) do |f|
+ - if resource.errors.present?
+ .flash
+ .message.error
+ - messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
+ = messages
+
+ .group.wat-cf
+ .left
+ = f.label :email, :class => "label"
+ .right
+ = f.text_field :email, :class => "text_field"
+
+ .group.wat-cf
+ .left
+ = f.label :current_password, :class => "label"
+ .right
+ = f.password_field :current_password, :class => "text_field"
+ %span.description= t("devise.registrations.current_password_description")
+
+ .group.wat-cf
+ .left
+ = f.label :password, :class => "label"
+ .right
+ = f.password_field :password, :class => "text_field"
+ %span.description= t("devise.registrations.edit_password_description")
+
+ .group.wat-cf
+ .left
+ = f.label :password_confirmation, :class => "label"
+ .right
+ = f.password_field :password_confirmation, :class => "text_field"
+
+ .group.navform.wat-cf
+ %button.button{ :type => "submit" }
+ #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up"))} #{t("devise.registrations.signed_up")}
+
+ = link_to image_tag("web-app-theme/icons/cross.png", :alt => t("devise.registrations.cancel")) + " " + t("devise.registrations.cancel"), registration_path(resource_name), :method => "delete", :class => "button", :confirm => t("devise.registrations.cancel_confirmation")
+
+ %span.text_button_padding
+ = link_to t('layout.back'), :back, :class => "text_button_padding link_button"
+
diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml
index b03da3518..d68795e70 100644
--- a/app/views/devise/registrations/new.html.haml
+++ b/app/views/devise/registrations/new.html.haml
@@ -1,17 +1,33 @@
-%h2 Sign up
-= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f|
- = devise_error_messages!
- %p
- = f.label :email
- %br/
- = f.text_field :email
- %p
- = f.label :password
- %br/
- = f.password_field :password
- %p
- = f.label :password_confirmation
- %br/
- = f.password_field :password_confirmation
- %p= f.submit "Sign up"
-= render :partial => "devise/shared/links"
+#block-signup.block
+ %h2= t("devise.registrations.sign_up_header")
+ .content
+ = form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form" }) do |f|
+ - if resource.errors.present?
+ .flash
+ .message.error
+ - messages = resource.errors.full_messages.map { |msg| content_tag(:p, msg) }.join.html_safe
+ = messages
+
+ .group.wat-cf
+ .left
+ = f.label :email, :class => "label"
+ .right
+ = f.text_field :email, :class => "text_field"
+
+ .group.wat-cf
+ .left
+ = f.label :password, :class => "label"
+ .right
+ = f.password_field :password, :class => "text_field"
+
+ .group.wat-cf
+ .left
+ = f.label :password_confirmation, :class => "label"
+ .right
+ = f.password_field :password_confirmation, :class => "text_field"
+
+ .group.navform.wat-cf
+ %button.button{ :type => "submit" }
+ #{image_tag("web-app-theme/icons/tick.png", :alt => t("devise.registrations.signed_up"))} #{t("devise.registrations.signed_up")}
+ %span.text_button_padding
+ = render :partial => "devise/shared/links"
diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml
index 0222968a7..d3caed1c2 100644
--- a/app/views/devise/sessions/new.html.haml
+++ b/app/views/devise/sessions/new.html.haml
@@ -1,18 +1,25 @@
-#login_form
- %h2 Вход в систему
- = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
- %p
- = f.label :email
- %br/
- = f.text_field :email
- %p
- = f.label :password
- %br/
- = f.password_field :password
- - if devise_mapping.rememberable?
- %p
- = f.check_box :remember_me
- = f.label :remember_me
- %p
- = f.submit "Войти"
- = link_to t('devise.passwords.link'), new_password_path(resource_name)
+#block-login.block
+ %h2= t("layout.sessions.sign_in_header")
+ .content.login
+ - if flash.present?
+ .flash
+ - flash.each do |key, value|
+ .message{ :title => key.to_s.humanize, :class => (key == :alert ? "error" : key) }
+ %p= value
+ - form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form login" }) do |f|
+ .group.wat-cf
+ .left
+ = f.label :email, :class => "label right"
+ .right
+ = f.text_field :email, :class => "text_field"
+ .group.wat-cf
+ .left
+ = f.label :password, :class => "label right"
+ .right
+ = f.password_field :password, :class => "text_field"
+ .group.navform.wat-cf
+ .right
+ %button.button{ :type => "submit" }
+ %img{ :src => "/images/web-app-theme/icons/key.png", :alt => "Save" }= t("layout.login")
+ %span.text_button_padding
+ = link_to t('devise.passwords.link'), new_password_path(resource_name), :class => "text_button_padding link_button"
\ No newline at end of file
diff --git a/app/views/devise/shared/_links.haml b/app/views/devise/shared/_links.haml
index ec5d37ee8..f34d98813 100644
--- a/app/views/devise/shared/_links.haml
+++ b/app/views/devise/shared/_links.haml
@@ -1,2 +1,2 @@
- if devise_mapping.recoverable? && controller_name != 'passwords'
- = link_to t('devise.passwords.link'), new_password_path(resource_name)
+ = link_to t('devise.passwords.link'), new_password_path(resource_name), :class => "text_button_padding link_button"
diff --git a/app/views/layouts/_flashes.html.haml b/app/views/layouts/_flashes.html.haml
index 873d9670d..2f4c719ac 100644
--- a/app/views/layouts/_flashes.html.haml
+++ b/app/views/layouts/_flashes.html.haml
@@ -1,4 +1,4 @@
-#flash
- - flash.each do |key, value|
- %div{ :title => key.to_s.humanize, :class => key }
- %p= value
\ No newline at end of file
+.flash
+ - flash.each do |type, message|
+ %div{:class => "message #{type}"}
+ %p= message
\ No newline at end of file
diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml
deleted file mode 100644
index 57a59e929..000000000
--- a/app/views/layouts/_footer.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-%small.copyright
\ No newline at end of file
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
deleted file mode 100644
index 7eaf0b328..000000000
--- a/app/views/layouts/_head.html.haml
+++ /dev/null
@@ -1,28 +0,0 @@
-%head
- %meta{ :charset => "utf-8" }/
-
- -#
- Always force latest IE rendering engine (even in intranet) & Chrome Frame
- Remove this if you use the .htaccess
- %meta{ :content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible" }/
-
- %title
- == #{ controller.controller_name.titleize } - #{ controller.action_name.titleize }
-
- %meta{ :content => "", :name => "description" }/
- %meta{ :content => "", :name => "author" }/
-
- -# Mobile viewport optimized: j.mp/bplateviewport
- %meta{ :content => "width=device-width, initial-scale=1.0", :name => "viewport" }/
-
- -# Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references
- -# %link{ :href => "/favicon.ico", :rel => "shortcut icon" }/
- -# %link{ :href => "/apple-touch-icon.png", :rel => "apple-touch-icon" }/
-
- = render :partial => 'layouts/stylesheets'
-
- -# All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects
- = include_javascripts :application
- = javascript_include_tag 'modernizr.min'
-
- = csrf_meta_tag
\ No newline at end of file
diff --git a/app/views/layouts/_header.html.haml b/app/views/layouts/_header.html.haml
deleted file mode 100644
index 190fcfc50..000000000
--- a/app/views/layouts/_header.html.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h1= t('layout.global_header')
- if user_signed_in?
#logout
= t('layout.logged_in_as')
= current_user.name
= link_to t('layout.logout'), destroy_user_session_path
\ No newline at end of file
diff --git a/app/views/layouts/_javascripts.html.haml b/app/views/layouts/_javascripts.html.haml
index bf0d5433e..8527df5a7 100644
--- a/app/views/layouts/_javascripts.html.haml
+++ b/app/views/layouts/_javascripts.html.haml
@@ -1,37 +1,10 @@
--# Grab Google CDN's jQuery, with a protocol relative URL
--# Looks for google_api_key first in ENV['GOOGLE_API_KEY'] then in config/google.yml
--# remote_jquery and local_jquery helpers use minified jquery unless Rails.env is development
-- if !google_api_key.blank?
- = javascript_include_tag "//www.google.com/jsapi?key=#{google_api_key}"
- :javascript
- google.load(#{ remote_jquery("1.5.1") });
-- else
- = javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/#{ local_jquery("1.5.1") }"
+= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/#{ local_jquery("1.5.1") }"
-# fall back to local jQuery if necessary
:javascript
!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/jquery.min.js"%3E%3C/script%3E'))
-= javascript_include_tag 'rails', 'plugins', 'application'
+= include_javascripts :application
--# Fix any or .png_bg bg-images. Also, please read goo.gl/mZiyb
-/[if lt IE 7 ]
- = javascript_include_tag 'dd_belatedpng.js'
- :javascript
- //DD_belatedPNG.fix('img, .png_bg');
-
-# Append your own using content_for :javascripts
= yield :javascripts
-
--# asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet
--# Looks for google_account_id first in ENV['GOOGLE_ACCOUNT_ID'] then in config/google.yml
-- if !google_account_id.blank?
- :javascript
- var _gaq = [['_setAccount', '#{google_account_id}'], ['_trackPageview']];
- (function(d, t) {
- var g = d.createElement(t),
- s = d.getElementsByTagName(t)[0];
- g.async = true;
- g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- s.parentNode.insertBefore(g, s);
- })(document, 'script');
\ No newline at end of file
diff --git a/app/views/layouts/_stylesheets.html.haml b/app/views/layouts/_stylesheets.html.haml
index 5450f3762..96ea106a2 100644
--- a/app/views/layouts/_stylesheets.html.haml
+++ b/app/views/layouts/_stylesheets.html.haml
@@ -1,6 +1,3 @@
--# CSS: implied media="all"
--# stylesheet_link_tag 'style', :media => 'all'
= include_stylesheets :application
--# Append your own using content_for :stylesheets
= yield :stylesheets
\ No newline at end of file
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml
index 98de908a9..8e6bee528 100644
--- a/app/views/layouts/application.html.haml
+++ b/app/views/layouts/application.html.haml
@@ -1,15 +1,32 @@
-!!! 5
--# http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither
--ie_html :class => 'no-js' do
- = render :partial => 'layouts/head'
- %body{ :lang => 'ru', :class => "#{controller.controller_name}" }
+!!!
+%html
+ %head
+ %title= t("layout.global_header")
+ = render :partial => "layouts/stylesheets"
+ = render :partial => "layouts/javascripts"
+ = csrf_meta_tag
+ %body
#container
- %header#header
- = render :partial => 'layouts/header'
- #main{ :role => 'main' }
- = render :partial => 'layouts/flashes'
- = yield
- %footer#footer
- = render :partial => 'layouts/footer'
- -# Javascript at the bottom for fast page loading
- = render :partial => 'layouts/javascripts'
+ #header
+ %h1
+ %a{:href => "/"}= t("layout.global_header")
+ #user-navigation
+ %ul.wat-cf
+ %li
+ = link_to t('layout.logout'), destroy_user_session_path, :class => "logout"
+ #main-navigation
+ %ul.wat-cf
+ %li{:class => controller.controller_path == 'users' ? 'active' : '' }
+ %a{:href => users_path} Users
+ %li{:class => controller.controller_path == 'platforms' ? 'active' : '' }
+ %a{:href => platforms_path} Platforms
+ #wrapper.wat-cf
+ = render :partial => "layouts/flashes"
+ #main
+ = yield
+ #footer
+ .block
+
+ #sidebar
+ = yield :sidebar
+
diff --git a/app/views/layouts/sessions.html.haml b/app/views/layouts/sessions.html.haml
new file mode 100644
index 000000000..0ddff96d8
--- /dev/null
+++ b/app/views/layouts/sessions.html.haml
@@ -0,0 +1,10 @@
+!!!
+%html
+ %head
+ %title= t("layout.global_header")
+ = include_stylesheets :sessions
+ = csrf_meta_tag
+ %body
+ #container
+ #box
+ = yield
diff --git a/app/views/platforms/_form.html.haml b/app/views/platforms/_form.html.haml
new file mode 100644
index 000000000..da1d49310
--- /dev/null
+++ b/app/views/platforms/_form.html.haml
@@ -0,0 +1,22 @@
+.group
+ = f.label :name, :class => :label
+ = f.text_field :name, :class => 'text_field'
+
+.group
+ = f.label :unixname, :class => :label
+ = f.text_field :unixname, :class => 'text_field'
+
+.group
+ = f.label :parent_platform_id, :class => :label
+ = f.text_field :parent_platform_id, :class => 'text_field'
+
+.group
+ = f.label :released, :class => :label
+ = f.check_box :released, :class => 'check_box'
+
+.group.navform.wat-cf
+ %button.button{:type => "submit"}
+ = image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
+ = t("layout.save")
+ %span.text_button_padding= t("layout.or")
+ = link_to t("layout.cancel"), platforms_path, :class => "text_button_padding link_button"
diff --git a/app/views/platforms/_sidebar.html.haml b/app/views/platforms/_sidebar.html.haml
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/platforms/edit.html.haml b/app/views/platforms/edit.html.haml
new file mode 100644
index 000000000..efbea247f
--- /dev/null
+++ b/app/views/platforms/edit.html.haml
@@ -0,0 +1,13 @@
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to t("layout.platforms.list"), platforms_path
+ %li= link_to t("layout.platforms.new"), new_platform_path
+ %li.active= link_to t("layout.platforms.edit"), edit_platform_path
+ .content
+ %h2.title
+ = t("layout.platforms.edit_header")
+ .inner
+ = form_for @platform, :url => platform_path(@platform), :html => { :class => :form } do |f|
+ = render :partial => "form", :locals => {:f => f}
+- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/app/views/platforms/index.html.haml b/app/views/platforms/index.html.haml
index 84dce1cee..920e1a0a2 100644
--- a/app/views/platforms/index.html.haml
+++ b/app/views/platforms/index.html.haml
@@ -1,7 +1,24 @@
-%h1= t('layout.platforms.list')
-- @platforms.each do |platform|
- = div_for platform do
- = link_to platform.name, platform
-= link_to t('layout.platforms.new'), new_platform_path
-.div
- = link_to t('layout.user_list'), users_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first.active= link_to t("layout.platforms.list"), platforms_path
+ %li= link_to t("layout.platforms.new"), new_platform_path
+ .content
+ %h2.title
+ = t("layout.platforms.list_header")
+ .inner
+ %table.table
+ %tr
+ %th.first= t("activerecord.attributes.platform.name")
+ %th= t("activerecord.attributes.platform.created_at")
+ %th.last
+ - @platforms.each do |platform|
+ %tr{:class => cycle("odd", "even")}
+ %td
+ = link_to platform.name, platform_path(platform)
+ %td
+ = platform.created_at
+ %td.last
+ #{link_to t("layout.show"), platform_path(platform)} | #{link_to t("layout.delete"), platform_path(platform), :method => :delete, :confirm => t("layout.platforms.confirm_delete")}
+ .actions-bar.wat-cf
+ .actions
\ No newline at end of file
diff --git a/app/views/platforms/new.html.haml b/app/views/platforms/new.html.haml
index 36a7d0283..5f44e786a 100644
--- a/app/views/platforms/new.html.haml
+++ b/app/views/platforms/new.html.haml
@@ -1,14 +1,11 @@
-%h1= t('layout.platforms.new_header')
-= form_for @platform do |f|
- %p
- = f.label :name
- = f.text_field :name
- %p
- = f.label :unixname
- = f.text_field :unixname
- %p
- = f.label :parent_platform_id
- = f.select :parent_platform_id, @platforms.map { |p| [p.name, p.id] }, :include_blank => true
- %p
- = f.submit t('layout.create')
- = link_to t('layout.cancel'), platforms_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to "#{t("layout.platforms.list")}", platforms_path
+ %li.active= link_to "#{t("layout.platforms.new")}", new_platform_path
+ .content
+ %h2.title
+ = t("layout.platforms.new_header")
+ .inner
+ = form_for :platform, :url => platforms_path, :html => { :class => :form } do |f|
+ = render :partial => "form", :locals => {:f => f}
\ No newline at end of file
diff --git a/app/views/platforms/show.html.haml b/app/views/platforms/show.html.haml
index ea0b1523e..9b0b57667 100644
--- a/app/views/platforms/show.html.haml
+++ b/app/views/platforms/show.html.haml
@@ -1,24 +1,42 @@
-%h1
- = t('layout.platforms.show')
- = @platform.name
-= link_to t('layout.platforms.back_to_the_list'), platforms_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to t("layout.platforms.list"), platforms_path
+ %li= link_to t("layout.platforms.new"), new_platform_path
+ %li.active= link_to t("layout.platforms.show"), platform_path
+ .content
+ .inner
+ %p
+ %b
+ = t("activerecord.attributes.platform.name")
+ \:
+ = @platform.name
+ %p
+ %b
+ = t("activerecord.attributes.platform.unixname")
+ \:
+ = @platform.unixname
+ %p
+ %b
+ = t("activerecord.attributes.platform.parent")
+ \:
+ - if @platform.parent
+ = link_to @platform.parent.name, platform_path(@platform.parent)
+ %p
+ %b
+ = t('layout.platforms.location')
+ \:
+ = @platform.path
-.freeze
- - if @platform.released?
- = link_to I18n.t("layout.platforms.unfreeze"), unfreeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_unfreeze")
- - else
- = link_to I18n.t("layout.platforms.freeze"), freeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_freeze")
+ .wat-cf
+ -#= link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_platform_path(@platform), :class => "button"
+ = link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), platform_path(@platform), :method => "delete", :class => "button", :confirm => t("layout.platforms.confirm_delete")
+ - if @platform.released?
+ = link_to t("layout.platforms.unfreeze"), unfreeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_unfreeze"), :class => "button"
+ - else
+ = link_to t("layout.platforms.freeze"), freeze_platform_path(@platform), :confirm => I18n.t("layout.platforms.confirm_freeze"), :class => "button"
-.location
- = t('layout.platforms.location')
- = @platform.path
+-# Show repositories
+-# Show projects
-
-%h2= t('layout.platforms.repositories')
-- @repositories.each do |repository|
- = div_for repository do
- = link_to repository.name, [@platform, repository]
-= link_to t('layout.repositories.new'), new_platform_repository_path(@platform)
-
-%h2= t('layout.platforms.products')
-TBD
+-#- content_for :sidebar, render(:partial => 'sidebar')
\ No newline at end of file
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.old.html.haml
similarity index 100%
rename from app/views/projects/new.html.haml
rename to app/views/projects/new.old.html.haml
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.old.html.haml
similarity index 100%
rename from app/views/projects/show.html.haml
rename to app/views/projects/show.old.html.haml
diff --git a/app/views/users/_form.html.haml b/app/views/users/_form.html.haml
new file mode 100644
index 000000000..3ff7ed8c5
--- /dev/null
+++ b/app/views/users/_form.html.haml
@@ -0,0 +1,13 @@
+.group
+ = f.label :name, t("activerecord.attributes.user.name"), :class => :label
+ = f.text_field :name, :class => 'text_field'
+.group
+ = f.label :email, t("activerecord.attributes.user.email"), :class => :label
+ = f.text_field :email, :class => 'text_field'
+
+.group.navform.wat-cf
+ %button.button{:type => "submit"}
+ = image_tag("web-app-theme/icons/tick.png", :alt => t("layout.save"))
+ = t("layout.save")
+ %span.text_button_padding= t("layout.or")
+ = link_to t("layout.cancel"), users_path, :class => "text_button_padding link_button"
diff --git a/app/views/users/_sidebar.html.haml b/app/views/users/_sidebar.html.haml
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/views/users/edit.html.haml b/app/views/users/edit.html.haml
index 6a592b9d8..43e11265e 100644
--- a/app/views/users/edit.html.haml
+++ b/app/views/users/edit.html.haml
@@ -1,11 +1,12 @@
-%h1= @user.name
-= form_for @user do |f|
- %p
- = f.label :name
- = f.text_field :name
- %p
- = f.label :email
- = f.text_field :email
- %p
- = f.submit
- = link_to t('layout.users.back_to_the_list'), users_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to t("layout.users.list"), users_path
+ %li= link_to t("layout.users.new"), new_user_path
+ %li.active= link_to t("layout.users.edit"), edit_user_path
+ .content
+ %h2.title= t("layout.users.edit_header")
+ .inner
+ = form_for @user, :url => user_path(@user), :html => { :class => :form } do |f|
+ = render :partial => "form", :locals => {:f => f}
+- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/app/views/users/index.html.haml b/app/views/users/index.html.haml
index 3a615f034..8ce9f7ae9 100644
--- a/app/views/users/index.html.haml
+++ b/app/views/users/index.html.haml
@@ -1,12 +1,31 @@
-%h1= t('layout.user_list')
-%ul
- - @users.each do |user|
- %li
- = link_to user.name, edit_user_path(user)
- (
- %span>= user.email
- )
- = link_to t('layout.delete'), user_path(user), :method => :delete, :confirm => t('layout.are_you_sure')
-%p
- = link_to t('layout.users.new'), new_user_path
-= link_to t('layout.platforms.back_to_the_list'), platforms_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first.active= link_to t("layout.users.list"), users_path
+ %li= link_to t("layout.users.new"), new_user_path
+ .content
+ %h2.title
+ = t("layout.users.list_header")
+ .inner
+ %table.table
+ %tr
+ %th.first ID
+ %th= t("activerecord.attributes.user.name")
+ %th= t("activerecord.attributes.user.email")
+ %th= t("activerecord.attributes.user.created_at")
+ %th.last
+ - @users.each do |user|
+ %tr{:class => cycle("odd", "even")}
+ %td
+ = user.id
+ %td
+ = link_to user.name, user_path(user)
+ %td
+ = user.email
+ %td
+ = user.created_at
+ %td.last
+ #{link_to t("layout.show"), user_path(user)} | #{link_to t("layout.edit"), edit_user_path(user)} | #{link_to t("layout.delete"), user_path(user), :method => :delete, :confirm => t("layout.users.confirm_delete")}
+ .actions-bar.wat-cf
+ .actions
+- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/app/views/users/new.html.haml b/app/views/users/new.html.haml
index 7e26da0fa..66abe5e24 100644
--- a/app/views/users/new.html.haml
+++ b/app/views/users/new.html.haml
@@ -1,11 +1,11 @@
-%h1= t('layout.users.new')
-= form_for @user do |f|
- %p
- = f.label :name
- = f.text_field :name
- %p
- = f.label :email
- = f.text_field :email
- %p
- = f.submit
- = link_to t('layout.users.back_to_the_list'), users_path
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to t("layout.users.list"), users_path
+ %li.active= link_to t("layout.users.new"), new_user_path
+ .content
+ %h2.title= t("layout.users.new_header")
+ .inner
+ = form_for :user, :url => users_path, :html => { :class => :form } do |f|
+ = render :partial => "form", :locals => {:f => f}
+- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml
new file mode 100644
index 000000000..ab8c9d039
--- /dev/null
+++ b/app/views/users/show.html.haml
@@ -0,0 +1,33 @@
+.block
+ .secondary-navigation
+ %ul.wat-cf
+ %li.first= link_to t("layout.users.list"), users_path
+ %li= link_to t("layout.users.new"), new_user_path
+ %li.active= link_to t("layout.users.show"), user_path
+ .content
+ .inner
+ %p
+ %b
+ Id
+ \:
+ = @user.id
+ %p
+ %b
+ = t("activerecord.attributes.user.name")
+ \:
+ = @user.name
+ %p
+ %b
+ = t("activerecord.attributes.user.email")
+ \:
+ = @user.email
+ %p
+ %b
+ = t("activerecord.attributes.user.created_at")
+ \:
+ = @user.created_at
+ .wat-cf
+ = link_to image_tag("web-app-theme/icons/application_edit.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button"
+ = link_to image_tag("web-app-theme/icons/cross.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete")
+
+- content_for :sidebar, render(:partial => 'sidebar')
diff --git a/config/assets.yml b/config/assets.yml
index 311acd453..4a33810c5 100644
--- a/config/assets.yml
+++ b/config/assets.yml
@@ -5,5 +5,11 @@ javascripts:
stylesheets:
application:
- - public/stylesheets/compiled/style.css
- - public/stylesheets/compiled/handheld.css
+ - public/stylesheets/web-app-theme/base.css
+ - public/stylesheets/web-app-theme/themes/default/style.css
+ - public/stylesheets/web-app-theme/override.css
+
+ sessions:
+ - public/stylesheets/web-app-theme/base.css
+ - public/stylesheets/web-app-theme/themes/default/style.css
+ - public/stylesheets/web-app-theme/override.css
diff --git a/config/locales/devise.ru.yml b/config/locales/devise.ru.yml
index 0c389de48..3c8afa0bd 100644
--- a/config/locales/devise.ru.yml
+++ b/config/locales/devise.ru.yml
@@ -14,7 +14,7 @@ ru:
signed_out: 'Вы вышли.'
passwords:
link: 'Забыли пароль?'
- button: 'Отправить инструкции по восстановлению пароля на почту'
+ button: 'Восстановить'
send_instructions: 'Вы получите письмо с инструкциями о том, как сбросить ваш пароль, через несколько минут.'
updated: 'Ваш пароль изменен. Теперь вы можете войти.'
edit: 'Изменение пароля'
@@ -23,11 +23,19 @@ ru:
link: "Не получили инструкции для подтверждения учетной записи?"
send_instructions: 'Вы получите письмо с инструкциями о том, как подтвердить вашу учетную запись.'
confirmed: 'Ваша учетная запись успешно подтверждена. Добро пожаловать.'
+ resend_header: 'Повторная отправка инструкций для подтверждения учетной записи'
+ send: "Отправить"
registrations:
link: 'Регистрация'
signed_up: 'Вы успешно зарегистрировались.'
updated: 'Ваша учетная запись изменена.'
destroyed: 'До свидания! Ваша учетная запись удалена. Надеемся вскоре снова вас увидеть.'
+ sign_up_header: 'Регистрация'
+ edit: 'Редактировать'
+ edit_password_description: 'Оставьте пароль пустым, если не хотите его менять'
+ current_password_description: 'Нам нужен ваш текущий пароль для подтверждения изменения'
+ cancel: 'Удалить'
+ cancel_confirmation: 'Вы уверены, что хотите удалить учетную запись?'
unlocks:
link: "Не получили инструкции для разблокировки учетной записи?"
send_instructions: 'Вы получите письмо с инструкциями о том, как разблокировать вашу учетную запись, через несколько минут.'
diff --git a/config/locales/ru.yml b/config/locales/ru.yml
index c2614fd5e..65bb2a8f0 100644
--- a/config/locales/ru.yml
+++ b/config/locales/ru.yml
@@ -19,6 +19,7 @@ ru:
list: Список
new: Создать
new_header: Новая платформа
+ edit_header: Редактировать
list_header: Платформы
show: Платформа
projects: Проекты
@@ -45,8 +46,15 @@ ru:
git_repo_location: Путь к git-репозиторию
back_to_the_list: ⇐ К списку проектов репозитория
users:
- new: Новый пользователь
+ list: Список
+ new: Создать
+ edit: Редактировать
+ new_header: Новый пользователь
+ edit_header: Редактировать
+ list_header: Пользователи
+ show: Пользователь
back_to_the_list: ⇐ К списку пользователей
+ confirm_delete: Вы уверены, что хотите удалить этого пользователя?
git:
repositories:
empty: Пустой репозиторий
diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png
deleted file mode 100644
index 1f1972bd8..000000000
Binary files a/public/apple-touch-icon.png and /dev/null differ
diff --git a/public/images/web-app-theme/avatar.png b/public/images/web-app-theme/avatar.png
new file mode 100644
index 000000000..66488481a
Binary files /dev/null and b/public/images/web-app-theme/avatar.png differ
diff --git a/public/images/web-app-theme/icons/application_edit.png b/public/images/web-app-theme/icons/application_edit.png
new file mode 100644
index 000000000..fb2efb877
Binary files /dev/null and b/public/images/web-app-theme/icons/application_edit.png differ
diff --git a/public/images/web-app-theme/icons/cross.png b/public/images/web-app-theme/icons/cross.png
new file mode 100644
index 000000000..1514d51a3
Binary files /dev/null and b/public/images/web-app-theme/icons/cross.png differ
diff --git a/public/images/web-app-theme/icons/key.png b/public/images/web-app-theme/icons/key.png
new file mode 100644
index 000000000..4ec1a9281
Binary files /dev/null and b/public/images/web-app-theme/icons/key.png differ
diff --git a/public/images/web-app-theme/icons/tick.png b/public/images/web-app-theme/icons/tick.png
new file mode 100644
index 000000000..a9925a06a
Binary files /dev/null and b/public/images/web-app-theme/icons/tick.png differ
diff --git a/public/javascripts/dd_belatedpng.js b/public/javascripts/dd_belatedpng.js
deleted file mode 100644
index 6062fb3c1..000000000
--- a/public/javascripts/dd_belatedpng.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
-* DD_belatedPNG: Adds IE6 support: PNG images for CSS background-image and HTML .
-* Author: Drew Diller
-* Email: drew.diller@gmail.com
-* URL: http://www.dillerdesign.com/experiment/DD_belatedPNG/
-* Version: 0.0.8a
-* Licensed under the MIT License: http://dillerdesign.com/experiment/DD_belatedPNG/#license
-*
-* Example usage:
-* DD_belatedPNG.fix('.png_bg'); // argument is a CSS selector
-* DD_belatedPNG.fixPng( someNode ); // argument is an HTMLDomElement
-**/
-var DD_belatedPNG={ns:"DD_belatedPNG",imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,"urn:schemas-microsoft-com:vml")}},createVmlStyleSheet:function(){var b,a;b=document.createElement("style");b.setAttribute("media","screen");document.documentElement.firstChild.insertBefore(b,document.documentElement.firstChild.firstChild);if(b.styleSheet){b=b.styleSheet;b.addRule(this.ns+"\\:*","{behavior:url(#default#VML)}");b.addRule(this.ns+"\\:shape","position:absolute;");b.addRule("img."+this.ns+"_sizeFinder","behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;");this.screenStyleSheet=b;a=document.createElement("style");a.setAttribute("media","print");document.documentElement.firstChild.insertBefore(a,document.documentElement.firstChild.firstChild);a=a.styleSheet;a.addRule(this.ns+"\\:*","{display: none !important;}");a.addRule("img."+this.ns+"_sizeFinder","{display: none !important;}")}},readPropertyChange:function(){var b,c,a;b=event.srcElement;if(!b.vmlInitiated){return}if(event.propertyName.search("background")!=-1||event.propertyName.search("border")!=-1){DD_belatedPNG.applyVML(b)}if(event.propertyName=="style.display"){c=(b.currentStyle.display=="none")?"none":"block";for(a in b.vml){if(b.vml.hasOwnProperty(a)){b.vml[a].shape.style.display=c}}}if(event.propertyName.search("filter")!=-1){DD_belatedPNG.vmlOpacity(b)}},vmlOpacity:function(b){if(b.currentStyle.filter.search("lpha")!=-1){var a=b.currentStyle.filter;a=parseInt(a.substring(a.lastIndexOf("=")+1,a.lastIndexOf(")")),10)/100;b.vml.color.shape.style.filter=b.currentStyle.filter;b.vml.image.fill.opacity=a}},handlePseudoHover:function(a){setTimeout(function(){DD_belatedPNG.applyVML(a)},1)},fix:function(a){if(this.screenStyleSheet){var c,b;c=a.split(",");for(b=0;bn.H){i.B=n.H}d.vml.image.shape.style.clip="rect("+i.T+"px "+(i.R+a)+"px "+i.B+"px "+(i.L+a)+"px)"}else{d.vml.image.shape.style.clip="rect("+f.T+"px "+f.R+"px "+f.B+"px "+f.L+"px)"}},figurePercentage:function(d,c,f,a){var b,e;e=true;b=(f=="X");switch(a){case"left":case"top":d[f]=0;break;case"center":d[f]=0.5;break;case"right":case"bottom":d[f]=1;break;default:if(a.search("%")!=-1){d[f]=parseInt(a,10)/100}else{e=false}}d[f]=Math.ceil(e?((c[b?"W":"H"]*d[f])-(c[b?"w":"h"]*d[f])):parseInt(a,10));if(d[f]%2===0){d[f]++}return d[f]},fixPng:function(c){c.style.behavior="none";var g,b,f,a,d;if(c.nodeName=="BODY"||c.nodeName=="TD"||c.nodeName=="TR"){return}c.isImg=false;if(c.nodeName=="IMG"){if(c.src.toLowerCase().search(/\.png$/)!=-1){c.isImg=true;c.style.visibility="hidden"}else{return}}else{if(c.currentStyle.backgroundImage.toLowerCase().search(".png")==-1){return}}g=DD_belatedPNG;c.vml={color:{},image:{}};b={shape:{},fill:{}};for(a in c.vml){if(c.vml.hasOwnProperty(a)){for(d in b){if(b.hasOwnProperty(d)){f=g.ns+":"+d;c.vml[a][d]=document.createElement(f)}}c.vml[a].shape.stroked=false;c.vml[a].shape.appendChild(c.vml[a].fill);c.parentNode.insertBefore(c.vml[a].shape,c)}}c.vml.image.shape.fillcolor="none";c.vml.image.fill.type="tile";c.vml.color.fill.on=false;g.attachHandlers(c);g.giveLayout(c);g.giveLayout(c.offsetParent);c.vmlInitiated=true;g.applyVML(c)}};try{document.execCommand("BackgroundImageCache",false,true)}catch(r){}DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();
\ No newline at end of file
diff --git a/public/javascripts/modernizr.min.js b/public/javascripts/modernizr.min.js
deleted file mode 100644
index 6f54850c0..000000000
--- a/public/javascripts/modernizr.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-// Modernizr v1.7 www.modernizr.com
-window.Modernizr=function(a,b,c){function G(){e.input=function(a){for(var b=0,c=a.length;b7)},r.history=function(){return !!(a.history&&history.pushState)},r.draganddrop=function(){return x("dragstart")&&x("drop")},r.websockets=function(){return"WebSocket"in a},r.rgba=function(){A("background-color:rgba(150,255,150,.5)");return D(k.backgroundColor,"rgba")},r.hsla=function(){A("background-color:hsla(120,40%,100%,.5)");return D(k.backgroundColor,"rgba")||D(k.backgroundColor,"hsla")},r.multiplebgs=function(){A("background:url(//:),url(//:),red url(//:)");return(new RegExp("(url\\s*\\(.*?){3}")).test(k.background)},r.backgroundsize=function(){return F("backgroundSize")},r.borderimage=function(){return F("borderImage")},r.borderradius=function(){return F("borderRadius","",function(a){return D(a,"orderRadius")})},r.boxshadow=function(){return F("boxShadow")},r.textshadow=function(){return b.createElement("div").style.textShadow===""},r.opacity=function(){B("opacity:.55");return/^0.55$/.test(k.opacity)},r.cssanimations=function(){return F("animationName")},r.csscolumns=function(){return F("columnCount")},r.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";A((a+o.join(b+a)+o.join(c+a)).slice(0,-a.length));return D(k.backgroundImage,"gradient")},r.cssreflections=function(){return F("boxReflect")},r.csstransforms=function(){return!!E(["transformProperty","WebkitTransform","MozTransform","OTransform","msTransform"])},r.csstransforms3d=function(){var a=!!E(["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"]);a&&"webkitPerspective"in g.style&&(a=w("@media ("+o.join("transform-3d),(")+"modernizr)"));return a},r.csstransitions=function(){return F("transitionProperty")},r.fontface=function(){var a,c,d=h||g,e=b.createElement("style"),f=b.implementation||{hasFeature:function(){return!1}};e.type="text/css",d.insertBefore(e,d.firstChild),a=e.sheet||e.styleSheet;var i=f.hasFeature("CSS2","")?function(b){if(!a||!b)return!1;var c=!1;try{a.insertRule(b,0),c=/src/i.test(a.cssRules[0].cssText),a.deleteRule(a.cssRules.length-1)}catch(d){}return c}:function(b){if(!a||!b)return!1;a.cssText=b;return a.cssText.length!==0&&/src/i.test(a.cssText)&&a.cssText.replace(/\r+|\n+/g,"").indexOf(b.split(" ")[0])===0};c=i('@font-face { font-family: "font"; src: url(data:,); }'),d.removeChild(e);return c},r.video=function(){var a=b.createElement("video"),c=!!a.canPlayType;if(c){c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"');var d='video/mp4; codecs="avc1.42E01E';c.h264=a.canPlayType(d+'"')||a.canPlayType(d+', mp4a.40.2"'),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"')}return c},r.audio=function(){var a=b.createElement("audio"),c=!!a.canPlayType;c&&(c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"'),c.mp3=a.canPlayType("audio/mpeg;"),c.wav=a.canPlayType('audio/wav; codecs="1"'),c.m4a=a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;"));return c},r.localstorage=function(){try{return!!localStorage.getItem}catch(a){return!1}},r.sessionstorage=function(){try{return!!sessionStorage.getItem}catch(a){return!1}},r.webWorkers=function(){return!!a.Worker},r.applicationcache=function(){return!!a.applicationCache},r.svg=function(){return!!b.createElementNS&&!!b.createElementNS(q.svg,"svg").createSVGRect},r.inlinesvg=function(){var a=b.createElement("div");a.innerHTML="";return(a.firstChild&&a.firstChild.namespaceURI)==q.svg},r.smil=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"animate")))},r.svgclippaths=function(){return!!b.createElementNS&&/SVG/.test(n.call(b.createElementNS(q.svg,"clipPath")))};for(var H in r)z(r,H)&&(v=H.toLowerCase(),e[v]=r[H](),u.push((e[v]?"":"no-")+v));e.input||G(),e.crosswindowmessaging=e.postmessage,e.historymanagement=e.history,e.addTest=function(a,b){a=a.toLowerCase();if(!e[a]){b=!!b(),g.className+=" "+(b?"":"no-")+a,e[a]=b;return e}},A(""),j=l=null,f&&a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function p(a,b){var c=-1,d=a.length,e,f=[];while(++c