{% from "users/macros.html" import Avatar with context %}
+{% macro BuildComment(build) %}
+ <div class="modal" id="build-{{ build.uuid }}-comment">
+ <div class="modal-background"></div>
+
+ <div class="modal-content">
+ <section class="modal-card-body">
+ <h5 class="title is-5">
+ {{ _("Comment on %s") % build }}
+ </h5>
+
+ <form method="POST" action="/builds/{{ build.uuid }}/comment">
+ {{ xsrf_form_html() | safe }}
+
+ <div class="field">
+ <div class="control">
+ <textarea class="textarea" name="text" rows="8"
+ placeholder="{{ _("Comment...") }}"></textarea>
+ </div>
+ </div>
+
+ <div class="field">
+ <div class="control">
+ <button class="button is-info is-fullwidth">
+ {{ _("Post Comment") }}
+ </button>
+ </div>
+ </div>
+ </form>
+ </section>
+ </div>
+
+ <button class="modal-close is-large" aria-label="close"></button>
+ </div>
+
+ <a href="#" class="button is-info modal-toggle" data-target="build-{{ build.uuid }}-comment">
+ <span class="icon-text">
+ <span class="icon">
+ <i class="fa-solid fa-comment"></i>
+ </span>
+
+ <span>{{ _("Comment") }}</span>
+ </span>
+ </a>
+{% endmacro %}
+
{% macro BuildList(builds, shorter=False, limit=None, more_url=None) %}
{% if builds %}
{% set rest = False %}
{% from "macros.html" import Text with context %}
{% from "bugs/macros.html" import BugList with context %}
-{% from "builds/macros.html" import BuildPackages, BuildWatchers with context %}
+{% from "builds/macros.html" import BuildComment, BuildPackages, BuildWatchers with context %}
{% from "builds/groups/macros.html" import BuildGroupList with context %}
{% from "events/macros.html" import EventList with context %}
{% from "jobs/macros.html" import JobList with context %}
{{ _("Delete Build") }}
</a>
{% endif %}
+
+ {# Comment #}
+ {{ BuildComment(build) }}
</div>
</div>
</section>
{{ EventList(priority=4, build=build, show_build=False) }}
</div>
</section>
-
- {# Comment - This probably should go into a modal #}
- <section class="section">
- <div class="container">
- <form method="POST" action="/builds/{{ build.uuid }}/comment">
- {{ xsrf_form_html() | safe }}
-
- <div class="field">
- <label class="label">{{ _("Comment") }}</label>
- <div class="control">
- <textarea class="textarea" name="text" rows="8"
- placeholder="{{ _("Comment...") }}"></textarea>
- </div>
- </div>
-
- <div class="field">
- <div class="control">
- <button class="button is-link">Submit</button>
- </div>
- </div>
- </form>
- </div>
- </section>
{% endblock %}