diff options
author | Dennis Tang <dtang@gitlab.com> | 2018-12-07 14:11:42 +0000 |
---|---|---|
committer | Dennis Tang <dtang@gitlab.com> | 2018-12-07 14:11:42 +0000 |
commit | 75496059a1c36c2139bf29fa20fd4370c511fdd1 (patch) | |
tree | 5280f0a090b8bc445e03a7c6e74ff06d6d4edbce /app/views/shared | |
parent | 61d91f640b94d6e273dee502b77e723b599ab86c (diff) | |
download | gitlab-ce-75496059a1c36c2139bf29fa20fd4370c511fdd1.tar.gz |
Further design iteration on project overview
Continues the iteration on the project overview UI:
- moved star, fork and new clone button
(copy SSH/HTTPS URLs) to top right,
made them smaller
- avatar is now larger (64px)
- 'Request access' is now a link instead
of a button
- overview comes before the description +
changed styling and added icons
- description font-size is now 16px (large-paragraph)
- quick links to files are moved downwards
below the commit/pipeline info
- margins changed to group content into
4 groups to clean up the interface
- visibility info reduced to icon-only and
moved to the right of the title
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_mobile_clone_panel.html.haml | 12 | ||||
-rw-r--r-- | app/views/shared/members/_access_request_links.html.haml | 17 | ||||
-rw-r--r-- | app/views/shared/notifications/_button.html.haml | 6 |
3 files changed, 27 insertions, 8 deletions
diff --git a/app/views/shared/_mobile_clone_panel.html.haml b/app/views/shared/_mobile_clone_panel.html.haml index 998985cabe1..b43662947a8 100644 --- a/app/views/shared/_mobile_clone_panel.html.haml +++ b/app/views/shared/_mobile_clone_panel.html.haml @@ -1,13 +1,13 @@ - project = project || @project - ssh_copy_label = _("Copy SSH clone URL") -- http_copy_label = _("Copy HTTPS clone URL") +- http_copy_label = _('Copy %{http_label} clone URL') % { http_label: gitlab_config.protocol.upcase } -.btn-group.mobile-git-clone.js-mobile-git-clone - = clipboard_button(button_text: default_clone_label, target: '#project_clone', hide_button_icon: true, class: "input-group-text clone-dropdown-btn js-clone-dropdown-label btn btn-default") - %button.btn.btn-default.dropdown-toggle.js-dropdown-toggle{ type: "button", data: { toggle: "dropdown" } } - = icon("caret-down", class: "dropdown-btn-icon") +.btn-group.mobile-git-clone.js-mobile-git-clone.btn-block + = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "btn-primary flex-fill bold justify-content-center input-group-text clone-dropdown-btn js-clone-dropdown-label") + %button.btn.btn-primary.dropdown-toggle.js-dropdown-toggle{ type: "button", data: { toggle: "dropdown" } } + = sprite_icon("arrow-down", css_class: "dropdown-btn-icon icon") %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } } %li - = dropdown_item_with_description(ssh_copy_label, project.ssh_url_to_repo, href: project.ssh_url_to_repo, data: { clone_type: 'ssh' }) + = dropdown_item_with_description(ssh_copy_label, project.ssh_url_to_repo, href: project.ssh_url_to_repo, data: { clone_type: 'ssh' }, default: true) %li = dropdown_item_with_description(http_copy_label, project.http_url_to_repo, href: project.http_url_to_repo, data: { clone_type: 'http' }) diff --git a/app/views/shared/members/_access_request_links.html.haml b/app/views/shared/members/_access_request_links.html.haml new file mode 100644 index 00000000000..f7227b9101e --- /dev/null +++ b/app/views/shared/members/_access_request_links.html.haml @@ -0,0 +1,17 @@ +- model_name = source.model_name.to_s.downcase + +- if can?(current_user, :"destroy_#{model_name}_member", source.members.find_by(user_id: current_user.id)) # rubocop: disable CodeReuse/ActiveRecord + - link_text = source.is_a?(Group) ? _('Leave group') : _('Leave project') + = link_to link_text, polymorphic_path([:leave, source, :members]), + method: :delete, + data: { confirm: leave_confirmation_message(source) }, + class: 'access-request-link' +- elsif requester = source.requesters.find_by(user_id: current_user.id) # rubocop: disable CodeReuse/ActiveRecord + = link_to _('Withdraw Access Request'), polymorphic_path([:leave, source, :members]), + method: :delete, + data: { confirm: remove_member_message(requester) }, + class: 'access-request-link' +- elsif source.request_access_enabled && can?(current_user, :request_access, source) + = link_to _('Request Access'), polymorphic_path([:request_access, source, :members]), + method: :post, + class: 'access-request-link' diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml index f6c7ca70ebd..30860988bbb 100644 --- a/app/views/shared/notifications/_button.html.haml +++ b/app/views/shared/notifications/_button.html.haml @@ -1,3 +1,5 @@ +- btn_class = local_assigns.fetch(:btn_class, nil) + - if notification_setting .js-notification-dropdown.notification-dropdown.project-action-button.dropdown.inline = form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f| @@ -6,14 +8,14 @@ .js-notification-toggle-btns %div{ class: ("btn-group" if notification_setting.custom?) } - if notification_setting.custom? - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } + %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: _("Notification setting"), class: "#{btn_class}", "aria-label" => _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) }, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } = icon("bell", class: "js-notification-loading") = notification_title(notification_setting.level) %button.btn.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } = icon('caret-down') .sr-only Toggle dropdown - else - %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } + %button.dropdown-new.btn.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: "Notification setting", class: "#{btn_class}", "aria-label" => "Notification setting: #{notification_title(notification_setting.level)}", data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } = icon("bell", class: "js-notification-loading") = notification_title(notification_setting.level) = icon("caret-down") |