Commit 15c46555274a14f3a90f0c8139e59cf1e96eccfc

Authored by Dmitriy Zaporozhets
1 parent 3b5a4fa2

UI: add new button, top panel restyle etc

app/assets/images/Arrow-Left-UI.PNG 0 → 100644

568 Bytes

app/assets/images/Gear-UI.PNG

1019 Bytes | W: | H:

940 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
app/assets/images/Home-UI.PNG

890 Bytes | W: | H:

782 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
app/assets/images/Info-UI.PNG 0 → 100644

800 Bytes

app/assets/images/Rss-UI.PNG 0 → 100644

789 Bytes

app/assets/images/add_new.png

288 Bytes | W: | H:

333 Bytes | W: | H:

  • 2-up
  • Swipe
  • Onion skin
app/assets/images/rss_icon_gray.png

844 Bytes

app/assets/stylesheets/projects.css.scss
... ... @@ -556,8 +556,13 @@ a.project-update.titled {
556 556 }
557 557  
558 558 .add_new {
559   - float:right;
560   - padding: 6px 12px;
  559 + float: right;
  560 + background: #A6B807;
  561 + color: white;
  562 + padding: 4px 10px;
  563 + @include round-borders-all(4px);
  564 + font-size:11px;
  565 + margin: 10px 0;
561 566 }
562 567  
563 568  
... ...
app/assets/stylesheets/style.scss
... ... @@ -125,7 +125,7 @@ table thead th{
125 125 td, th{ padding: .9em 1em; vertical-align: middle; }
126 126  
127 127 table thead .image{width:100px}
128   -table tr:hover, .listed_items tr.odd:hover{background-color:#FFFFCF}
  128 +.listed_items tr.odd:hover{background-color:#FFFFCF}
129 129 /* eo Tables */
130 130  
131 131 /* Buttons */
... ...
app/assets/stylesheets/top_panel.scss
1 1 .main_links {
2   - width:124px;
  2 + width:90px;
  3 + margin-right:40px;
3 4 float:left;
  5 + background:#ddd;
  6 + @include round-borders-all(8px);
  7 + border-color:#ccc;
  8 +
4 9 a {
5 10 position: relative;
6 11 float:left;
7   - padding: 4px;
8   -
9   - &.home {
10   - margin-right:15px;
11   - width: 26px;
12   - }
  12 + padding: 3px 10px;
13 13  
14   - &.admin {
15   - width: 21px;
  14 + img {
  15 + width: 22px;
16 16 }
17 17 }
18 18 }
... ... @@ -147,8 +147,9 @@ body header {
147 147  
148 148 .rss-icon {
149 149 margin:0 15px;
150   - padding:5px;
  150 + padding:3px;
151 151 border:1px solid #ccc;
152 152 border-radius:3px;
153 153 float:left;
  154 + background:#DDD;
154 155 }
... ...
app/assets/stylesheets/tree.scss
... ... @@ -113,3 +113,9 @@ table.highlighttable .linenodiv pre {
113 113 padding-right: 4px;
114 114 color:#888;
115 115 }
  116 +
  117 +.tree-item {
  118 + &:hover {
  119 + background: #FFFFCF;
  120 + }
  121 +}
... ...
app/controllers/help_controller.rb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +class HelpController < ApplicationController
  2 + def index
  3 + end
  4 +end
... ...
app/helpers/application_helper.rb
... ... @@ -89,4 +89,8 @@ module ApplicationHelper
89 89 def profile_layout
90 90 controller.controller_name == "dashboard" || current_page?(projects_path) || controller.controller_name == "profile" || controller.controller_name == "keys"
91 91 end
  92 +
  93 + def help_layout
  94 + controller.controller_name == "help"
  95 + end
92 96 end
... ...
app/views/commits/index.html.haml
... ... @@ -3,7 +3,7 @@
3 3 = content_for :rss_icon do
4 4 .rss-icon
5 5 = link_to project_commits_path(@project, :atom, { :private_token => current_user.private_token, :ref => @ref }) do
6   - = image_tag "rss_icon_gray.png", :width => 16, :title => "feed"
  6 + = image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
7 7  
8 8 - if params[:path]
9 9 %h2
... ...
app/views/help/index.html.haml 0 → 100644
app/views/issues/_head.html.haml 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +.top-tabs
  2 + = link_to project_issues_path(@project), :class => "tab #{'active' if current_page?(project_issues_path(@project)) }" do
  3 + %span
  4 + Issues
  5 +
  6 + -#= link_to project_issues_path(@project), :class => "tab" do
  7 + %span
  8 + Milestones
  9 +
  10 + - if current_page?(project_issues_path(@project))
  11 + - if can? current_user, :write_issue, @project
  12 + = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do
  13 + Add new
  14 +
... ...
app/views/issues/index.html.haml
1   -.top-tabs
2   - = link_to project_issues_path(@project), :class => "tab #{'active' if current_page?(project_issues_path(@project)) }" do
3   - %span
4   - Issues
5   -
6   - -#= link_to project_issues_path(@project), :class => "tab" do
7   - %span
8   - Milestones
9   -
10   - - if current_page?(project_issues_path(@project))
11   - - if can? current_user, :write_issue, @project
12   - = link_to new_project_issue_path(@project), :class => "add_new", :title => "New Issue", :remote => true do
13   - = image_tag "add_new.png", :width => 14
14   -
15   -
  1 += render "issues/head"
16 2 - if current_user.private_token
17 3 = content_for :rss_icon do
18 4 .rss-icon
19 5 = link_to project_issues_path(@project, :atom, { :private_token => current_user.private_token }) do
20   - = image_tag "rss_icon_gray.png", :width => 16, :title => "feed"
  6 + = image_tag "Rss-UI.PNG", :width => 22, :title => "feed"
21 7  
22 8 %div#issues-table-holder
23 9 .top_panel_issues
... ...
app/views/layouts/_head_panel.html.haml
... ... @@ -4,10 +4,9 @@
4 4 .top_panel_content
5 5 %div.main_links
6 6 = link_to root_path, :class => "home", :title => "Home" do
7   - = image_tag "Home-UI.PNG", :width => 26
8   - - if current_user.is_admin?
9   - = link_to admin_root_path, :class => "admin", :title => "Admin" do
10   - = image_tag "Gear-UI.PNG", :width => 20
  7 + = image_tag "Home-UI.PNG"
  8 + = link_to :back, :title => "Back" do
  9 + = image_tag "Arrow-Left-UI.PNG"
11 10  
12 11 - if project_layout
13 12 .project_name
... ... @@ -19,12 +18,16 @@
19 18 = render :partial => "projects/refs", :locals => { :destination => controller.controller_name == "commits" ? "commits" : "tree" }
20 19 = yield :rss_icon
21 20  
22   - - elsif profile_layout
  21 + - else
23 22 .dashboard_links
24 23 = link_to "Activities", dashboard_path, :class => "#{"active" if current_page?(dashboard_path) || current_page?(root_path) }"
25 24 -#= link_to "Projects", projects_path, :class => "#{"active" if current_page?(projects_path)}"
26 25 = link_to "Issues", dashboard_issues_path, :class => "#{"active" if current_page?(dashboard_issues_path)}", :id => "issues_slide"
27   - = link_to "Merge Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
  26 + = link_to "Requests", dashboard_merge_requests_path, :class => "#{"active" if current_page?(dashboard_merge_requests_path)}", :id => "merge_requests_slide"
  27 + - if current_user.is_admin?
  28 + = link_to admin_root_path, :class => "admin", :title => "Admin" do
  29 + Admin
  30 + = link_to "Help", help_path, :class => "#{"active" if controller.controller_name == "help"}"
28 31 .search
29 32 = text_field_tag "search", nil, :placeholder => "Search", :class => "search-input"
30 33  
... ...
app/views/merge_requests/_head.html.haml 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +.top-tabs
  2 + = link_to project_merge_requests_path(@project), :class => "tab #{'active' if current_page?(project_merge_requests_path(@project)) }" do
  3 + %span
  4 + Merge Requests
  5 +
  6 +
  7 + - if current_page?(project_merge_requests_path(@project))
  8 + - if can? current_user, :write_merge_request, @project
  9 + = link_to new_project_merge_request_path(@project), :class => "add_new", :title => "New Merge request", :remote => true do
  10 + Add new
  11 +
  12 +
... ...
app/views/merge_requests/index.html.haml
1   -%h2.icon
2   - %span>
3   - Merge Requests
4   -.right= link_to 'New Merge request', new_project_merge_request_path(@project), :class => "grey-button"
  1 += render "merge_requests/head"
  2 +
5 3 - if @merge_requests.opened.count > 0
6 4 %div{ :class => "update-data ui-box ui-box-small ui-box-big" }
7 5 %h3
... ... @@ -21,3 +19,9 @@
21 19 .clear
22 20 %br
23 21  
  22 +- unless @merge_requests.count > 0
  23 + .notice_holder
  24 + %li Merge Requests do not exist yet.
  25 + - if can? current_user, :write_merge_request, @project
  26 + %li You can add a new one by clicking on "Add New" button
  27 +
... ...
app/views/projects/_project_head.html.haml
... ... @@ -18,10 +18,10 @@
18 18 - if current_page?(project_snippets_path(@project))
19 19 - if can? current_user, :write_snippet, @project
20 20 = link_to new_project_snippet_path(@project), :class => "add_new", :title => "New Snippet" do
21   - = image_tag "add_new.png", :width => 14
  21 + Add new
22 22  
23 23  
24 24 - if current_page?(team_project_path(@project))
25 25 - if can? current_user, :admin_team_member, @project
26 26 = link_to new_project_team_member_path(@project), :class => "add_new", :title => "New Team Member" do
27   - = image_tag "add_new.png", :width => 14
  27 + Add New
... ...
app/views/projects/_projects_top_menu.html.haml
... ... @@ -1,17 +0,0 @@
1   -%div.top_project_menu
2   - %span= link_to 'All', projects_path, :class => current_page?(projects_path) ? "current" : nil
3   - - if current_user.can_create_project?
4   - %span= link_to "New Project", new_project_path, :class => current_page?(:controller => "projects", :action => "new") ? "current" : nil
5   - %span.right
6   - = link_to_function(image_tag("list_view_icon.jpg"), "switchProjectView()", :style => "border:none;box-shadow:none;")
7   -
8   -:javascript
9   - function switchProjectView(){
10   - $(".tile").toggle();
11   - $(".list").toggle();
12   - if($(".tile").is(":visible")){
13   - $.cookie('project_view', 'tile', { expires: 14 });
14   - } else {
15   - $.cookie('project_view', 'list', { expires: 14 });
16   - }
17   - }
app/views/repositories/_head.html.haml
... ... @@ -19,10 +19,10 @@
19 19 - if current_page?(project_hooks_path(@project))
20 20 - if can? current_user, :admin_project, @project
21 21 = link_to new_project_hook_path(@project), :class => "add_new", :title => "New Web Hook" do
22   - = image_tag "add_new.png", :width => 14
  22 + Add new
23 23  
24 24 - if current_page?(project_deploy_keys_path(@project))
25 25 - if can? current_user, :admin_project, @project
26 26 = link_to new_project_deploy_key_path(@project), :class => "add_new", :title => "New Deploy Key" do
27   - = image_tag "add_new.png", :width => 14
  27 + Add new
28 28  
... ...
app/views/snippets/index.html.haml
... ... @@ -8,5 +8,5 @@
8 8 .notice_holder
9 9 %li Snippets do not exist yet.
10 10 - if can? current_user, :write_snippet, @project
11   - %li You can add a new one by clicking on plus icon
  11 + %li You can add a new one by clicking on "Add New" button
12 12  
... ...
app/views/team_members/_form.html.haml
... ... @@ -6,11 +6,11 @@
6 6 .entity-button
7 7 Team List
8 8 %i
9   - %h2= "New Team member"
  9 + %h3= "New Team member"
10 10  
11 11 %hr
12 12 -if @team_member.errors.any?
13   - %ul
  13 + %ul.errors_holder
14 14 - @team_member.errors.full_messages.each do |msg|
15 15 %li= msg
16 16  
... ...
app/views/team_members/new.html.haml
  1 += render "projects/project_head"
1 2 = render "team_members/form"
... ...
config/routes.rb
... ... @@ -6,6 +6,7 @@ Gitlab::Application.routes.draw do
6 6  
7 7 get 'tags'=> 'tags#index'
8 8 get 'tags/:tag' => 'projects#index'
  9 + get 'help' => 'help#index'
9 10  
10 11 namespace :admin do
11 12 resources :users
... ...