Commit b46ad4c9 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Fix Slash command templates

These templates were broken, as the same views didn't have a @project
defined. Now I've added checks on the service being a template or not.

Fixes #26042
parent 365612ce
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
by entering by entering
%code /<command_trigger_word> help %code /<command_trigger_word> help
- unless enabled - unless enabled || @service.template?
= render 'projects/services/mattermost_slash_commands/detailed_help', subject: @service = render 'projects/services/mattermost_slash_commands/detailed_help', subject: @service
- if enabled - if enabled && !@service.template?
= render 'projects/services/mattermost_slash_commands/installation_info', subject: @service = render 'projects/services/mattermost_slash_commands/installation_info', subject: @service
- run_actions_text = "Perform common operations on this project: #{@project.name_with_namespace}" - pretty_name = defined?(@project) ? @project.path_with_namespace : "namespace / path"
- run_actions_text = "Perform common operations on this project: #{pretty_name}"
.well .well
This service allows GitLab users to perform common operations on this This service allows GitLab users to perform common operations on this
...@@ -9,6 +10,7 @@ ...@@ -9,6 +10,7 @@
%code /<command> help %code /<command> help
%br %br
%br %br
- unless @service.template?
To setup this service: To setup this service:
%ul.list-unstyled %ul.list-unstyled
%li %li
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment