Commit 1a0a687f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Improve UI for explore projects page

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 617bb109
...@@ -79,6 +79,10 @@ ...@@ -79,6 +79,10 @@
> .dropdown { > .dropdown {
margin-right: $gl-padding-top; margin-right: $gl-padding-top;
display: inline-block; display: inline-block;
&:last-child {
margin-right: 0;
}
} }
> .btn { > .btn {
......
.pull-right.hidden-sm.hidden-xs - if current_user
- if current_user .dropdown
.dropdown.inline.append-right-10 %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %i.fa.fa-globe
%i.fa.fa-globe %span.light Visibility:
%span.light Visibility: - if params[:visibility_level].present?
- if params[:visibility_level].present? = visibility_level_label(params[:visibility_level].to_i)
= visibility_level_label(params[:visibility_level].to_i) - else
- else Any
%b.caret
%ul.dropdown-menu
%li
= link_to explore_projects_filter_path(visibility_level: nil) do
Any Any
%b.caret - Gitlab::VisibilityLevel.values.each do |level|
%ul.dropdown-menu %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
%li = link_to explore_projects_filter_path(visibility_level: level) do
= link_to explore_projects_filter_path(visibility_level: nil) do = visibility_level_icon(level)
Any = visibility_level_label(level)
- Gitlab::VisibilityLevel.values.each do |level|
%li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
= link_to explore_projects_filter_path(visibility_level: level) do
= visibility_level_icon(level)
= visibility_level_label(level)
- if @tags.present? - if @tags.present?
.dropdown.inline.append-right-10 .dropdown
%a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"}
%i.fa.fa-tags %i.fa.fa-tags
%span.light Tags: %span.light Tags:
- if params[:tag].present? - if params[:tag].present?
= params[:tag] = params[:tag]
- else - else
Any
%b.caret
%ul.dropdown-menu
%li
= link_to explore_projects_filter_path(tag: nil) do
Any Any
%b.caret
%ul.dropdown-menu
%li
= link_to explore_projects_filter_path(tag: nil) do
Any
- @tags.each do |tag| - @tags.each do |tag|
%li{ class: (tag.name == params[:tag]) ? 'active' : 'light' } %li{ class: (tag.name == params[:tag]) ? 'active' : 'light' }
= link_to explore_projects_filter_path(tag: tag.name) do = link_to explore_projects_filter_path(tag: tag.name) do
%i.fa.fa-tag %i.fa.fa-tag
= tag.name = tag.name
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
.top-area .top-area
= render 'explore/projects/nav' = render 'explore/projects/nav'
.gray-content-block.second-block.clearfix .nav-controls
= render 'filter' = render 'filter'
= render 'projects', projects: @projects = render 'projects', projects: @projects
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment