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

_topics.html.haml « projects « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 12246d1dcfa63e8858965484a5b69dd35d64c591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
- max_project_topic_length = 15

- if project.topics.present?
  .gl-w-full.gl-display-inline-flex.gl-flex-wrap.gl-font-base.gl-font-weight-normal.gl-align-items-center.gl-mx-n2.gl-my-n2{ 'data-testid': 'project_topic_list' }
    %span.gl-p-2.gl-text-gray-500
      = _('Topics') + ':'
    - project.topics_to_show.each do |topic|
      - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name])
      - if topic[:title].length > max_project_topic_length
        %a.gl-p-2.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' }
          = gl_badge_tag truncate(topic[:title], length: max_project_topic_length)
      - else
        %a.gl-p-2{ href: explore_project_topic_path, itemprop: 'keywords' }
          = gl_badge_tag topic[:title]

    - if project.has_extra_topics?
      - title = _('More topics')
      - content = capture do
        %span.gl-display-inline-flex.gl-flex-wrap
          - project.topics_not_shown.each do |topic|
            - explore_project_topic_path = topic_explore_projects_path(topic_name: topic[:name])
            - if topic[:title].length > max_project_topic_length
              %a.gl-mr-3.gl-mb-3.has-tooltip{ data: { container: "body" }, title: topic[:title], href: explore_project_topic_path, itemprop: 'keywords' }
                = gl_badge_tag truncate(topic[:title], length: max_project_topic_length)
            - else
              %a.gl-mr-3.gl-mb-3{ href: explore_project_topic_path, itemprop: 'keywords' }
                = gl_badge_tag topic[:title]
      .text-nowrap.gl-p-2{ role: 'button', tabindex: 0, data: { toggle: 'popover', triggers: 'focus hover', html: 'true', placement: 'top', title: title, content: content } }
        = _("+ %{count} more") % { count: project.count_of_extra_topics_not_shown }