mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-11 21:56:19 +10:00
Re-use project partial for rendering explore projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
%li
|
||||
%h4.project-title
|
||||
.project-access-icon
|
||||
= visibility_level_icon(project.visibility_level)
|
||||
= link_to project.name_with_namespace, [project.namespace.becomes(Namespace), project]
|
||||
%span.pull-right
|
||||
%i.fa.fa-star
|
||||
= project.star_count
|
||||
|
||||
.project-info
|
||||
- if project.description.present?
|
||||
.project-description.str-truncated
|
||||
= markdown(project.description, pipeline: :description)
|
||||
|
||||
.repo-info
|
||||
- unless project.empty_repo?
|
||||
= link_to pluralize(round_commit_count(project), 'commit'), namespace_project_commits_path(project.namespace, project, project.default_branch)
|
||||
·
|
||||
= link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project)
|
||||
·
|
||||
= link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project)
|
||||
- else
|
||||
%i.fa.fa-exclamation-triangle
|
||||
Empty repository
|
||||
@@ -0,0 +1,6 @@
|
||||
%ul.projects-list.bordered-list.my-projects.public-projects
|
||||
- projects.each do |project|
|
||||
%li.project-row
|
||||
= render partial: 'shared/project', locals: { project: project, avatar: true, stars: true }
|
||||
- unless projects.present?
|
||||
.nothing-here-block No such projects
|
||||
@@ -4,10 +4,5 @@
|
||||
.clearfix
|
||||
= render 'filter'
|
||||
%br
|
||||
.public-projects
|
||||
%ul.bordered-list.top-list
|
||||
= render @projects
|
||||
- unless @projects.present?
|
||||
.nothing-here-block No public projects
|
||||
|
||||
= paginate @projects, theme: "gitlab"
|
||||
= render 'projects', projects: @projects
|
||||
= paginate @projects, theme: "gitlab"
|
||||
|
||||
@@ -7,8 +7,5 @@
|
||||
See most starred projects
|
||||
.pull-right
|
||||
= render 'explore/projects/dropdown'
|
||||
.public-projects
|
||||
%ul.bordered-list
|
||||
= render @starred_projects
|
||||
|
||||
= render 'projects', projects: @starred_projects
|
||||
= paginate @starred_projects, theme: 'gitlab'
|
||||
|
||||
@@ -13,6 +13,4 @@
|
||||
See most discussed projects for last month
|
||||
.pull-right
|
||||
= render 'explore/projects/dropdown'
|
||||
.public-projects
|
||||
%ul.bordered-list
|
||||
= render @trending_projects
|
||||
= render 'projects', projects: @trending_projects
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
%span.count= current_user.assigned_merge_requests.opened.count
|
||||
= nav_link(controller: :snippets) do
|
||||
= link_to (current_user ? user_snippets_path(current_user) : snippets_path), title: 'Your snippets', data: {placement: 'right'} do
|
||||
= icon('dashboard fw')
|
||||
= icon('clipboard fw')
|
||||
%span
|
||||
Snippets
|
||||
- if current_user
|
||||
|
||||
Reference in New Issue
Block a user