Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-11-18 16:16:36 +0300
commit311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch)
tree07e7870bca8aed6d61fdcc810731c50d2c40af47 /app/views/shared/topics
parent27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff)
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'app/views/shared/topics')
-rw-r--r--app/views/shared/topics/_list.html.haml9
-rw-r--r--app/views/shared/topics/_topic.html.haml16
2 files changed, 25 insertions, 0 deletions
diff --git a/app/views/shared/topics/_list.html.haml b/app/views/shared/topics/_list.html.haml
new file mode 100644
index 00000000000..ddf47261d42
--- /dev/null
+++ b/app/views/shared/topics/_list.html.haml
@@ -0,0 +1,9 @@
+- remote = local_assigns.fetch(:remote, false)
+
+- if @topics.empty?
+ = render 'shared/empty_states/topics'
+- else
+ .row.gl-mt-3
+ = render partial: 'shared/topics/topic', collection: @topics
+
+ = paginate_collection @topics, remote: remote
diff --git a/app/views/shared/topics/_topic.html.haml b/app/views/shared/topics/_topic.html.haml
new file mode 100644
index 00000000000..a47d4495777
--- /dev/null
+++ b/app/views/shared/topics/_topic.html.haml
@@ -0,0 +1,16 @@
+- max_topic_name_length = 30
+- detail_page_link = topic_explore_projects_path(topic_name: topic.name)
+
+.col-lg-3.col-md-4.col-sm-12
+ .gl-card.gl-mb-5
+ .gl-card-body.gl-display-flex.gl-align-items-center
+ .avatar-container.rect-avatar.s40.gl-flex-shrink-0
+ = link_to detail_page_link do
+ = topic_icon(topic, class: "avatar s40")
+ = link_to detail_page_link do
+ - if topic.name.length > max_topic_name_length
+ %h5.str-truncated.has-tooltip{ title: topic.name }
+ = truncate(topic.name, length: max_topic_name_length)
+ - else
+ %h5
+ = topic.name