Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #60 from fedora-infra/disable-oneshot-if-triggered
Browse files Browse the repository at this point in the history
Make it possible to disable one-shot when disabled
  • Loading branch information
puiterwijk committed Mar 24, 2015
2 parents 048f333 + ac23991 commit 3c1b027
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
21 changes: 11 additions & 10 deletions fmn/web/templates/context.html
Expand Up @@ -105,17 +105,18 @@ <h4 class="list-group-item-heading">{{fltr.name}}</h4>
<input name="context" id="context" value="{{current}}" type="hidden">
<input name="filter_name" id="filter_name" value="{{fltr.name}}" type="hidden">
<span class="pull-right">
{% if fltr.oneshot %}
<button type="submit" name="method" value="disable-oneshot"
class="btn btn-primary" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable
themselves. You can use this feature to watch for a single
build, or a single comment somewhere. This is currently a
one-shot filter.">
<span class="glyphicon glyphicon-star-empty"></span>
Disable one-shot</button>
{% endif %}
{% if fltr.active %}
{% if fltr.oneshot %}
<button type="submit" name="method" value="disable-oneshot"
class="btn btn-primary" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable
themselves. You can use this feature to watch for a single
build, or a single comment somewhere. This is currently a
one-shot filter.">
<span class="glyphicon glyphicon-star-empty"></span>
Disable one-shot</button>
{% else %}
{% if not fltr.oneshot %}
<button type="submit" name="method" value="enable-oneshot"
class="btn btn-info" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable
Expand Down
17 changes: 9 additions & 8 deletions fmn/web/templates/filter.html
Expand Up @@ -35,15 +35,16 @@ <h3>sent to {{current}}</h3>
</span>

<span>
{% if filter.oneshot %}
<button type="submit" class="btn btn-primary" name="method"
value="disable-oneshot" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable themselves.
You can use this feature to watch for a single build, or a single
comment somewhere. This is currently a one-shot filter.">
<span class="glyphicon glyphicon-star-empty"></span>Disable one-shot</button>
{% endif %}
{% if filter.active %}
{% if filter.oneshot %}
<button type="submit" class="btn btn-primary" name="method"
value="disable-oneshot" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable themselves.
You can use this feature to watch for a single build, or a single
comment somewhere. This is currently a one-shot filter.">
<span class="glyphicon glyphicon-star-empty"></span>Disable one-shot</button>
{% else %}
{% if not filter.oneshot %}
<button type="submit" class="btn btn-info" name="method"
value="enable-oneshot" data-toggle="tooltip" title="One-shot
filters fire only once and then automatically disable themselves.
Expand Down

0 comments on commit 3c1b027

Please sign in to comment.