Initial commit
This commit is contained in:
92
sna/application/views/home/legend_view.php
Normal file
92
sna/application/views/home/legend_view.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
Slovenski narečni atlas / Slovenian dialectal atlas
|
||||
Copyright (C) 2017 Gregor Šajn
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
if(isset($legend) and $legend)
|
||||
{
|
||||
$last = array_pop($legend);
|
||||
ksort($legend);
|
||||
array_push($legend,$last);
|
||||
?>
|
||||
<div class="info-panel-image-borders legend">
|
||||
<div class="legend_title text-left" style="font-size:14pt">
|
||||
<strong><span>Legenda</span></strong>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><input type="checkbox" class="toggle_all" checked="1"/></th>
|
||||
<th class="text-center">Znak</th>
|
||||
<th class="text-center">Leksem</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<?
|
||||
foreach($legend as $title=>$row)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" checked="1" id="icons-<?=$row['code_title']?>" class="toggle_icons"/></td>
|
||||
<td class="text-center SIMBola" style="color:<?=$row['icon_color']?>;"><?=$row['icon']?></td>
|
||||
<td class="text-center">
|
||||
<?
|
||||
if($title=='no_title')
|
||||
{
|
||||
echo "ni odgovora";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $title;
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
$('.toggle_icons').click(function() {
|
||||
var icons = $(this).attr('id');
|
||||
|
||||
$('.'+icons).toggle();
|
||||
});
|
||||
|
||||
|
||||
$(".toggle_all").click(function () {
|
||||
if($(this).is(":checked"))
|
||||
$(".icons_all").show();
|
||||
else
|
||||
$(".icons_all").hide();
|
||||
|
||||
$('input:checkbox').not(this).prop('checked', this.checked);
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user