From e2b3eb7b7ff7f90f3855580c84bbb9951cfe9e75 Mon Sep 17 00:00:00 2001 From: Vladimir Sharshov Date: Sun, 11 Mar 2012 20:02:07 +0400 Subject: [PATCH] [Refs #285] Fix current_user avatar for all user, replace button Edit --- app/assets/stylesheets/design/main.scss | 5 +- app/views/users/show.html.haml | 95 +-------------------- doc/design/styles/main.css | 107 +++++++++++++++++++++++- 3 files changed, 112 insertions(+), 95 deletions(-) diff --git a/app/assets/stylesheets/design/main.scss b/app/assets/stylesheets/design/main.scss index ca43add8e..8bf6befa7 100644 --- a/app/assets/stylesheets/design/main.scss +++ b/app/assets/stylesheets/design/main.scss @@ -298,7 +298,7 @@ header div.droplist a:hover{ color: #575756; text-decoration: none; height: 34px; - padding: 0px 20px 6px 20px; + padding: 0px 20px 8px 20px; } .sub-menu nav ul li a.active { @@ -651,6 +651,9 @@ article div.all.bigpadding div.rightside { width: 70px; } +a.button.width81 { + width: 81px; +} /* Footer */ diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index c15a26a88..a9fd4332d 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,5 +1,7 @@ .left - = image_tag avatar_url(current_user, :big) + = image_tag avatar_url(@user, :big) + %br + = link_to t("layout.users.edit"), edit_user_path(@user), :class => 'button width81' if can? :edit, @user .left %h3= @user.uname = @user.name @@ -14,96 +16,5 @@ = link_to project.name, project %br - -.left - %br - = link_to t("layout.users.edit"), edit_user_path(@user), :class => 'button' if can? :edit, @user - :javascript $('article .all').addClass('verybigpadding'); - --#.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.uname") --# \: --# = @user.uname --# %p --# %b --# = t("activerecord.attributes.user.email") --# \: --# = @user.email --# %p --# %b --# = t("activerecord.attributes.user.created_at") --# \: --# = @user.created_at --# .wat-cf --# - if can? :edit, @user --# = link_to image_tag("code.png", :alt => t("layout.edit")) + " " + t("layout.edit"), edit_user_path(@user), :class => "button" --# - if can? :destroy, @user --# = link_to image_tag("x.png", :alt => t("layout.delete")) + " " + t("layout.delete"), user_path(@user), :method => "delete", :class => "button", :confirm => t("layout.users.confirm_delete") --# --#.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_user_platform_path(@user) --# .content --# %h2.title --# = t("layout.platforms.list_header") --# .inner --# = render :partial => 'shared/search_form' --# = render :partial => 'platforms/list', :object => @platforms --# .actions-bar.wat-cf --# .actions --# = will_paginate @platforms, :param_name => :platform_page --# --#-#.block --# .secondary-navigation --# %ul.wat-cf --# %li.first.active= link_to t("layout.repositories.list"), repositories_path --# %li= link_to t("layout.repositories.new"), new_user_repository_path(@user) --# .content --# %h2.title --# = t("layout.repositories.list_header") --# .inner --# = render :partial => 'shared/search_form' --# = render :partial => 'repositories/list', :object => @repositories --# .actions-bar.wat-cf --# .actions --# = will_paginate @repositories, :param_name => :repository_page --# --#.block --# .secondary-navigation --# %ul.wat-cf --# %li.first.active= link_to t("layout.projects.list"), projects_path --# %li= link_to t("layout.projects.new"), new_project_path --# .content --# %h2.title --# = t("layout.projects.list_header") --# .inner --# = render :partial => 'shared/search_form' --# = render :partial => 'projects/list', :object => @projects --# .actions-bar.wat-cf --# .actions --# = will_paginate @projects, :param_name => :project_page --# --#- content_for :sidebar, render('sidebar') diff --git a/doc/design/styles/main.css b/doc/design/styles/main.css index 48fb0593d..033707c2e 100644 --- a/doc/design/styles/main.css +++ b/doc/design/styles/main.css @@ -298,7 +298,7 @@ header div.droplist a:hover{ color: #575756; text-decoration: none; height: 34px; - padding: 0px 20px 6px 20px; + padding: 0px 20px 8px 20px; } .sub-menu nav ul li a.active { @@ -651,6 +651,10 @@ article div.all.bigpadding div.rightside { width: 70px; } +a.button.width81 { + width: 81px; +} + /* Footer */ @@ -1936,6 +1940,13 @@ img.delete-row { cursor: pointer; } +table tbody tr.error td { + background: #e7bcbc; +} + +table tbody tr.success td { + background: #e3edb7; +} /* Create group */ @@ -2121,7 +2132,7 @@ div.pagination a { /*404*/ article div.all.error404 { - background: url("../pics/404.png") no-repeat 59% 0; + background: url("../pics/404.png") no-repeat 49% 0; height: 500px; text-align: center; } @@ -2163,6 +2174,98 @@ article div.all.error404 p.search { width: 230px; } +/*500*/ + +article div.all.error500 { + background: url("../pics/500.png") no-repeat 49% 0; + height: 500px; + text-align: center; +} + +article div.all.error500 h1 { + margin: 0; + padding: 0; + margin-top: 135px; + font-size: 48px; + font-weight: normal; +} + +article div.all.error500 h1 span { + color: #4496d0; +} + +article div.all.error500 h2 { + margin: 0; + padding: 0; + margin-top: 5px; + font-size: 18px; + font-weight: normal; + text-align: left; + margin-left: 298px; +} + +article div.all.error500 p { + margin: 0 auto; + padding: 0; + text-align: center; + font-size: 14px; +} + +article div.all.error500 p.pages { + margin-top: 55px; + width: 280px; +} + +article div.all.error500 p.search { + margin-top: 80px; + width: 230px; +} + +/*503*/ + +article div.all.error503 { + background: url("../pics/503.png") no-repeat 50% 0; + height: 500px; + text-align: center; +} + +article div.all.error503 h1 { + margin: 0; + padding: 0; + margin-top: 395px; + font-size: 38px; + font-weight: normal; + text-align: center; + +} + +article div.all.error503 h1 span { + color: #4496d0; +} + +article div.all.error503 h2 { + margin: 0; + padding: 0; + margin-top: 25px; + font-size: 18px; + font-weight: normal; + text-align: left; + margin-left: 215px; +} + +article div.all.error503 { + min-height: 630px; +} + +article div.all.error503 h2 span { + color: #4496d0; +} + +div.wrap.tmargin30 { + margin-top: 30px; + min-height: 91%; +} + /*search*/ input.button.width100 {