1
0
Fork 0
forked from 2sys/shoutdotdev
shoutdotdev/templates/project.html

62 lines
2 KiB
HTML

{% extends "base.html" %}
{% block title %}Shout.dev: Projects: {{ project.name }}{% endblock %}
{% block main %}
{% include "breadcrumbs.html" %}
<main class="container mt-5">
<section class="mb-4">
<h1>Project: <code>{{ project.name }}</code></h1>
</section>
<section class="mb-4">
<h2>Enabled Channels</h2>
<form
method="post"
action="{{ base_path }}/en/teams/{{ nav_state.team_id.unwrap().simple() }}/projects/{{ project.id.simple() }}/update-enabled-channels"
>
<div class="mb-3">
<table class="table">
<thead>
<tr>
<th>Channel Name</th>
<th>Enabled</th>
</tr>
</thead>
<tbody>
{% for channel in team_channels %}
<tr>
<td>
<label for="enable-channel-switch-{{ channel.id.simple() }}">
<a
target="_blank"
href="{{ base_path }}/en/teams/{{ nav_state.team_id.unwrap().simple() }}/channels/{{ channel.id.simple() }}"
>
{{ channel.name }}
</a>
</label>
</td>
<td>
<input
class="form-check-input"
{% if enabled_channel_ids.contains(channel.id) %}
checked=""
{% endif %}
type="checkbox"
name="enabled_channels"
value="{{ channel.id.simple() }}"
id="enable-channel-switch-{{ channel.id.simple() }}"
>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="mb-3">
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
<button class="btn btn-primary" type="submit">Save</button>
</div>
</form>
</section>
</main>
{% endblock %}