Stub for command prompts
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
class Prompts::CommandsController < ApplicationController
|
||||
def index
|
||||
if stale? etag: @tags
|
||||
render layout: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -11,6 +11,10 @@ module RichTextHelper
|
||||
content_tag "lexical-prompt", "", trigger: "#", src: prompts_tags_path, name: "tag"
|
||||
end
|
||||
|
||||
def commands_prompt
|
||||
content_tag "lexical-prompt", "", trigger: "/", src: prompts_commands_path, name: "command", "insert-editable-text": true
|
||||
end
|
||||
|
||||
def cards_prompt
|
||||
content_tag "lexical-prompt", "", trigger: "#", src: prompts_cards_path, name: "card", "insert-editable-text": true, "remote-filtering": true
|
||||
end
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
spellcheck: "false" do %>
|
||||
<%= global_mentions_prompt %>
|
||||
<%= tags_prompt %>
|
||||
<%= commands_prompt %>
|
||||
<% end %>
|
||||
|
||||
<%= hidden_field_tag "confirmed", nil, data: { terminal_target: "confirmation" } %>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<lexical-prompt-item search="assign">
|
||||
<template type="menu">
|
||||
<code>/assign</code> - Assign cards to users
|
||||
</template>
|
||||
<template type="editor">
|
||||
/assign @
|
||||
</template>
|
||||
</lexical-prompt-item>
|
||||
|
||||
<lexical-prompt-item search="close">
|
||||
<template type="menu">
|
||||
<code>/close</code> - Close cards
|
||||
</template>
|
||||
<template type="editor">
|
||||
/close
|
||||
</template>
|
||||
</lexical-prompt-item>
|
||||
|
||||
<lexical-prompt-item search="close">
|
||||
<template type="menu">
|
||||
<code>/tag</code> - Tag cards
|
||||
</template>
|
||||
<template type="editor">
|
||||
/tag #
|
||||
</template>
|
||||
</lexical-prompt-item>
|
||||
@@ -118,6 +118,7 @@ Rails.application.routes.draw do
|
||||
resources :cards
|
||||
resources :users
|
||||
resources :tags
|
||||
resources :commands
|
||||
|
||||
resources :collections do
|
||||
scope module: :collections do
|
||||
|
||||
Reference in New Issue
Block a user