blob: 4c8778902e840f4005094965032dbcc8943f2501 [file]
<?php
/**
* 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
*
* https://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.
*/
?>
<?= $this->partial('_nav.phtml'); ?>
<h4>Find and edit plugin</h4>
<p>
<?= $this->partial('layout/flash.phtml'); ?>
</p>
<form class="form-inline" method="get" action="">
<div class="form-group">
<!-- <label for="exampleInputName2">Search</label> -->
<input type="text" class="form-control" name="search" id="search" placeholder="Search for plugin..." style="width: 300px;" value="<?= $this->search ?>">
</div>
<button type="submit" class="btn btn-primary">Search</button>
</form>
<br/>
<br/>
<?php
if ($this->plugins) {
echo '<table class="table table-striped">
<thead>
<tr>
<th></th>
<th>Plugin</th>
<th>Versions</th>
</tr>
</thead>
<tbody>';
foreach($this->plugins as $plugin) {
echo $this->partial('application/admin/_plugin-listrow.phtml', array('plugin' => $plugin));
}
echo '</tbody></table>';
} else {
if ($this->search) {
echo '<p>Sorry, no plugins found</p>';
}
}
?>
<script>
$( function() {
$( "#search" ).autocomplete({
source: "<?= $this->url('admin',array('action'=>'search-autocomplete')) ?>",
minLength: 3,
});
} );
</script>