name = Column(Text, nullable=False)
+ # Link
+
+ @property
+ def link(self):
+ return "/users/%s" % self.name
+
async def delete(self):
await self._set_attribute("deleted", True)
<div class="container">
<h5 class="title is-5">{{ _("Jobs")}}</h5>
- {{ JobList(build.jobs, show_arch_only=True) }}
+ {{ JobList(build.jobs, show_arch_only=True, show_owner=False) }}
{# Bug? #}
{% if build.has_failed() %}
# #
##############################################################################}
-{% macro JobList(jobs, show_arch_only=False) %}
+{% from "users/macros.html" import Avatar with context %}
+
+{% macro JobList(jobs, show_arch_only=False, show_owner=True) %}
<article class="panel">
{% for job in jobs %}
<div class="panel-block is-block">
</div>
{% endif %}
+ {# Scratch Build? #}
+ {% if show_owner and job.build.is_scratch() %}
+ <span class="level-item">
+ <a class="button is-text is-small" href="{{ job.build.owner.link }}">
+ <figure class="image is-24x24">
+ {{ Avatar(job.build.owner, size=48) }}
+ </figure>
+ </a>
+ </span>
+ {% endif %}
+
{# Runtime #}
{% if job.has_finished() %}
<div class="level-item">