Skip to content

Commit

Permalink
Auswahl der Anzeige Einsatzart - Einsatzkategorie
Browse files Browse the repository at this point in the history
  • Loading branch information
veenmeyer committed Apr 19, 2015
1 parent 4ffbcd5 commit 71f30e0
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 6 deletions.
73 changes: 72 additions & 1 deletion administrator/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,28 @@
<option value="left">Links</option>
<option value="right">Rechts</option>
</field>

<field
name="display_tickerkat_icon"
type="radio"
class="btn-group"
default="0"
label="Einsatzkateg.-Icon :"
description="Funktion nur beim Standard-Layout">

<option
value="0">Verbergen</option>
<option
value="1">Anzeigen</option>
</field>
<field
name="float_tickerkat_icon"
type="list"
default="right"
label="Position Einsatzkateg.-Icon :"
description="Funktion nur beim Standard-Layout">
<option value="left">Links</option>
<option value="right">Rechts</option>
</field>
<field
name="display_home_image"
type="radio"
Expand Down Expand Up @@ -952,6 +973,56 @@
hr="true"
/>

<field
name="display_detail_tickerkat"
type="radio"
class="btn-group"
default="1"
description="Hier können Sie einstellen, ob die Einsatzkategorie angezeigt werden sollen."
label="Einsatzkategorie :" >
<option
value="0">Verbergen</option>
<option
value="1">Anzeigen</option>
</field>
<field
name="display_detail_tickerkat_icon"
type="radio"
class="btn-group"
default="1"
description="Hier können Sie einstellen, ob das Einsatzkategorie-Icon angezeigt werden soll."
label="Einsatzkategorie-Icon :" >
<option
value="0">Verbergen</option>
<option
value="1">Anzeigen</option>
</field>

<field
name="display_detail_einsatzart"
type="radio"
class="btn-group"
default="0"
description="Hier können Sie einstellen, ob die Einsatzart angezeigt werden sollen."
label="Einsatzart :" >
<option
value="0">Verbergen</option>
<option
value="1">Anzeigen</option>
</field>
<field
name="display_detail_einsatzart_icon"
type="radio"
class="btn-group"
default="0"
description="Hier können Sie einstellen, ob das Einsatzart-Icon angezeigt werden soll."
label="Einsatzart-Icon :" >
<option
value="0">Verbergen</option>
<option
value="1">Anzeigen</option>
</field>

<field
name="display_alertingtime"
type="radio"
Expand Down
4 changes: 2 additions & 2 deletions administrator/helpers/einsatzkomponente.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static function count_einsatz_daten_bestimmtes_jahr ($selectedYear) {

public static function einsatz_daten_bestimmtes_jahr ($selectedYear,$limit,$limitstart) {
// Funktion : Einsatzdaten für ein bestimmtes Jahr aus der DB holen<br />
$query = 'SELECT COUNT(r.id) as total,r.id,r.image as foto,rd.marker,r.address,r.summary,r.date1,r.data1,r.counter,r.alerting,r.presse,r.gmap_report_latitude,r.gmap_report_longitude,re.image,re.title as alarmierungsart,rd.list_icon,rd.icon,r.desc,r.auswahl_orga,r.state,rd.title as einsatzart FROM #__eiko_einsatzberichte r JOIN #__eiko_einsatzarten rd ON r.data1 = rd.id LEFT JOIN #__eiko_alarmierungsarten re ON re.id = r.alerting WHERE r.date1 LIKE "'.$selectedYear.'%" AND (r.state = "1" OR r.state = "2") and rd.state = "1" and re.state ="1" GROUP BY r.id ORDER BY r.date1 DESC LIMIT '.$limitstart.','.$limit.' ' ;
$query = 'SELECT COUNT(r.id) as total,r.id,r.image as foto,rd.marker,r.address,r.summary,r.date1,r.data1,r.counter,r.alerting,r.presse,r.gmap_report_latitude,r.gmap_report_longitude,re.image,re.title as alarmierungsart,rd.list_icon,rd.icon,r.desc,r.auswahl_orga,r.state,rd.title as einsatzart,r.tickerkat FROM #__eiko_einsatzberichte r JOIN #__eiko_einsatzarten rd ON r.data1 = rd.id LEFT JOIN #__eiko_alarmierungsarten re ON re.id = r.alerting WHERE r.date1 LIKE "'.$selectedYear.'%" AND (r.state = "1" OR r.state = "2") and rd.state = "1" and re.state ="1" GROUP BY r.id ORDER BY r.date1 DESC LIMIT '.$limitstart.','.$limit.' ' ;
$db = JFactory::getDBO();
$db->setQuery( $query );
$result = $db->loadObjectList();
Expand All @@ -137,7 +137,7 @@ public static function einsatz_daten_bestimmtes_jahr ($selectedYear,$limit,$limi

public static function letze_x_einsatzdaten ($x) {
// Funktion : letze x Einsatzdaten laden
$query = 'SELECT r.id,r.image as foto,rd.marker,r.address,r.summary,r.auswahl_orga,r.desc,r.date1,r.data1,r.counter,r.alerting,r.presse,re.image,rd.list_icon,r.auswahl_orga,r.state,rd.title as einsatzart FROM #__eiko_einsatzberichte r JOIN #__eiko_einsatzarten rd ON r.data1 = rd.id LEFT JOIN #__eiko_alarmierungsarten re ON re.id = r.alerting WHERE (r.state = "1" OR r.state = "2") and rd.state = "1" and re.state = "1" ORDER BY r.date1 DESC LIMIT '.$x.' ' ;
$query = 'SELECT r.id,r.image as foto,rd.marker,r.address,r.summary,r.auswahl_orga,r.desc,r.date1,r.data1,r.counter,r.alerting,r.presse,re.image,rd.list_icon,r.auswahl_orga,r.state,rd.title as einsatzart,r.tickerkat FROM #__eiko_einsatzberichte r JOIN #__eiko_einsatzarten rd ON r.data1 = rd.id LEFT JOIN #__eiko_alarmierungsarten re ON re.id = r.alerting WHERE (r.state = "1" OR r.state = "2") and rd.state = "1" and re.state = "1" ORDER BY r.date1 DESC LIMIT '.$x.' ' ;
$db = JFactory::getDBO();
$db->setQuery( $query );
$result = $db->loadObjectList();
Expand Down
28 changes: 25 additions & 3 deletions site/views/einsatzbericht/tmpl/detail_layout_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,45 @@

<!--Headline-->
<h1 class="eiko_headline_2">

<?php if ($this->params->get('display_detail_tickerkat_icon','1') == '1') :?>
<?php if ($this->tickerKat->image) :?>
<img class="eiko_img-rounded_2 eiko_list_icon_2" src="<?php echo JURI::Root();?><?php echo $this->tickerKat->image;?>" alt="eiko_icon" title="<?php echo JText::_($this->tickerKat->title); ?>"/>
<?php endif;?>
<?php endif;?>

<?php if ($this->params->get('display_detail_einsatzart_icon','0') == '1') :?>
<?php if ($this->einsatzlogo->list_icon) :?>
<img class="eiko_img-rounded_2 eiko_list_icon_3" src="<?php echo JURI::Root();?><?php echo $this->einsatzlogo->list_icon;?>" alt="eiko_list_icon" title="<?php echo JText::_($this->einsatzlogo->title); ?>"/>
<?php endif;?>
<?php endif;?>

<span class="eiko_kurzbericht_2"><?php echo $this->item->summary; ?></span>
</h1>
<!--Headline ENDE-->

<!--Einsatzkategorie-->
<?php if ($this->params->get('display_detail_tickerkat','1') == '1') :?>
<?php if( $this->item->tickerkat ) : ?>
<br /><span class="eiko_einsatzkategorie_2">Einsatzkategorie: <?php echo JText::_($this->tickerKat->title); ?></span>
<?php if ($this->params->get('display_detail_hits','1')):?>
<span class="badge pull-right small">Zugriffe: <?php echo $this->item->counter; ?></span>
<?php endif;?>
<div class="eiko_clearfix"></div>
<?php endif;?>
<!--Einsatzkategorie ENDE-->

<!--Einsatzart-->
<?php if ($this->params->get('display_detail_einsatzart','0') == '1') :?>
<?php if( $this->item->data1 ) : ?>
<br /><span class="eiko_einsatzart_2">Einsatzart: <?php echo JText::_($this->einsatzlogo->title); ?></span>
<?php endif;?>
<?php endif;?>
<!--Einsatzart ENDE-->

<?php if ($this->params->get('display_detail_hits','1')):?>
<span class="badge pull-right small">Zugriffe: <?php echo $this->item->counter; ?></span>
<?php endif;?>

<div class="eiko_clearfix"></div>

<!--Einsatzkarte-->
<?php if( $this->item->gmap_report_latitude != '0' ) : ?>
<?php if ($this->params->get('gmap_action','0') == '1') :?>
Expand Down
14 changes: 14 additions & 0 deletions site/views/einsatzberichte/tmpl/main_layout_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,17 @@
$m = '';
$hide=0;
foreach ($this->reports as $item) :

// Funktion : Einsatzkategorie
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query
->select('*')
->from('`#__eiko_tickerkat`')
->where('id = "' .$item->tickerkat.'" AND state = "1" ');
$db->setQuery($query);
$tickerkat = $db->loadObject();

?>
<!-- Filter State-->
<?php if($item->state == '1'): ?>
Expand Down Expand Up @@ -189,6 +200,9 @@

<?php if ($this->params->get('display_list_icon')) : ?>
<img class="img-rounded eiko_img_einsatzart_main_1" style="float:<?php echo $this->params->get('float_list_icon');?>;" src="<?php echo JURI::Root();?><?php echo $item->list_icon;?>" />
<?php endif;?>
<?php if ($this->params->get('display_tickerkat_icon')) : ?>
<img class="img-rounded eiko_img_einsatzart_main_1" style="float:<?php echo $this->params->get('float_tickerkat_icon');?>;" src="<?php echo JURI::Root();?><?php echo $tickerkat->image;?>" />
<?php endif;?>
<?php if ($this->params->get('display_home_links')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente'.$this->layout_detail_link.'&view=einsatzbericht&id=' . (int)$item->id); ?>">
Expand Down

0 comments on commit 71f30e0

Please sign in to comment.