2021-04-16 04:04:18 +02:00
<div id="playground-settings" class="settings-section" data-name="playground-settings">
<div class="admin-table-wrapper">
<p>
{{ # tr }}
2023-02-28 15:06:21 +01:00
Code playgrounds are interactive in-browser development environments,
2024-02-23 08:19:28 +01:00
that are designed to make
2023-02-28 15:06:21 +01:00
it convenient to edit and debug code. Zulip <z-link-code-blocks>code blocks</z-link-code-blocks>
that are tagged with a programming language will have a button visible on
hover that allows users to open the code block on the code playground site.
{{ #*inline "z-link-code-blocks" }} <a href="/help/code-blocks" target="_blank" rel="noopener noreferrer"> {{ > @partial-block }} </a> {{ / inline }}
2021-04-16 04:04:18 +02:00
{{ / tr }}
</p>
2021-04-17 11:39:02 +02:00
<p>
2024-02-23 08:19:28 +01:00
{{ t " For example , to configure a code playground for code blocks tagged as Rust ,
2023-03-15 23:51:27 +01:00
you can set:" }}
2021-04-17 11:39:02 +02:00
</p>
<ul>
2023-02-28 15:06:21 +01:00
<li>
2024-02-23 08:19:28 +01:00
{{ t "Language" }} : <span class="rendered_markdown"><code>Rust</code></span>
2023-02-28 15:06:21 +01:00
</li>
<li>
2024-02-23 08:19:28 +01:00
{{ t "Name" }} : <span class="rendered_markdown"><code>Rust playground</code></span>
2023-02-28 15:06:21 +01:00
</li>
<li>
2024-02-23 08:19:28 +01:00
{{ t "URL template" }} : <span class="rendered_markdown"><code>https://play.rust-lang.org/?code= { code}</code></span>
2023-02-28 15:06:21 +01:00
</li>
2021-04-17 11:39:02 +02:00
</ul>
2023-02-28 15:06:21 +01:00
<p>
{{ # tr }}
For more examples and technical details, see the <z-link>help center documentation</z-link>
on adding code playgrounds.
{{ #*inline "z-link" }} <a href="/help/code-blocks#code-playgrounds" target="_blank" rel="noopener noreferrer"> {{ > @partial-block }} </a> {{ / inline }}
{{ / tr }}
</p>
2021-04-17 11:39:02 +02:00
{{ # if is_admin }}
2023-01-10 11:13:05 +01:00
<form class="admin-playground-form">
2021-04-17 11:39:02 +02:00
<div class="add-new-playground-box grey-box">
<div class="new-playground-form wrapper">
2021-04-18 14:49:02 +02:00
<div class="settings-section-title">
{{ t "Add a new code playground" }}
2021-05-05 02:05:47 +02:00
{{ > ../help_link_widget link = "/help/code-blocks#code-playgrounds" }}
2021-04-18 14:49:02 +02:00
</div>
2021-04-17 11:39:02 +02:00
<div class="alert" id="admin-playground-status"></div>
2022-08-09 09:10:53 +02:00
<div class="input-group">
<label for="playground_pygments_language"> {{ t "Language" }} </label>
2024-02-23 08:19:28 +01:00
<input type="text" id="playground_pygments_language" class="settings_text_input" name="pygments_language" autocomplete="off" placeholder="Rust" />
2021-04-17 11:39:02 +02:00
</div>
2022-08-09 09:10:53 +02:00
<div class="input-group">
<label for="playground_name"> {{ t "Name" }} </label>
2024-02-23 08:19:28 +01:00
<input type="text" id="playground_name" class="settings_text_input" name="playground_name" autocomplete="off" placeholder="Rust playground" />
2021-04-17 11:39:02 +02:00
</div>
2022-08-09 09:10:53 +02:00
<div class="input-group">
2023-05-27 05:04:50 +02:00
<label for="playground_url_template"> {{ t "URL template" }} </label>
2024-02-23 08:19:28 +01:00
<input type="text" id="playground_url_template" class="settings_text_input" name="url_template" placeholder="https://play.rust-lang.org/?code= { code}" />
2021-04-17 11:39:02 +02:00
</div>
2021-05-01 03:31:04 +02:00
<button type="submit" id="submit_playground_button" class="button rounded sea-green">
2021-04-17 11:39:02 +02:00
{{ t 'Add code playground' }}
</button>
</div>
</div>
</form>
{{ / if }}
2022-03-04 13:06:28 +01:00
<div class="settings_panel_list_header">
<h3> {{ t "Code playgrounds" }} </h3>
2023-06-23 13:22:29 +02:00
<input type="text" class="search filter_text_input" placeholder=" {{ t 'Filter code playgrounds' }} " aria-label=" {{ t 'Filter code playgrounds' }} "/>
2022-03-04 13:06:28 +01:00
</div>
2024-06-16 13:46:37 +02:00
<div class="progressive-table-wrapper" data-simplebar data-simplebar-tab-index="-1">
2023-08-07 09:32:19 +02:00
<table class="table table-striped wrapped-table admin_playgrounds_table">
2022-03-10 08:08:10 +01:00
<thead class="table-sticky-headers">
2023-05-21 10:41:51 +02:00
<th class="active" data-sort="alphabetic" data-sort-prop="pygments_language"> {{ t "Language" }} </th>
<th data-sort="alphabetic" data-sort-prop="name"> {{ t "Name" }} </th>
2023-05-27 05:04:50 +02:00
<th data-sort="alphabetic" data-sort-prop="url_template"> {{ t "URL template" }} </th>
2021-04-17 12:41:47 +02:00
{{ # if is_admin }}
<th class="actions"> {{ t "Actions" }} </th>
{{ / if }}
2021-04-16 04:04:18 +02:00
</thead>
2023-08-20 09:00:40 +02:00
<tbody id="admin_playgrounds_table" data-empty=" {{ t 'No playgrounds configured.' }} " data-search-results-empty=" {{ t 'No playgrounds match your current filter.' }} "></tbody>
2021-04-16 04:04:18 +02:00
</table>
</div>
</div>
</div>