Skip to content

Commit

Permalink
Merge pull request #89 from veenmeyer/beta
Browse files Browse the repository at this point in the history
V3.43.0
  • Loading branch information
veenmeyer authored Mar 24, 2020
2 parents 509b5b3 + 2e5a21b commit 5130991
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 22 deletions.
11 changes: 10 additions & 1 deletion administrator/CHANGELOG.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@
<?php defined('_JEXEC') or die(); ?>
<h1>Einsatzkomponente für das Joomla-CMS</h1>

<h3>Changelog <small>Version 3.43</small></h3>
<ul>
# diverse kleinere Bugfixes
# Fehler beim Sperren und Veröffentlichen in der Einsatzübersicht behoben
+ Anzeige der Einsatznummer in der Detailansicht
# Fehler in Kartenzentrierung (OSM) behoben (in der View Gmap-Konfig.)
# Einsatzorte nur für registr. User anzeigen -> Einsatzübersichts-Karte
</ul>

<h3>Changelog <small>Version 3.42</small></h3>
<ul>
# SQL-Fehler unter MySQL8 behoben
# RSS-Feed Bug behoben
+ Optionaler Emailinfotext bei Automatischer Mailbenachrichtigung
+ Temponär Auto-Emailfunktion abschaltbar
+ Temporär Auto-Emailfunktion abschaltbar
</ul>

<h3>Changelog <small>Version 3.40</small></h3>
Expand Down
28 changes: 27 additions & 1 deletion administrator/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,21 @@
<option
value="1">JYES</option>
</field>


<field
name="display_rss_alerttime"
type="radio"
showon ="display_home_rss:1"
class="btn-group"
default="0"
label="Anzeige Alarmierungszeit"
description="">
<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>

<field
name="display_rss_time"
type="radio"
Expand Down Expand Up @@ -1261,6 +1275,18 @@
<option
value="1">JYES</option>
</field>
<field
name="display_detail_einsatznummer"
type="radio"
class="btn-group"
default="0"
description="Hier können Sie einstellen, ob die Einsatznummer angezeigt werden sollen."
label="Einsatznummer" >
<option
value="0">JNO</option>
<option
value="1">JYES</option>
</field>
<field
name="display_detail_einsatzart_icon"
type="radio"
Expand Down
11 changes: 7 additions & 4 deletions administrator/einsatzkomponente.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2.0" method="upgrade">
<name>com_einsatzkomponente</name>
<creationDate>2020-02-02</creationDate>
<copyright>Copyright (C) 2019 by Ralf Meyer. All rights reserved.</copyright>
<creationDate>2020-03-24</creationDate>
<copyright>Copyright (C) 2020 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.42.0</version>
<version>3.43.0</version>

<description>
<![CDATA[
<h1>Einsatzkomponente</h1><h3>für das Joomla-CMS</h3>
<div style="clear: both;"></div>
<p>Copyright (C) 2018 Ralf Meyer</p>
<p>Copyright (C) 2020 Ralf Meyer</p>
<p>Website: <a href='https://www.einsatzkomponente.de'>www.einsatzkomponente.de</a></p>
<p><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9HDFKVJSKSEFY"><span style="float:right;">Dieses Projekt jetzt unterstützen: <img border=0 src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" /></span></a>
<p><small><span style="float:left;"></br>Alternativ können Sie die Kontodaten per <a href="mailto:[email protected]?Subject=Spende%20Einsatzkomponente%20J3.x" target="_top">Email </a>anfordern.</span></small></p>
</p>
]]>
</description>

Expand Down
2 changes: 1 addition & 1 deletion administrator/helpers/osm.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public static function addRightClickOsmMap()
var m = marker.getLatLng();
map.panTo(new L.LatLng(m.lat, m.lng));
document.getElementById("jform_start_lat").value=m.lat.toFixed(15);
document.getElementById("jform_start_lang").value=m.lat.toFixed(15);
document.getElementById("jform_start_lang").value=m.lng.toFixed(15);
});
map.on('zoomstart',function(e){
var currZoom = map.getZoom();
Expand Down
11 changes: 7 additions & 4 deletions einsatzkomponente.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2.0" method="upgrade">
<name>com_einsatzkomponente</name>
<creationDate>2020-02-02</creationDate>
<copyright>Copyright (C) 2019 by Ralf Meyer. All rights reserved.</copyright>
<creationDate>2020-03-24</creationDate>
<copyright>Copyright (C) 2020 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.42.0</version>
<version>3.43.0</version>

<description>
<![CDATA[
<h1>Einsatzkomponente</h1><h3>für das Joomla-CMS</h3>
<div style="clear: both;"></div>
<p>Copyright (C) 2018 Ralf Meyer</p>
<p>Copyright (C) 2020 Ralf Meyer</p>
<p>Website: <a href='https://www.einsatzkomponente.de'>www.einsatzkomponente.de</a></p>
<p><a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9HDFKVJSKSEFY"><span style="float:right;">Dieses Projekt jetzt unterstützen: <img border=0 src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif" /></span></a>
<p><small><span style="float:left;"></br>Alternativ können Sie die Kontodaten per <a href="mailto:[email protected]?Subject=Spende%20Einsatzkomponente%20J3.x" target="_top">Email </a>anfordern.</span></small></p>
</p>
]]>
</description>

Expand Down
2 changes: 1 addition & 1 deletion site/assets/css/einsatzkomponente.css
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ padding-right:5px;

.eiko_table_ausruestung {width: 100%;}


.icon-first::before {
content: "" !important;
}
Expand All @@ -720,6 +719,7 @@ padding-right:5px;
}



.eiko_detail_image_3 {
width:50%;
max-width:300px;
Expand Down
27 changes: 22 additions & 5 deletions site/controllers/einsatzberichtform.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,29 @@ function publish() {
return false;
}



if ($data['id']):
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->update('#__eiko_einsatzberichte');
$query->set('state = "'.$data['state'].'" ');
$query->where('id ="'.$data['id'].'"');
$db->setQuery((string) $query);
try
{
$db->execute();
$return = true;
}
catch (RuntimeException $e)
{
throw new Exception($e->getMessage(), 500);
}
endif;


// Attempt to save the data.
$return = $model->save($data);
//$return = $model->save($data);

// Check for errors.
if ($return === false) {
Expand All @@ -192,10 +213,6 @@ function publish() {
}


// Check in the profile.
if ($return) {
$model->checkin($return);
}

// Clear the profile id from the session.
//$app->setUserState('com_einsatzkomponente.edit.einsatzbericht.id', null);
Expand Down
4 changes: 3 additions & 1 deletion site/views/einsatzarchiv/tmpl/main_layout_bottom.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<?php if (!$this->params->get('eiko')) : ?>
<tr><!-- Bitte das Copyright nicht entfernen. Danke. -->
<td colspan="<?php echo $eiko_col; ?>">
<span class="copyright">Einsatzkomponente V<?php echo $this->version; ?> (C) 2017 by Ralf Meyer ( <a class="copyright_link" href="https://einsatzkomponente.de" target="_blank">www.einsatzkomponente.de</a> )</span>
<span class="copyright">Einsatzkomponente V<?php echo $this->version; ?> (C) 2020 by Ralf Meyer ( <a class="copyright_link" href="https://einsatzkomponente.de" target="_blank">www.einsatzkomponente.de</a> )</span>
</td>
</tr>
<?php endif; ?>
Expand Down Expand Up @@ -49,8 +49,10 @@
<?php OsmHelper::callOsmMap($this->gmap_config->gmap_zoom_level,$this->gmap_config->start_lat,$this->gmap_config->start_lang); ?>

<?php if ($this->params->get('display_home_missions','1')) :?>
<?php if ($this->params->get('display_detail_map_for_only_user','0')) :?>
<?php OsmHelper::addEinsatzorteMap($this->einsatzorte);?>
<?php endif;?>
<?php endif;?>
<?php if ($this->params->get('display_home_organisationen','1')) :?>
<?php OsmHelper::addOrganisationenMap($this->organisationen);?>
<?php endif;?>
Expand Down
4 changes: 4 additions & 0 deletions site/views/einsatzarchiv/view.feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ public function display($tpl = null) {

$rss_item->description .= '<table>';

if ($item->date1 >1 and $this->params->get('display_rss_alerttime','0')) :
$rss_item->description .= '<tr><td><b>Alarmierung am</b>: '.date('d.m.Y', $item->date1).' um '.date('H:i', $item->date1).' Uhr</td></tr>';
endif;


if ($desc) :
$rss_item->description .= '<tr><td>'.$desc.'</td></tr>';
Expand Down
7 changes: 6 additions & 1 deletion site/views/einsatzbericht/tmpl/detail_layout_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

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

Expand All @@ -46,6 +46,11 @@
<?php endif;?>

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

<?php if ($this->params->get('display_detail_einsatznummer','0') == '1') :?>
<small style="font-size:smaller;" class="text-muted eiko_detail_einsatznummer"><?php echo JText::_('</br>(Einsatz-Nr.'); ?> <?php echo $this->einsatznummer.')'; ?></small>
<?php endif;?>

</h1>
<!--Headline ENDE-->

Expand Down
6 changes: 5 additions & 1 deletion site/views/einsatzbericht/tmpl/detail_layout_2.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@
</table>
<br/>

<h4 class="headline"><?php echo $this->item->summary; ?></h4>
<h4 class="headline"><?php echo $this->item->summary; ?>
<?php if ($this->params->get('display_detail_einsatznummer','0') == '1') :?>
<small style="font-size:smaller;" class="text-muted eiko_detail_einsatznummer"><?php echo JText::_('</br>(Einsatz-Nr.'); ?> <?php echo $this->einsatznummer.')'; ?></small>
<?php endif;?>
</h4>

<!--Einsatzbericht anzeigen mit Plugin-Support-->
<?php if( $this->item->desc) : ?>
Expand Down
4 changes: 4 additions & 0 deletions site/views/einsatzbericht/tmpl/detail_layout_3.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
</span> am
<span class="published"><?php echo date("d.m.Y", strtotime($this->item->createdate)).''; ?>
</span>
<?php if ($this->params->get('display_detail_einsatznummer','0') == '1') :?>
<span style="font-size:smaller;" class="text-muted eiko_detail_einsatznummer"><?php echo JText::_('</br>(Einsatz-Nr.'); ?> <?php echo $this->einsatznummer.')'; ?></span>
<?php endif;?>

</p>

<div class="clear"></div>
Expand Down
5 changes: 5 additions & 0 deletions site/views/einsatzbericht/tmpl/detail_layout_4.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<td class="layout4_row_1" style="border:hidden;">
<!--Navigation-->
<div class="eiko_navbar_2 " style="left"><?php echo $this->navbar;?></div>

<?php if ($this->params->get('display_detail_einsatznummer','0') == '1') :?>
<div class="text-muted eiko_detail_einsatznummer"><?php echo JText::_('</br>(Einsatz-Nr.'); ?> <?php echo $this->einsatznummer.')'; ?></div>
<?php endif;?>

<!--Navigation ENDE-->
</td>
<!--<td class="layout4_row_2" style="border:hidden;">
Expand Down
6 changes: 4 additions & 2 deletions site/views/einsatzbericht/view.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class EinsatzkomponenteViewEinsatzbericht extends JViewLegacy {
protected $einsatzdauer; //
protected $organisationen;
protected $einsatzgebiet;
protected $einsatznummer;
/**
* Display the view
*/
Expand All @@ -42,9 +43,9 @@ public function display($tpl = null) {
//echo $selectedOrga;
$user = JFactory::getUser();
//$id = $app->input->get(id);

$this->state = $this->get('State');
$this->item = $this->get('Data');
$this->item = $this->get('Data');

$this->images = EinsatzkomponenteHelper::getEinsatzbilder($this->item->id);
$this->prev_id = EinsatzkomponenteHelper::getPrev_id($this->item->date1,$selectedOrga);
$this->next_id = EinsatzkomponenteHelper::getNext_id($this->item->date1,$selectedOrga);
Expand All @@ -56,6 +57,7 @@ public function display($tpl = null) {
$this->tickerKat = EinsatzkomponenteHelper::getTickerKat($this->item->tickerkat);
$this->alarmierungsart = EinsatzkomponenteHelper::getAlarmierungsart($this->item->alerting);
$this->einsatzdauer = EinsatzkomponenteHelper::getEinsatzdauer($this->item->date1,$this->item->date3);
$this->einsatznummer = EinsatzkomponenteHelper::ermittle_einsatz_nummer(strtotime($this->item->date1),$this->item->data1);
// Get active menu
$app = JFactory::getApplication();
$menus = $app->getMenu();
Expand Down
2 changes: 2 additions & 0 deletions site/views/einsatzberichtform/tmpl/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
$lang = JFactory::getLanguage();
$lang->load('com_einsatzkomponente', JPATH_ADMINISTRATOR);

$rImages = '';

require_once JPATH_SITE.'/administrator/components/com_einsatzkomponente/helpers/einsatzkomponente.php'; // Helper-class laden
$app = JFactory::getApplication();
$params = $app->getParams('com_einsatzkomponente');
Expand Down

0 comments on commit 5130991

Please sign in to comment.