Skip to content

Commit

Permalink
diverse Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
veenmeyer committed Aug 6, 2017
1 parent e553829 commit 6b3eeec
Show file tree
Hide file tree
Showing 19 changed files with 137 additions and 61 deletions.
2 changes: 2 additions & 0 deletions administrator/CHANGELOG.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

<h3>Changelog <small>Version 3.17</small></h3>
<ul>
+ Presselinkinfo in Übersicht als Icon möglich
+ Fahrzeugübersicht: Anzeige nach Organisation möglich
# Einsatz im Frontend eintragen unter PHP7.1
# Fahrzeugübersicht: Ausser Dienst gestellte FHZ konnten nicht gefiltert werden
# Fahrzeugübersicht: Ausser Dienst gestellte FHZ wurden nicht angezeigt
Expand Down
26 changes: 26 additions & 0 deletions administrator/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,16 @@
<option
value="1">JYES</option>
</field>

<field name="presse_image" type="media"
label="COM_EINSATZKOMPONENTE_OPTION_PRESSEIMAGE_WAEHLEN"
description="Sie können hier ein Bild als Presselink auswählen"
filter="raw"
preview="true"
preview_height="80px"
showon="display_home_presse:1"
directory="com_einsatzkomponente/" />

<field
name="display_home_image_nopic"
type="radio"
Expand Down Expand Up @@ -1062,6 +1072,22 @@
<option
value="1">JYES</option>
</field>

<field
name="display_home_links_3"
type="radio"
showon ="display_home_links:1"
class="btn-group"
default="0"
label="COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_LINK_DETAILBERICHT_AUF_BILD"
description="Funktion nur beim Standard-Layout und Layout1">

<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>

<field
name="display_home_info"
type="radio"
Expand Down
6 changes: 3 additions & 3 deletions administrator/language/de-DE.com_einsatzkomponente.ini
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_EINSATZBILD = "Einsatzbild"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_ZUGRIFFE = "Zugriffe"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_ORGANISATIONEN = "Organisationen"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_INFO_ZU_PRESSELINKS = "Info zu Presselinks"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_ERSATZBILD = "Ersatzbild"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_ERSATZBILD = "Titel-Ersatzbild"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_BILDBREITE = "Bildbreite"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_LINK_DETAILBERICHT = "Link zum Detailbericht"
COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_LINK_DETAILBERICHT_AUF_EINSATZART = "Link zum Detailbericht (auf Einsatzart)"
Expand Down Expand Up @@ -891,5 +891,5 @@ COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_MISSION_NUMBER_YES_NEW = "Ja (Nr. xx
COM_EINSATZKOMPONENTE_ARTIKEL_JOOMLA_LINK = "verlinker Joomla-Artikel"

COM_EINSATZKOMPONENTE_OPTION_EINSATZ_DETAILANSICHT_DESC = "Zeige Einsatzbericht-Text"


COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_LINK_DETAILBERICHT_AUF_BILD ="Detaillink auf Bild"
COM_EINSATZKOMPONENTE_OPTION_PRESSEIMAGE_WAEHLEN ="Bild Presselink"
4 changes: 2 additions & 2 deletions administrator/language/en-GB.com_einsatzkomponente.ini
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,8 @@ COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_MISSION_NUMBER_YES_NEW = "Yes (Nr. x
COM_EINSATZKOMPONENTE_ARTIKEL_JOOMLA_LINK = "link to Joomla-Article"

COM_EINSATZKOMPONENTE_OPTION_EINSATZ_DETAILANSICHT_DESC = "Show Mission-Description"


COM_EINSATZKOMPONENTE_OPTION_EINSATZBERICHT_LINK_DETAILBERICHT_AUF_BILD ="Detaillink on Image"
COM_EINSATZKOMPONENTE_OPTION_PRESSEIMAGE_WAEHLEN ="Image Presslink"



Expand Down
13 changes: 0 additions & 13 deletions administrator/sql/updates/mysql/3.16.14_beta.sql

This file was deleted.

13 changes: 0 additions & 13 deletions administrator/sql/updates/mysql/3.16.15_beta.sql

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions einsatzkomponente.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2.0" method="upgrade">
<name>com_einsatzkomponente</name>
<creationDate>2017-08-01</creationDate>
<creationDate>2017-08-06</creationDate>
<copyright>Copyright (C) 2017 by Ralf Meyer. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<author>Ralf Meyer</author>
<authorEmail>[email protected]</authorEmail>
<authorUrl>https://einsatzkomponente.de</authorUrl>
<version>3.16.16_beta</version>
<version>3.17</version>

<description>
<![CDATA[
Expand Down
10 changes: 10 additions & 0 deletions site/models/einsatzberichtform.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,16 @@ protected function loadFormData()
{
$data = $this->getData();

$data->auswahl_orga = implode(',',$array);
if ($data->auswahl_orga == '') : // Vorbelegung Organisationen
//$db = JFactory::getDbo();
//$db->setQuery('SELECT id,ffw FROM #__eiko_organisationen WHERE ffw="1" LIMIT 1');
//$standard = $db->loadResult();
//$data->auswahl_orga = $standard['id'];
$params = JComponentHelper::getParams('com_einsatzkomponente');
$data->auswahl_orga = $params->get('pre_auswahl_orga','');
endif;

$params = JComponentHelper::getParams('com_einsatzkomponente');
$data->watermark_image = $params->get('watermark_image','');

Expand Down
23 changes: 19 additions & 4 deletions site/models/einsatzfahrzeuge.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,25 @@ protected function getListQuery()


// Filtering department
$filter_department = $this->state->get("filter.department");
if ($filter_department != '') {
$query->where("FIND_IN_SET('" . $db->escape($filter_department) . "',a.department)");
}
$app = JFactory::getApplication();
$params = $app->getParams('com_einsatzkomponente');
$array = array();
$filter_orga = $params->get('filter_orga');

if ($filter_orga) :
foreach((array)$params->get('filter_orga') as $value):
if(!is_array($value)):
$array[] = $value;
endif;
endforeach;

$string = '';
foreach($array as $value):
$string .= 'a.department = '.$value.' OR ';
endforeach;
$string = substr ( $string, 0, -3 );
$query->where($string);
endif;

// Filtering ausruestung
$filter_ausruestung = $this->state->get("filter.ausruestung");
Expand Down
16 changes: 11 additions & 5 deletions site/views/einsatzarchiv/tmpl/main_layout_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root();?><?php echo $item->image;?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>
<?php endif;?>
Expand All @@ -282,13 +282,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root().'images/com_einsatzkomponente/einsatzbilder/nopic.png';?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>
<?php endif;?>
Expand Down Expand Up @@ -322,7 +322,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php if ($this->params->get('display_home_presse','0')) : ?>
<td class="mobile_hide_480 ">
<?php if ($item->presse or $item->presse2 or $item->presse3) : ?>
<?php echo ''.JText::_('COM_EINSATZKOMPONENTE_EINSATZBERICHTE_PRESSEBERICHT').''; ?>

<?php if ($this->params->get('presse_image','')) : ?>
<img class="eiko_icon_press" src="<?php echo JURI::Root();?><?php echo $this->params->get('presse_image','');?>" title="" />
<?php else:?>
<?php echo ''.JText::_('COM_EINSATZKOMPONENTE_EINSATZBERICHTE_PRESSEBERICHT').''; ?>
<?php endif;?>

<?php endif;?>
</td>
<?php endif; ?>
Expand Down
8 changes: 4 additions & 4 deletions site/views/einsatzarchiv/tmpl/main_layout_2.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root();?><?php echo $item->image;?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif; ?>
<?php endif;?>
Expand All @@ -226,13 +226,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root().'images/com_einsatzkomponente/einsatzbilder/nopic.png';?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>
<?php endif;?>
Expand Down
14 changes: 10 additions & 4 deletions site/views/einsatzarchiv/tmpl/main_layout_3.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php if ($this->params->get('display_home_presse','0')) : ?>
<?php if ($item->presse or $item->presse2 or $item->presse3) : ?>
</br>

<?php if ($this->params->get('presse_image','')) : ?>
<img class="eiko_icon_press" src="<?php echo JURI::Root();?><?php echo $this->params->get('presse_image','');?>" title="" />
<?php else:?>

<?php echo '<i class="icon-file-2" ></i> '.JText::_('COM_EINSATZKOMPONENTE_WEITERE_PRESSELINKS').''; ?>
<?php endif;?>
<?php endif;?>
<?php endif; ?>

Expand Down Expand Up @@ -209,11 +215,11 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>
<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','150px');?>;" src="<?php echo JURI::Root();?><?php echo $item->image;?>"/>
<?php if ($this->params->get('display_home_links','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif; ?>
<?php endif;?>
Expand All @@ -222,11 +228,11 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>
<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','150px');?>;" src="<?php echo JURI::Root().'images/com_einsatzkomponente/einsatzbilder/nopic.png';?>"/>
<?php if ($this->params->get('display_home_links','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif; ?>
<?php endif;?>
Expand Down
12 changes: 8 additions & 4 deletions site/views/einsatzarchiv/tmpl/main_layout_4.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@

<?php if ($this->params->get('display_home_presse','0') ) : ?>
<th class='left'>
<?php if ($this->params->get('presse_image','')) : ?>
<img class="eiko_icon_press" src="<?php echo JURI::Root();?><?php echo $this->params->get('presse_image','');?>" title="" />
<?php else:?>
<?php echo JText::_('COM_EINSATZKOMPONENTE_EINSATZBERICHTE_PRESSEBERICHT'); ?>
<?php endif;?>
<?php $eiko_col = $eiko_col+1;?>
</th>
<?php endif;?>
Expand Down Expand Up @@ -288,13 +292,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root();?><?php echo $item->image;?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>
<?php endif;?>
Expand All @@ -303,13 +307,13 @@ class="icon-plus"></i> <?php echo JText::_('COM_EINSATZKOMPONENTE_ADD'); ?></a>
<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'einsatzarchiv.', $canCheckin); ?>
<?php endif; ?>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>

<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root().'images/com_einsatzkomponente/einsatzbilder/nopic.png';?>"/>

<?php if ($this->params->get('display_home_links_2','1')) : ?>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>
<?php endif;?>
Expand Down
4 changes: 2 additions & 2 deletions site/views/einsatzbericht/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,11 @@ public function display($tpl = null) {

if ($this->item->summary)
{ $summary = strip_tags($this->item->summary);
$opengraph .= '<meta property="og:description" content="Datum: '.date('d.m.Y', strtotime($this->item->date1)).' --- Ort: #'.$this->item->address.' --- #'.$summary.'" />';
$opengraph .= '<meta property="og:description" content="Datum: '.date('d.m.Y', strtotime($this->item->date1)).' --- Ort: '.$this->item->address.' --- '.$summary.'" />';
}
if ($this->item->desc)
{ $desc = strip_tags($this->item->desc);
$opengraph .= '<meta property="og:description" content="Datum: '.date('d.m.Y', strtotime($this->item->date1)).' --- Ort: #'.$this->item->address.' --- #'.$desc.'" />';
$opengraph .= '<meta property="og:description" content="Datum: '.date('d.m.Y', strtotime($this->item->date1)).' --- Ort: '.$this->item->address.' --- '.$desc.'" />';
}


Expand Down
16 changes: 15 additions & 1 deletion site/views/einsatzberichte/tmpl/main_layout_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,17 @@

<?php if ($this->params->get('display_home_image')) : ?>
<?php if ($item->foto) : ?>
<td class="mobile_hide_480 eiko_td_einsatzbild_main_1"> <img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root();?><?php echo $item->foto;?>"/></td>
<td class="mobile_hide_480 eiko_td_einsatzbild_main_1">

<?php if ($this->params->get('display_home_links_3','0')) : ?>
<a href="<?php echo JRoute::_('index.php?option=com_einsatzkomponente&view=einsatzbericht&id='.(int) $item->id); ?>">
<?php endif; ?>
<img class="img-rounded eiko_img_einsatzbild_main_1" style="width:<?php echo $this->params->get('display_home_image_width','80px');?>;" src="<?php echo JURI::Root();?><?php echo $item->foto;?>"/>
<?php if ($this->params->get('display_home_links_3','0')) : ?>
</a>
<?php endif;?>

</td>
<?php endif;?>
<?php if (!$item->foto) : ?>
<?php if ($this->params->get('display_home_image_nopic','0')) : ?>
Expand All @@ -310,8 +320,12 @@
<?php if ($this->params->get('display_home_presse','0')) : ?>
<td class="mobile_hide_480 mobile_hide_presse">
<?php if ($item->presse or $item->presse2 or $item->presse3) : ?>
<?php if ($this->params->get('presse_image','')) : ?>
<img class="eiko_icon_press" src="<?php echo JURI::Root();?><?php echo $this->params->get('presse_image','');?>" title="" />
<?php else:?>
<?php echo JText::_('COM_EINSATZKOMPONENTE_PRESSELINK'); ?>
<?php endif;?>
<?php endif;?>
</td>
<?php endif; ?>

Expand Down
Loading

0 comments on commit 6b3eeec

Please sign in to comment.