Commit 1b5510a85e9dc59b6a8f1ad8e19539c563cfcb0a

Authored by Dmitriy Zaporozhets
1 parent a11d25b1

New project page with bootstrap3

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/views/dashboard/projects.html.haml
... ... @@ -25,28 +25,29 @@
25 25 All projects you have access to are listed here. Public projects are not included here unless you are a member
26 26 %hr
27 27 .row
28   - .col-md-3.hidden-sm.hidden-xs
29   - %ul.nav.nav-pills.nav-stacked
30   - = nav_tab :scope, nil do
31   - = link_to projects_dashboard_filter_path(scope: nil) do
32   - All
33   - %span.pull-right
34   - = current_user.authorized_projects.count
35   - = nav_tab :scope, 'personal' do
36   - = link_to projects_dashboard_filter_path(scope: 'personal') do
37   - Personal
38   - %span.pull-right
39   - = current_user.personal_projects.count
40   - = nav_tab :scope, 'joined' do
41   - = link_to projects_dashboard_filter_path(scope: 'joined') do
42   - Joined
43   - %span.pull-right
44   - = current_user.authorized_projects.joined(current_user).count
45   - = nav_tab :scope, 'owned' do
46   - = link_to projects_dashboard_filter_path(scope: 'owned') do
47   - Owned
48   - %span.pull-right
49   - = current_user.owned_projects.count
  28 + .col-md-3.hidden-sm.hidden-xs.side-filters
  29 + %fieldset
  30 + %ul.nav.nav-pills.nav-stacked
  31 + = nav_tab :scope, nil do
  32 + = link_to projects_dashboard_filter_path(scope: nil) do
  33 + All
  34 + %span.pull-right
  35 + = current_user.authorized_projects.count
  36 + = nav_tab :scope, 'personal' do
  37 + = link_to projects_dashboard_filter_path(scope: 'personal') do
  38 + Personal
  39 + %span.pull-right
  40 + = current_user.personal_projects.count
  41 + = nav_tab :scope, 'joined' do
  42 + = link_to projects_dashboard_filter_path(scope: 'joined') do
  43 + Joined
  44 + %span.pull-right
  45 + = current_user.authorized_projects.joined(current_user).count
  46 + = nav_tab :scope, 'owned' do
  47 + = link_to projects_dashboard_filter_path(scope: 'owned') do
  48 + Owned
  49 + %span.pull-right
  50 + = current_user.owned_projects.count
50 51  
51 52 %fieldset
52 53 %legend Visibility
... ...
app/views/layouts/_head_panel.html.haml
... ... @@ -8,34 +8,35 @@
8 8 %span.separator
9 9 %h1.project_name= title
10 10  
11   - %ul.nav.navbar-nav
12   - %li
13   - %a
14   - %div.gl-hide.turbolink-spinner
15   - %i.icon-refresh.icon-spin
16   - Loading...
17   - %li.hidden-sm
18   - = render "layouts/search"
19   - %li
20   - = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
21   - %i.icon-globe
22   - %li
23   - = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
24   - %i.icon-paste
25   - - if current_user.is_admin?
  11 + .navbar-collapse.collapse
  12 + %ul.nav.navbar-nav
26 13 %li
27   - = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
28   - %i.icon-cogs
29   - - if current_user.can_create_project?
  14 + %a
  15 + %div.gl-hide.turbolink-spinner
  16 + %i.icon-refresh.icon-spin
  17 + Loading...
  18 + %li.hidden-sm
  19 + = render "layouts/search"
30 20 %li
31   - = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do
32   - %i.icon-plus
33   - %li
34   - = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do
35   - %i.icon-user
36   - %li
37   - = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
38   - %i.icon-signout
39   - %li
40   - = link_to current_user, class: "profile-pic", id: 'profile-pic' do
41   - = image_tag avatar_icon(current_user.email, 26), alt: 'User activity'
  21 + = link_to public_root_path, title: "Public area", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
  22 + %i.icon-globe
  23 + %li
  24 + = link_to user_snippets_path(current_user), title: "My snippets", class: 'has_bottom_tooltip', 'data-original-title' => 'Public area' do
  25 + %i.icon-paste
  26 + - if current_user.is_admin?
  27 + %li
  28 + = link_to admin_root_path, title: "Admin area", class: 'has_bottom_tooltip', 'data-original-title' => 'Admin area' do
  29 + %i.icon-cogs
  30 + - if current_user.can_create_project?
  31 + %li
  32 + = link_to new_project_path, title: "New project", class: 'has_bottom_tooltip', 'data-original-title' => 'New project' do
  33 + %i.icon-plus
  34 + %li
  35 + = link_to profile_path, title: "Profile settings", class: 'has_bottom_tooltip', 'data-original-title' => 'Profile settings"' do
  36 + %i.icon-user
  37 + %li
  38 + = link_to destroy_user_session_path, class: "logout", method: :delete, title: "Logout", class: 'has_bottom_tooltip', 'data-original-title' => 'Logout' do
  39 + %i.icon-signout
  40 + %li
  41 + = link_to current_user, class: "profile-pic", id: 'profile-pic' do
  42 + = image_tag avatar_icon(current_user.email, 26), alt: 'User activity'
... ...
app/views/projects/_visibility_level.html.haml
1 1 .form-group.project-visibility-level-holder
2   - = f.label :visibility_level do
  2 + = f.label :visibility_level, class: 'control-label' do
3 3 Visibility Level
4 4 = link_to "(?)", help_public_access_path
5   - - if can_change_visibility_level
6   - - Gitlab::VisibilityLevel.values.each do |level|
7   - - restricted = restricted_visibility_levels.include?(level)
8   - .col-sm-10
9   - = f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted
10   - %span.descr{:class => ("restricted" if restricted)}
11   - = label :project_visibility_level, level do
12   - = visibility_level_icon(level)
13   - %strong
14   - = visibility_level_label(level)
15   - .light= visibility_level_description(level)
16   - - unless restricted_visibility_levels.empty?
  5 + .col-sm-10
  6 + - if can_change_visibility_level
  7 + - Gitlab::VisibilityLevel.values.each do |level|
  8 + .append-bottom-10
  9 + - restricted = restricted_visibility_levels.include?(level)
  10 + = f.radio_button :visibility_level, level, checked: (visibility_level == level), disabled: restricted
  11 + %span.descr{:class => ("restricted" if restricted)}
  12 + = label :project_visibility_level, level do
  13 + = visibility_level_icon(level)
  14 + %strong
  15 + = visibility_level_label(level)
  16 + .light.prepend-left-20= visibility_level_description(level)
  17 + - unless restricted_visibility_levels.empty?
  18 + .col-sm-10
  19 + %span.info
  20 + Some visibility level settings have been restricted by the administrator.
  21 + - else
17 22 .col-sm-10
18 23 %span.info
19   - Some visibility level settings have been restricted by the administrator.
20   - - else
21   - .col-sm-10
22   - %span.info
23   - = visibility_level_icon(visibility_level)
24   - %strong
25   - = visibility_level_label(visibility_level)
26   - .light= visibility_level_description(visibility_level)
  24 + = visibility_level_icon(visibility_level)
  25 + %strong
  26 + = visibility_level_label(visibility_level)
  27 + .light= visibility_level_description(visibility_level)
... ...
app/views/projects/new.html.haml
... ... @@ -3,50 +3,51 @@
3 3 = render 'projects/errors'
4 4 .project-edit-content
5 5  
6   - = form_for @project, remote: true do |f|
  6 + = form_for @project, remote: true, html: { class: 'new_project form-horizontal' } do |f|
7 7 .form-group.project-name-holder
8   - = f.label :name do
  8 + = f.label :name, class: 'control-label' do
9 9 %strong Project name
10 10 .col-sm-10
11   - = f.text_field :name, placeholder: "Example Project", class: "input-lg", tabindex: 1, autofocus: true
  11 + = f.text_field :name, placeholder: "Example Project", class: "form-control", tabindex: 1, autofocus: true
12 12 %span.help-inline
13 13 = link_to "#", class: 'js-toggle-visibility-link' do
14 14 %span Customize repository name?
15 15  
16 16 .form-group.js-toggle-visibility-container.gl-hide
17   - = f.label :path do
  17 + = f.label :path, class: 'control-label' do
18 18 %span Repository name
19 19 .col-sm-10
20   - .input-append
21   - = f.text_field :path
22   - %span.add-on .git
  20 + .input-group
  21 + = f.text_field :path, class: 'form-control'
  22 + %span.input-group-addon .git
23 23  
24 24  
25 25 - if current_user.can_select_namespace?
26 26 .form-group
27   - = f.label :namespace_id do
  27 + = f.label :namespace_id, class: 'control-label' do
28 28 %span Namespace
29 29 .col-sm-10
30 30 = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen', tabindex: 2}
31 31  
32 32 .form-group
  33 + .col-sm-2
33 34 .col-sm-10
34 35 = link_to "#", class: 'appear-link' do
35 36 %i.icon-upload-alt
36 37 %span Import existing repository?
37 38 .form-group.appear-data.import-url-data
38   - = f.label :import_url do
  39 + = f.label :import_url, class: 'control-label' do
39 40 %span Import existing repo
40 41 .col-sm-10
41   - = f.text_field :import_url, class: 'input-lg', placeholder: 'https://github.com/randx/six.git'
  42 + = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
42 43 .light
43 44 URL must be cloneable
44 45 .form-group
45   - = f.label :description do
  46 + = f.label :description, class: 'control-label' do
46 47 Description
47 48 %span.light (optional)
48 49 .col-sm-10
49   - = f.text_area :description, placeholder: "Awesome project", class: "input-lg", rows: 3, maxlength: 250, tabindex: 3
  50 + = f.text_area :description, placeholder: "Awesome project", class: "form-control", rows: 3, maxlength: 250, tabindex: 3
50 51 = render "visibility_level", f: f, visibility_level: gitlab_config.default_projects_features.visibility_level, can_change_visibility_level: true
51 52  
52 53 .form-actions
... ... @@ -54,7 +55,7 @@
54 55  
55 56 - if current_user.can_create_group?
56 57 .pull-right
57   - .col-sm-10.light
  58 + .light
58 59 Need a group for several dependent projects?
59 60 = link_to new_group_path, class: "btn btn-tiny" do
60 61 Create a group
... ...