<div class="row">
  <div class="col-md-12">
    <div data-ng-form="redirectAddForm" class="form-inline" isolate-form>
      <div class="form-group d-block">
	<div class="input-group">
          <span class="input-group-prepend"><span class="input-group-text" data-translate>From</span></span>
          <input type="text" class="form-control" name="path1" data-ng-model="new_redirect.path1" />
        </div>
      </div>
      <div class="form-group d-block ml-2">
	<span class="input-group">
          <span class="input-group-prepend"><span class="input-group-text" data-translate>To</span></span>
          <input type="text" class="form-control" name="path2" data-ng-model="new_redirect.path2" />
	</span>
      </div>
      <button type="submit"
              class="btn btn-primary ml-2"
              data-ng-disabled="redirectAddForm.$invalid"
              data-ng-click="add_redirect()">
        <i class="fa-solid fa-plus"></i>
        <span data-translate>Add</span>
      </button>
    </div>
  </div>
</div>
<br />
<div class="row">
  <div class="col-md-12">
    <table class="table">
      <thead>
        <tr>
          <th data-translate>From</th>
          <th data-translate>To</th>
          <th></th>
        </tr>
      </thead>
      <tbody>
        <tr data-ng-repeat="redirect in resources.redirects | orderBy:'path1'" data-ng-controller="AdminRedirectEditCtrl">
          <td>{{redirect.path1}}</td>
          <td>{{redirect.path2}}</td>
          <td>
            <button class="btn btn-sm btn-danger"
                    data-ng-click="delete_redirect(redirect)">
              <i class="fa-solid fa-trash"></i>
              <span data-translate>Delete</span>
            </button>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</div>
