From 15c46555274a14f3a90f0c8139e59cf1e96eccfc Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 18 Jan 2012 22:15:45 +0200 Subject: [PATCH] UI: add new button, top panel restyle etc --- app/assets/images/Arrow-Left-UI.PNG | Bin 0 -> 568 bytes app/assets/images/Gear-UI.PNG | Bin 1019 -> 940 bytes app/assets/images/Home-UI.PNG | Bin 890 -> 782 bytes app/assets/images/Info-UI.PNG | Bin 0 -> 800 bytes app/assets/images/Rss-UI.PNG | Bin 0 -> 789 bytes app/assets/images/add_new.png | Bin 288 -> 333 bytes app/assets/images/rss_icon_gray.png | Bin 844 -> 0 bytes app/assets/stylesheets/projects.css.scss | 9 ++++++-- app/assets/stylesheets/style.scss | 2 +- app/assets/stylesheets/top_panel.scss | 21 +++++++++--------- app/assets/stylesheets/tree.scss | 6 +++++ app/controllers/help_controller.rb | 4 ++++ app/helpers/application_helper.rb | 4 ++++ app/views/commits/index.html.haml | 2 +- app/views/help/index.html.haml | 0 app/views/issues/_head.html.haml | 14 ++++++++++++ app/views/issues/index.html.haml | 18 ++------------- app/views/layouts/_head_panel.html.haml | 15 ++++++++----- app/views/merge_requests/_head.html.haml | 12 ++++++++++ app/views/merge_requests/index.html.haml | 12 ++++++---- app/views/projects/_project_head.html.haml | 4 ++-- .../projects/_projects_top_menu.html.haml | 17 -------------- app/views/repositories/_head.html.haml | 4 ++-- app/views/snippets/index.html.haml | 2 +- app/views/team_members/_form.html.haml | 4 ++-- app/views/team_members/new.html.haml | 1 + config/routes.rb | 1 + 27 files changed, 88 insertions(+), 64 deletions(-) create mode 100644 app/assets/images/Arrow-Left-UI.PNG create mode 100644 app/assets/images/Info-UI.PNG create mode 100644 app/assets/images/Rss-UI.PNG delete mode 100644 app/assets/images/rss_icon_gray.png create mode 100644 app/controllers/help_controller.rb create mode 100644 app/views/help/index.html.haml create mode 100644 app/views/issues/_head.html.haml create mode 100644 app/views/merge_requests/_head.html.haml delete mode 100644 app/views/projects/_projects_top_menu.html.haml diff --git a/app/assets/images/Arrow-Left-UI.PNG b/app/assets/images/Arrow-Left-UI.PNG new file mode 100644 index 0000000000000000000000000000000000000000..80a34b411f1ddc9ec58f0a6a3ef1e16950125eb9 GIT binary patch literal 568 zcmeAS@N?(olHy`uVBq!ia0y~yV2}b~4mJh`hLv7E=NK3m7>k44ofy`glX=O&z`&N| z?e47(?><^x-VtmumLiw@@)^BY4wy;mC9cCb2VK2`dVXn%jHB(I~=qh(9Vd5@e; zO%I$9#AW5MYxe=>+s9QU>we#3+x9&4%(vrFub-9Z7p@Ro)3;8Q9F8S2+!2cHO|2v1>%LFfOj$o8y?*H@rq||D$DW)@|R*XCv=nW)*QgsEU0D^BsAQ=Nlyh zy%de>Z`Eb|uJYa$c+jdLDm&i&N>sczSHkUWX(G@0Zx_FPw!b=|%=Jj>1IdDIhOcYY zXYSnn!sd0F=>apjd(5v7EVnh97gdsw_AJLuurW94&pD4O)|iZEmuLP=opNycOpird zm!Cf%wIOkKrSz+K-ZDl>zZ>@^l;|4o@B5c7!E-o&(z;vstgg%tn6Khq_m}DS`8#|o U*rq>WU|?YIboFyt=akR{02S}?0{{R3 literal 0 HcmV?d00001 diff --git a/app/assets/images/Gear-UI.PNG b/app/assets/images/Gear-UI.PNG index c1d84e06da6f50f656780aaa2750950fcf0cf1f0..7720f0eb21a3688ff8341a2e9d5d691b624c7566 100644 GIT binary patch delta 857 zcmey(zJ`55LcNfXHq*-%ZEgkzW*tu##}JR>ORxE_2n`is`*44!oha|6?@erpF3q!* zrCoYYojCI@cER6+OB@AVc$K7MIyzcTI61%YUDA|uVaY6)mWdnBX?IsOX9P6=b7WTS zE}HUdQD@q(S#MS!f4uj7jY$p1Q*D7HO; zOMRoZad|(BmUMjY`wg=3$@cZ@ve#$d{L}GM-{|wRXYHMAC$efn*1gf4p10V;=7!9b z(pou=^5op^hkuloOQye8exw!Cz3cw_|Mz^_$~P?E`f)$&O#S`qAI0wJ^ev5z7g^kE zQPEi_VSZgseVd=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>T`ZiSyG;xKkW(Ms=Hnlaz9Rg3Pogu*&(pYS%WMmwFFm6S9N1zWv=eTh*3hPsZ;kPus66-|2jCn7vBOHa*D8T`Kk3 zzI&W=Shs!s>U&`Qw*2#!@eC5Lv){d|n=tLI#?m|7J=d3nHO$?1{5qGw)z4cZFX=j{ zUnmmySo*#`%+udA{rvPFca$;@H*`P9zr9-g^^Fzg+m{q?>u2!opVlCGJKyt`m4c<7 zG)Kf4OMRy9we$YnwDQj8kGRiz`?39||Lhkw{P&+Pk44ofy`glX=O&z`&N| z?e4ee^^qHT}&iwgo_Tv+g zlT>=Sk$h<;GXrlQ;7|MpmULuEpkOIyRaNcM(HCP%CLJA9(crfV^D z?fcFod|*-sPxbrnjXPufmo@$_^9YRG&&?a6t&%R3c|Y}>)PI2&s})YPGbC-}SR?Yol3AKbj=AD}XV0O>Gv`gY zxuCwEIzjwtZK6GefTwD}#`FUp^-j)Zou%|>&c(vL-Usv- zqLfAn$nBd+Z|W7?D)fb`@oV_=ic6SS9A3~uu>)>YH_{m zKmCwWt(@B$zTZ!+UKQVv9d_u=n;p&<>>JLoPf+pvaPPmRO5fuRr_M8Xz7-Ci%yBTE zy<+96;Gfq6+$HyXSMh9GdtdN@=7+Uxhhvs~ocvJjr+Rqmv29yseY2A=HG0xsc<{#d zHLL7DFVdQ&MBb@ E0G6&{3IG5A literal 0 HcmV?d00001 diff --git a/app/assets/images/Rss-UI.PNG b/app/assets/images/Rss-UI.PNG new file mode 100644 index 0000000000000000000000000000000000000000..2116571ebbc705820beed79c20e6232ceebc6b11 GIT binary patch literal 789 zcmeAS@N?(olHy`uVBq!ia0y~yV2}b~4mJh`hLv7E=NK3m7>k44ofy`glX=O&z`&N| z?e4Giw5*6*#)lheL;u4ZR@H>djk z&v)hj?q%7?MaRY6>)pHJ%^IJAN)xHIp@JKw*C#&NKQUEiHTUGe*KF1&-8Sysp0_i5 zQ}1iF{~we>U)Pwv$T`3^t-v=@{?ObVqNT?@t}^rREX&DDc_tm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ss_icon_gray.png deleted file mode 100644 index 90e509aa4bd1feadf19b1603495b9f8dd1e5bbca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 844 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|4rT@hhU+WOo?>8NU@Q)DcVbv~PUa;817lc# zPl#(())3I(5^gO>5V#UB7<)>eZ`Pty;Bo>C#1u7Oh#c zX64G2D^{#nym;~a`SX`AU%qVFvN?0+Oq(`s$&w{==gwWQV8N_evlcE~ICJLA88c=~ zo;-Qpym^x*O`1M^`oxJ7XV0EJVZwwdQ>HXGH+Oe;_xJaAc6PS6xA*q;Zr;4Pv9YnK zsi~)@r=z2zudlDQwY8vuE$zxl>nH_v+QFCr_TdeEIU;y?gK9zdwEY^sZgI?%%(E_wL;b z7cSJ-*PlFja{vDQJ9q9papJ_`!-tO_KmO&*mxBine*gY``}Xa-ckh1w{Q0(R+YTK% zbnMu%J$v>%e*F0M?c1kLojP#fz}~%kA3b_>^XAPRJ9a#H@ZiXiBTt_`y?XWP(W6J7 zJ$rWf^5q*hZv6Q1i(`n!`PfOf{hA#_T-zHDF*tiK zyfCe)A!e0o*rIDIIy*BL_3GC(CCB>7lSe zzUKY$6X9%@-K$z6s)AYhPAva;_4H(;Hiv!Rru#d~rG8{(d3R8@e*UM-6K58+S={6Q zukge>N?-34-=XQ?Z90QbukU-X*^TGF zq&{yqxBe4#x=d4D^KAF(ciYteow%A@aDe&4=bEn)61P9ryPkh8eq^meantwQBMb}- N44$rjF6*2UngFXH%g+D+ diff --git a/app/assets/stylesheets/projects.css.scss b/app/assets/stylesheets/projects.css.scss index d6aaec73e6e..eae9383a02e 100644 --- a/app/assets/stylesheets/projects.css.scss +++ b/app/assets/stylesheets/projects.css.scss @@ -556,8 +556,13 @@ a.project-update.titled { } .add_new { - float:right; - padding: 6px 12px; + float: right; + background: #A6B807; + color: white; + padding: 4px 10px; + @include round-borders-all(4px); + font-size:11px; + margin: 10px 0; } diff --git a/app/assets/stylesheets/style.scss b/app/assets/stylesheets/style.scss index 01ef6c345d0..a360b21aea4 100644 --- a/app/assets/stylesheets/style.scss +++ b/app/assets/stylesheets/style.scss @@ -125,7 +125,7 @@ table thead th{ td, th{ padding: .9em 1em; vertical-align: middle; } table thead .image{width:100px} -table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF} +.listed_items tr.odd:hover{background-color:#FFFFCF} /* eo Tables */ /* Buttons */ diff --git a/app/assets/stylesheets/top_panel.scss b/app/assets/stylesheets/top_panel.scss index 98f5ab4c454..2490aa9226a 100644 --- a/app/assets/stylesheets/top_panel.scss +++ b/app/assets/stylesheets/top_panel.scss @@ -1,18 +1,18 @@ .main_links { - width:124px; + width:90px; + margin-right:40px; float:left; + background:#ddd; + @include round-borders-all(8px); + border-color:#ccc; + a { position: relative; float:left; - padding: 4px; - - &.home { - margin-right:15px; - width: 26px; - } + padding: 3px 10px; - &.admin { - width: 21px; + img { + width: 22px; } } } @@ -147,8 +147,9 @@ body header { .rss-icon { margin:0 15px; - padding:5px; + padding:3px; border:1px solid #ccc; border-radius:3px; float:left; + background:#DDD; } diff --git a/app/assets/stylesheets/tree.scss b/app/assets/stylesheets/tree.scss index 42eb060f8fd..57070871680 100644 --- a/app/assets/stylesheets/tree.scss +++ b/app/assets/stylesheets/tree.scss @@ -113,3 +113,9 @@ table.highlighttable .linenodiv pre { padding-right: 4px; color:#888; } + +.tree-item { + &:hover { + background: #FFFFCF; + } +} diff --git a/app/controllers/help_controller.rb b/app/controllers/help_controller.rb new file mode 100644 index 00000000000..b22280d2fd2 --- /dev/null +++ b/app/controllers/help_controller.rb @@ -0,0 +1,4 @@ +class HelpController < ApplicationController + def index + end +end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0e4ad533ad7..9f0f1e68954 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -89,4 +89,8 @@ module ApplicationHelper def profile_layout controller.controller_name == "dashboard" || current_page?(projects_path) || controller.controller_name == "profile" || controller.controller_name == "keys" end + + def help_layout + controller.controller_name == "help" + end end diff --git a/app/views/commits/index.html.haml b/app/views/commits/index.html.haml index 0c93f163787..5a760b3a2dc 100644 --- a/app/views/commits/index.html.haml +++ b/app/views/commits/index.html.haml @@ -3,7 +3,7 @@ = content_for :rss_icon do .rss-icon = link_to project_commits_path(@project, :atom, { :private_token => current_user.private_token, :ref => @ref }) do - = image_tag "rss_icon_gray.png", :width => 16, :title => "feed" + = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" - if params[:path] %h2 diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml new file mode 100644 index 00000000000..e69de29bb2d diff --git a/app/views/issues/_head.html.haml b/app/views/issues/_head.html.haml new file mode 100644 index 00000000000..7d44b87564f --- /dev/null +++ b/app/views/issues/_head.html.haml @@ -0,0 +1,14 @@ +.top-tabs + = link_to project_issues_path(@project), :class => "tab #{'active' if current_page?(project_issues_path(@project)) }" do + %span + Issues + + -#= link_to project_issues_path(@project), :class => "tab" do + %span + Milestones + + - if current_page?(project_issues_path(@project)) + - if can? current_user, :write_issue, @project + = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do + Add new + diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml index 4d9109aac19..d55e07f1adb 100644 --- a/app/views/issues/index.html.haml +++ b/app/views/issues/index.html.haml @@ -1,23 +1,9 @@ -.top-tabs - = link_to project_issues_path(@project), :class => "tab #{'active' if current_page?(project_issues_path(@project)) }" do - %span - Issues - - -#= link_to project_issues_path(@project), :class => "tab" do - %span - Milestones - - - if current_page?(project_issues_path(@project)) - - if can? current_user, :write_issue, @project - = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do - = image_tag "add_new.png", :width => 14 - - += render "issues/head" - if current_user.private_token = content_for :rss_icon do .rss-icon = link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do - = image_tag "rss_icon_gray.png", :width => 16, :title => "feed" + = image_tag "Rss-UI.PNG", :width => 22, :title => "feed" %div#issues-table-holder .top_panel_issues diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml index ac90dec00a1..101b411072f 100644 --- a/app/views/layouts/_head_panel.html.haml +++ b/app/views/layouts/_head_panel.html.haml @@ -4,10 +4,9 @@ .top_panel_content %div.main_links = link_to root_path, :class => "home", :title => "Home" do - = image_tag "Home-UI.PNG", :width => 26 - - if current_user.is_admin? - = link_to admin_root_path, :class => "admin", :title => "Admin" do - = image_tag "Gear-UI.PNG", :width => 20 + = image_tag "Home-UI.PNG" + = link_to :back, :title => "Back" do + = image_tag "Arrow-Left-UI.PNG" - if project_layout .project_name @@ -19,12 +18,16 @@ = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" } = yield :rss_icon - - elsif profile_layout + - else .dashboard_links = link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }" -#= link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}" = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide" - = link_to "Merge Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" + = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide" + - if current_user.is_admin? + = link_to admin_root_path, :class => "admin", :title => "Admin" do + Admin + = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}" .search = text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" diff --git a/app/views/merge_requests/_head.html.haml b/app/views/merge_requests/_head.html.haml new file mode 100644 index 00000000000..bbf54da2725 --- /dev/null +++ b/app/views/merge_requests/_head.html.haml @@ -0,0 +1,12 @@ +.top-tabs + = link_to project_merge_requests_path(@project), :class => "tab #{'active' if current_page?(project_merge_requests_path(@project)) }" do + %span + Merge Requests + + + - if current_page?(project_merge_requests_path(@project)) + - if can? current_user, :write_merge_request, @project + = link_to new_project_merge_request_path(@project), :class => "add_new", :title => "New Merge request", :remote => true do + Add new + + diff --git a/app/views/merge_requests/index.html.haml b/app/views/merge_requests/index.html.haml index edc223ba684..dc8ddf07511 100644 --- a/app/views/merge_requests/index.html.haml +++ b/app/views/merge_requests/index.html.haml @@ -1,7 +1,5 @@ -%h2.icon - %span> - Merge Requests -.right= link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button" += render "merge_requests/head" + - if @merge_requests.opened.count > 0 %div{ :class => "update-data ui-box ui-box-small ui-box-big" } %h3 @@ -21,3 +19,9 @@ .clear %br +- unless @merge_requests.count > 0 + .notice_holder + %li Merge Requests do not exist yet. + - if can? current_user, :write_merge_request, @project + %li You can add a new one by clicking on "Add New" button + diff --git a/app/views/projects/_project_head.html.haml b/app/views/projects/_project_head.html.haml index 6478853d77d..cbcd0660e10 100644 --- a/app/views/projects/_project_head.html.haml +++ b/app/views/projects/_project_head.html.haml @@ -18,10 +18,10 @@ - if current_page?(project_snippets_path(@project)) - if can? current_user, :write_snippet, @project = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do - = image_tag "add_new.png", :width => 14 + Add new - if current_page?(team_project_path(@project)) - if can? current_user, :admin_team_member, @project = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member" do - = image_tag "add_new.png", :width => 14 + Add New diff --git a/app/views/projects/_projects_top_menu.html.haml b/app/views/projects/_projects_top_menu.html.haml deleted file mode 100644 index 9e199183b15..00000000000 --- a/app/views/projects/_projects_top_menu.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -%div.top_project_menu - %span= link_to 'All', projects_path, :class => current_page?(projects_path) ? "current" : nil - - if current_user.can_create_project? - %span= link_to "New Project", new_project_path, :class => current_page?(:controller => "projects", :action => "new") ? "current" : nil - %span.right - = link_to_function(image_tag("list_view_icon.jpg"), "switchProjectView()", :style => "border:none;box-shadow:none;") - -:javascript - function switchProjectView(){ - $(".tile").toggle(); - $(".list").toggle(); - if($(".tile").is(":visible")){ - $.cookie('project_view', 'tile', { expires: 14 }); - } else { - $.cookie('project_view', 'list', { expires: 14 }); - } - } diff --git a/app/views/repositories/_head.html.haml b/app/views/repositories/_head.html.haml index 7b476362bed..0095098e894 100644 --- a/app/views/repositories/_head.html.haml +++ b/app/views/repositories/_head.html.haml @@ -19,10 +19,10 @@ - if current_page?(project_hooks_path(@project)) - if can? current_user, :admin_project, @project = link_to new_project_hook_path(@project), :class => "add_new", :title => "New Web Hook" do - = image_tag "add_new.png", :width => 14 + Add new - if current_page?(project_deploy_keys_path(@project)) - if can? current_user, :admin_project, @project = link_to new_project_deploy_key_path(@project), :class => "add_new", :title => "New Deploy Key" do - = image_tag "add_new.png", :width => 14 + Add new diff --git a/app/views/snippets/index.html.haml b/app/views/snippets/index.html.haml index c7c4c6b1324..1021dd1f597 100644 --- a/app/views/snippets/index.html.haml +++ b/app/views/snippets/index.html.haml @@ -8,5 +8,5 @@ .notice_holder %li Snippets do not exist yet. - if can? current_user, :write_snippet, @project - %li You can add a new one by clicking on plus icon + %li You can add a new one by clicking on "Add New" button diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml index e3ba64c5fad..2a299fd0ba3 100644 --- a/app/views/team_members/_form.html.haml +++ b/app/views/team_members/_form.html.haml @@ -6,11 +6,11 @@ .entity-button Team List %i - %h2= "New Team member" + %h3= "New Team member" %hr -if @team_member.errors.any? - %ul + %ul.errors_holder - @team_member.errors.full_messages.each do |msg| %li= msg diff --git a/app/views/team_members/new.html.haml b/app/views/team_members/new.html.haml index 4f70fb4b046..40eb4cebf08 100644 --- a/app/views/team_members/new.html.haml +++ b/app/views/team_members/new.html.haml @@ -1 +1,2 @@ += render "projects/project_head" = render "team_members/form" diff --git a/config/routes.rb b/config/routes.rb index 3a4018d5cff..4f0e6fcbeae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,7 @@ Gitlab::Application.routes.draw do get 'tags'=> 'tags#index' get 'tags/:tag' => 'projects#index' + get 'help' => 'help#index' namespace :admin do resources :users -- GitLab