src/templates/modules/commits-table.html \
src/templates/modules/commit-message.html \
src/templates/modules/link-to-user.html \
- src/templates/modules/modal-base.html \
- src/templates/modules/modal-build-comment.html \
- src/templates/modules/modal-build-push.html \
- src/templates/modules/modal-build-unpush.html \
src/templates/modules/packages-files-table.html \
src/templates/modules/source-table.html \
src/templates/modules/text.html
+++ /dev/null
-<div class="modal fade" id="{% block id %}{% end block %}" tabindex="-1">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- {% block header %}
- <h3 style="word-wrap: break-word;" class="modal-title" id="{% block id %}{% end block %}">
- {% block title %}{% end block %}
- </h3>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- {% end block %}
- </div>
- <form method="POST" action="{% block form_action %}{% end block %}">
- {% raw xsrf_form_html() %}
- <div class="modal-body">
- {% block body %}{% end block %}
- </div>
- <div class="modal-footer">
- <div class="float-right" style="width:100%">
- {% block footer %}
- <p class="float-left">
- {% block footer_text %}{% end block %}
- </p>
- <button type="submit" class="btn btn-primary mb-2">
- {% block submit_text %}{{ _("Submit") }}{% end block %}
- </button>
- <a class="btn mb-2" data-dismiss="modal">
- {% block close_text %}{{ _("Cancel") }}{% end block %}
- </a>
- {% end block %}
- </div>
- </div>
- </form>
- </div>
- </div>
-</div>
\ No newline at end of file
+++ /dev/null
-{% extends "modal-base.html" %}
-
-{% block id %}comment{% end block %}
-{% block form_action %}/build/{{ build.uuid }}/comment{% end block %}
-
-{% block title %}
- {% if current_user %}
- {{ _("Comment on %s") % build.name }}
- {% else %}
- {{ _("Log in to comment") }}
- {% end %}
-{% end block %}
-
-{% block body %}
- {% if current_user %}
- <div class="form-group">
- <label for="cmttxt">{{ _("Comment") }}</label>
- <textarea class="form-control" id="cmttxt" name="text" rows="8"></textarea>
- </div>
- <div class="form-group">
- <label for="vote">{{ _("Vote") }}</label>
- <select class="form-control" id="vote" name="vote">
- <option value="option1" checked>{{ _("Not tested.") }}</option>
- <option value="up">{{ _("Works for me.") }}</option>
- <option value="down">{{ _("Does not work.") }}</option>
- </select>
- </div>
- {% else %}
- <p>
- {{ _("You need to log in to comment.") }}
- {{ _("Click on the button below to do so.") }}
- </p>
- {% end %}
-{% end block %}
-
-{% block footer %}
- {% if current_user %}
- <button type="submit" class="btn btn-primary">{{ _("Submit comment") }}</button>
- {% else %}
- <a class="btn btn-primary" href="/login">{{ _("Login") }}</a>
- {% end %}
-
- <a class="btn" href="#" data-dismiss="modal">{{ _("Cancel") }}</a>
-{% end block %}
+++ /dev/null
-{% extends "modal-base.html" %}
-
-{% block id %}push{% end block %}
-{% block form_action %}/build/{{ build.uuid }}/manage{% end block %}
-
-{% block title %}
- {{ _("Push %s to a repository") % build.name }}
-{% end block %}
-
-{% block body %}
- <input type="hidden" name="action" value="push" />
-
- {% if not build.all_jobs_finished %}
- <div class="alert alert-warning">
- <strong>{{ _("Not all jobs are finished!") }}</strong>
- {{ _("So it is <em>strongly</em> discouraged to push this build into the next repository.") }}
- </div>
-
- <hr>
- {% end %}
-
- <fieldset>
- <div class="control-group">
- <label class="control-label">{{ _("New repository") }}</label>
- <div class="controls">
- <select id="repo" name="repo" {% if not current_user.is_admin() %}disabled{% end %}>
- {% for repo in [r for r in build.distro.repositories if not r == current_repo] %}
- <option value="{{ repo.identifier }}" {% if repo == next_repo %}selected{% end %}>
- {{ repo.name }} - {{ repo.summary }}
- </option>
- {% end %}
- </select>
-
- <p class="help-block">
- {{ _("The build will be put into this repository.") }}
- </p>
- </div>
- </div>
- </fieldset>
-
- <hr>
-
- <p>
- {{ _("You are going to push this build into a new repository.") }}
- {{ _("This means that the build won't be part of the repository it is currently in anymore.") }}
- </p>
- <p>
- {{ _("Please make sure you tested this build well enough that it will keep up with the quality level of the target repository.") }}
- </p>
-{% end block %}
-
-{% block footer_text %}
- {% if current_repo %}
- {{ _("Current repository") }}:
- <a href="/distro/{{ build.distro.identifier }}/repo/{{ current_repo.identifier }}">
- {{ current_repo.name }}
- </a>
- {% end %}
-{% end %}
-{% block submit_text %}{{ _("Push") }}{% end block %}
+++ /dev/null
-{% extends "modal-base.html" %}
-
-{% block id %}unpush{% end block %}
-{% block form_action %}/build/{{ build.uuid }}/manage{% end block %}
-
-{% block title %}{{ _("Unpush %s from a repository") % build.name }}{% end block %}
-
-{% block body %}
- <input type="hidden" name="action" value="unpush" />
-
- <fieldset>
- <div class="control-group">
- <label class="control-label">{{ _("Current repository") }}</label>
- <div class="controls">
- <select id="repo" name="repo" disabled>
- <option value="{{ repo.identifier }}">
- {{ repo.name }} - {{ repo.summary }}
- </option>
- </select>
- </div>
- </div>
- </fieldset>
-
- <hr>
-
- <p>
- {{ _("You are going to unpush this build from its repository.") }}
- {{ _("This means that the build won't be installable from this repository anymore.") }}
- </p>
-
- {% if not build.state in ("obsolete", "broken") %}
- <p>
- {{ _("If you consider this build being obsolete or broken, please don't forget to mark it so.") }}
- </p>
- {% end %}
-{% end block %}
-
-{% block submit_text %}{{ _("Unpush") }}{% end block %}
ui_modules = {
"Highlight" : ui_modules.HighlightModule,
"Text" : ui_modules.TextModule,
- "Modal" : ui_modules.ModalModule,
# Bugs
"BugsList" : bugs.ListModule,
return self.render_string("modules/commit-message.html", commit=commit)
-class ModalModule(UIModule):
- def render(self, what, **kwargs):
- what = "modules/modal-%s.html" % what
-
- return self.render_string(what, **kwargs)
-
-
class JobsStatusModule(UIModule):
def render(self, build):
return self.render_string("modules/jobs/status.html",