* Goteo is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Goteo. If not, see <http://www.gnu.org/licenses/agpl.txt>. * */ use Goteo\Library\Text, Goteo\Library\Content; $bodyClass = 'admin'; $table = $this['table']; $id = $this['id']; $content = Content::get($table, $id, $_SESSION['translator_lang']); $sizes = array('title' => 'cols="100" rows="2"', 'name' => 'cols="100" rows="1"', 'description' => 'cols="100" rows="4"', 'url' => 'cols="100" rows="1"', 'text' => 'cols="100" rows="10"'); $fields = Content::_fields(); ?> <div class="widget board"> <form action="/translate/<?php echo $table; ?> /edit/<?php echo $id; ?> /<?php echo $this['filter'] . '&page=' . $_GET['page']; ?> " method="post" > <input type="hidden" name="table" value="<?php echo $table; ?>
//recolocamos los post para la paginacion $list = array(); foreach ($data['pending'] as $key=>$item) { $item->pendiente = 1; $list[] = $item; } foreach ($data['ready'] as $key=>$item) { $item->pendiente = 0; $list[] = $item; } $pagedResults = new \Paginated($list, 20, isset($_GET['page']) ? $_GET['page'] : 1); // valores de filtro $fields = Content::_fields(); // por tipo de campo $types = $fields[$table]; // metemos el todos \array_unshift($types, Text::_('Todos los tipos')); ?> <!-- Filtro --> <div class="widget board"> <form id="filter-form" action="/translate/<?php echo $table ?>/list/<?php echo $filter ?>" method="get"> <input type="hidden" name="table" value="<?php echo $table ?>" /> <label for="filter-<?php echo $id; ?>"><?php echo Text::get('dashboard-translate_filter'); ?></label> <select id="filter-<?php echo $id; ?>" name="<?php echo $id; ?>" onchange="document.getElementById('filter-form').submit();"> <?php foreach ($types as $val=>$opt) : ?> <option value="<?php echo $val; ?>"<?php if ($this['filters']['type'] == $val) echo ' selected="selected"';?>><?php echo $opt; ?></option>