{{!
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
}}

<div class="panel-udfs">
  <div class="title-row">
    <h3 class="pull-left">{{t 'udfs.udfs'}}</h3>
    <a {{action "createUdfModal"}} class="btn btn-default pull-right upload-udf"><span class="glyphicon glyphicon-plus"></span> {{t 'udfs.create'}}</a>
  </div>
  <table class="table table-striped">
    <thead> 
      <tr class="label-row">
        <th class="first">{{t 'common.name'}}</th> 
        <th>{{t 'common.path'}}</th> 
        <th>{{t 'common.owner'}}</th> 
        <th></th> 
      </tr>
    </thead>
    <tbody>
    {{#each paginatedContent}}
        <tr> 
          <td> {{this.name}}</td>
          <td> {{this.path}}</td>
          <td> {{this.owner}}</td>
          <td><a href="#" {{action "deleteUdfModal" this}} ><i class="fa fa-trash-o"></i> {{t 'common.delete'}}</a></td>
        </tr>
    {{/each}}
    </tbody>
  </table>

  {{#if content}}
    {{partial 'partials/paginationControls'}}
  {{/if}}

  {{#unless content}}
    <div class="alert alert-info" role="alert">{{t 'udfs.noUDFs'}}</div>
  {{/unless}}

</div>
