summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 16:54:54 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-25 16:54:54 +0000
commit7140e800ee701a8d4b117590107f26ca23ce0e60 (patch)
tree12af691f0e90b4c5fb54c42e1b4cb8d4c01e53d6
parent2df94f9763192aa67a1e8ff3bc82badc685181aa (diff)
parent084da5253b699b0734e17839f6ffebd4dc414320 (diff)
downloadgitlab-ce-7140e800ee701a8d4b117590107f26ca23ce0e60.tar.gz
Merge branch 'separate-activity' into 'master'
Re-use project partial for rendering explore projects from dashboard For consistency with projects on dashboard after !1198 Before: ![Screenshot_2015-08-25_18.21.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/53bcf6909fe55b2e331ea6a720cb12ce/Screenshot_2015-08-25_18.21.48.png) After: ![Screenshot_2015-08-25_18.20.22](https://gitlab.com/gitlab-org/gitlab-ce/uploads/fbda93828ec28ef1ac874d65b4a04c2b/Screenshot_2015-08-25_18.20.22.png) Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !1200
-rw-r--r--app/views/explore/projects/_project.html.haml24
-rw-r--r--app/views/explore/projects/_projects.html.haml6
-rw-r--r--app/views/explore/projects/index.html.haml9
-rw-r--r--app/views/explore/projects/starred.html.haml5
-rw-r--r--app/views/explore/projects/trending.html.haml4
-rw-r--r--app/views/layouts/nav/_dashboard.html.haml2
6 files changed, 11 insertions, 39 deletions
diff --git a/app/views/explore/projects/_project.html.haml b/app/views/explore/projects/_project.html.haml
deleted file mode 100644
index 1e8a89e3661..00000000000
--- a/app/views/explore/projects/_project.html.haml
+++ /dev/null
@@ -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)
- &middot;
- = link_to pluralize(project.repository.branch_names.count, 'branch'), namespace_project_branches_path(project.namespace, project)
- &middot;
- = link_to pluralize(project.repository.tag_names.count, 'tag'), namespace_project_tags_path(project.namespace, project)
- - else
- %i.fa.fa-exclamation-triangle
- Empty repository
diff --git a/app/views/explore/projects/_projects.html.haml b/app/views/explore/projects/_projects.html.haml
new file mode 100644
index 00000000000..22cc541115c
--- /dev/null
+++ b/app/views/explore/projects/_projects.html.haml
@@ -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
diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml
index 4956081e1ed..0cfdf5cfd15 100644
--- a/app/views/explore/projects/index.html.haml
+++ b/app/views/explore/projects/index.html.haml
@@ -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"
diff --git a/app/views/explore/projects/starred.html.haml b/app/views/explore/projects/starred.html.haml
index fdccbe5692f..4a9fcae4bed 100644
--- a/app/views/explore/projects/starred.html.haml
+++ b/app/views/explore/projects/starred.html.haml
@@ -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'
diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml
index 98a4174b426..4c7e7d44733 100644
--- a/app/views/explore/projects/trending.html.haml
+++ b/app/views/explore/projects/trending.html.haml
@@ -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
diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml
index 154fd418399..d620c022273 100644
--- a/app/views/layouts/nav/_dashboard.html.haml
+++ b/app/views/layouts/nav/_dashboard.html.haml
@@ -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