#797 Show "Mark all", checkboxes and "Delete all marked" only to project admins
Merged 4 years ago by msuchy. Opened 4 years ago by frostyx.

@@ -13,7 +13,10 @@ 

          <th>Submitted</th>

          <th>Build Time</th>

          <th>Status</th>

+ 

+         {% if g.user and g.user.can_edit(copr) %}

          <th data-orderable="false"><a href="#" onclick="$('tr.build-row :checkbox').prop('checked', $('tr.build-row :checkbox').length != $('tr.build-row :checkbox:checked').length); return false;">Mark all</a></th>

+         {% endif %}

        </tr>

      </thead>

      <tbody>
@@ -48,9 +51,12 @@ 

          <td>

            {{ build_state(build) }}

          </td>

+ 

+         {% if g.user and g.user.can_edit(copr) %}

          <td>

            <input type="checkbox" name="build_ids" value="{{ build.id }}"></input>

          </td>

+         {% endif %}

        </tr>

      {% endfor %}

      </tbody>

@@ -19,6 +19,9 @@ 

    <a class="btn btn-primary button-new pull-right" style="margin-left:5px" href="{{ copr_url('coprs_ns.copr_add_build', copr) }}">

      <span class="pficon pficon-add-circle-o"></span> New Build

    </a>

+ {% endif %}

+ 

+ {% if g.user and g.user.can_edit(copr) %}

    {% if builds %}

      {{ copr_delete_builds(copr, class="pull-right button-build-action") }}

    {% endif %}