Skip to content
代码片段 群组 项目
未验证 提交 7ec1a50b 编辑于 作者: Andrew Fontaine's avatar Andrew Fontaine 提交者: GitLab
浏览文件
No related branches found
No related tags found
无相关合并请求
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
supports_quick_actions: 'false', supports_quick_actions: 'false',
enable_autocomplete: 'false', enable_autocomplete: 'false',
disable_attachments: 'true', disable_attachments: 'true',
autofocus: 'false',
form_field_classes: 'note-textarea js-gfm-input markdown-area' } } form_field_classes: 'note-textarea js-gfm-input markdown-area' } }
= f.hidden_field :description = f.hidden_field :description
...@@ -36,14 +37,12 @@ ...@@ -36,14 +37,12 @@
- if @topic.avatar? - if @topic.avatar?
.js-remove-topic-avatar{ data: { path: admin_topic_avatar_path(@topic), name: @topic.name } } .js-remove-topic-avatar{ data: { path: admin_topic_avatar_path(@topic), name: @topic.name } }
- if @topic.new_record? .gl-mt-5.gl-flex.gl-flex-wrap.gl-gap-3
.form-actions - if @topic.new_record?
= f.submit _('Create topic'), pajamas_button: true = f.submit _('Create topic'), pajamas_button: true
= render Pajamas::ButtonComponent.new(href: admin_topics_path) do = render Pajamas::ButtonComponent.new(href: admin_topics_path) do
= _('Cancel') = _('Cancel')
- else
- else
.form-actions
= f.submit _('Save changes'), pajamas_button: true = f.submit _('Save changes'), pajamas_button: true
= render Pajamas::ButtonComponent.new(href: admin_topics_path) do = render Pajamas::ButtonComponent.new(href: admin_topics_path) do
= _('Cancel') = _('Cancel')
......
- page_title _("Topics") - page_title _("Topics")
- add_page_specific_style 'page_bundles/search' - add_page_specific_style 'page_bundles/search'
.top-area{ data: { event_tracking_load: 'true', event_tracking: 'view_admin_topics_pageload' } } = render ::Layouts::PageHeadingComponent.new(_('Topics'), options: { data: { event_tracking_load: 'true', event_tracking: 'view_admin_topics_pageload' } }) do |c|
.nav-controls.gl-w-full.gl-mt-3.gl-mb-3 - c.with_actions do
= form_tag admin_topics_path, method: :get do |f|
- search = params.fetch(:search, nil)
.search-field-holder
= search_field_tag :search, search, class: "form-control gl-form-input search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: _('Search by name')
= sprite_icon('search', css_class: 'search-icon')
.gl-flex-grow-1
.js-merge-topics{ data: { path: merge_admin_topics_path } } .js-merge-topics{ data: { path: merge_admin_topics_path } }
= render Pajamas::ButtonComponent.new(href: new_admin_topic_path, variant: 'confirm') do = render Pajamas::ButtonComponent.new(href: new_admin_topic_path, variant: 'confirm') do
= _('New topic') = _('New topic')
.gl-flex.gl-min-w-0.gl-grow.row-content-block
= form_tag admin_topics_path, method: :get, class: 'gl-w-full' do |f|
- search = params.fetch(:search, nil)
.search-field-holder
= search_field_tag :search, search, class: "form-control gl-form-input search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: _('Search by name')
= sprite_icon('search', css_class: 'search-icon')
%ul.content-list %ul.content-list
= render partial: 'topic', collection: @topics = render partial: 'topic', collection: @topics
= paginate_collection @topics = paginate_collection @topics
- if @topics.empty? - if @topics.empty?
= render 'shared/empty_states/topics' = render 'shared/empty_states/topics'
- page_title _("New topic") - page_title _("New topic")
%h1.page-title.gl-font-size-h-display= _('New topic') %h1.page-title.gl-font-size-h-display= _('New topic')
%hr
= render 'form', url: admin_topics_path(@topic) = render 'form', url: admin_topics_path(@topic)
.row.empty-state = render Pajamas::EmptyStateComponent.new(svg_path: 'illustrations/empty-state/empty-labels-md.svg',
.col-12 title: _('There are no topics to show')) do |c|
.svg-content.svg-150
= image_tag 'illustrations/empty-state/empty-labels-md.svg' - c.with_description do
.text-content.gl-text-center.gl-pt-0! = _('Add topics to projects to help users find them.')
%h4= _('There are no topics to show.')
%p= _('Add topics to projects to help users find them.')
...@@ -53478,7 +53478,7 @@ msgstr "" ...@@ -53478,7 +53478,7 @@ msgstr ""
msgid "There are no secure files yet." msgid "There are no secure files yet."
msgstr "" msgstr ""
   
msgid "There are no topics to show." msgid "There are no topics to show"
msgstr "" msgstr ""
   
msgid "There are no variables yet." msgid "There are no variables yet."
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
visit topics_explore_projects_path visit topics_explore_projects_path
expect(page).to have_current_path topics_explore_projects_path, ignore_query: true expect(page).to have_current_path topics_explore_projects_path, ignore_query: true
expect(page).to have_content('There are no topics to show.') expect(page).to have_content('There are no topics to show')
end end
end end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册