slide countdown e highlist modulo aggiornato 5 v

This commit is contained in:
2025-01-03 18:30:52 +01:00
parent 8779fa0b74
commit 024ea6956d
37 changed files with 1965 additions and 282 deletions

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="filter">
<field name="search" type="text" hint="COM_HIGHLIGHTS_SEARCH_FILTER_SUBMIT"
label="COM_USERS_FILTER_SEARCH_DESC"
class="js-stools-search-string" />
<field name="etichetta" type="sql" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_ETICHETTA" query="SELECT `nome` AS `nome`, `nome` AS val FROM `#__highlights_etichetta`" header="COM_HIGHLIGHTS_HIGHLIGHTS_ETICHETTA_FILTER" key_field="nome" value_field="val" class="inputbox" onchange="this.form.submit()" translate="true"/>
</fields>
<fields name="list">
<field name="fullordering"
type="list"
label="COM_HIGHLIGHTS_LIST_FULL_ORDERING"
description="COM_HIGHLIGHTS_LIST_FULL_ORDERING_DESC"
onchange="this.form.submit();"
default="a.id DESC"
>
<option value="">JGLOBAL_SORT_BY</option>
<option value="a.id ASC">COM_HIGHLIGHTS_ID_ASC</option><option value="a.id DESC">COM_HIGHLIGHTS_ID_DESC</option><option value="a.state ASC">COM_HIGHLIGHTS_STATE_ASC</option><option value="a.state DESC">COM_HIGHLIGHTS_STATE_DESC</option><option value="a.ordering ASC">COM_HIGHLIGHTS_ORDERING_ASC</option><option value="a.ordering DESC">COM_HIGHLIGHTS_ORDERING_DESC</option><option value="a.etichetta ASC">COM_HIGHLIGHTS_ETICHETTA_ASC</option><option value="a.etichetta DESC">COM_HIGHLIGHTS_ETICHETTA_DESC</option><option value="a.titolo ASC">COM_HIGHLIGHTS_TITOLO_ASC</option><option value="a.titolo DESC">COM_HIGHLIGHTS_TITOLO_DESC</option>
</field>
<field name="limit"
type="limitbox"
label="COM_HIGHLIGHTS_LIST_LIMIT"
description="COM_HIGHLIGHTS_LIST_LIMIT_DESC"
class="input-mini"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>

View File

@ -15,13 +15,21 @@
<field name="titolo" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_TITOLO" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_TITOLO" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_TITOLO"/>
<field name="sottotitolo" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_SOTTOTITOLO" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_SOTTOTITOLO" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_SOTTOTITOLO"/>
<field name="descrizione" editor="|" buttons="false" filter="JComponentHelper::filterText" type="editor" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DESCRIZIONE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_DESCRIZIONE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DESCRIZIONE"/>
<field name="lingua" client="administrator" type="language" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINGUA" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_LINGUA" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINGUA"/>
<field name="link_pulsante" validate="url" type="url" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PULSANTE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_LINK_PULSANTE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PULSANTE"/>
<field name="lingua" type="contentlanguage" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINGUA" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_LINGUA" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINGUA">
<option value="*">JALL</option>
</field>
<field name="link_pulsante" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PULSANTE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_LINK_PULSANTE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PULSANTE"/>
<field name="link_pdf" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PDF" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_LINK_PDF" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PDF"/>
<field name="testo_pulsante" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_TESTO_PULSANTE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_TESTO_PULSANTE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_TESTO_PULSANTE"/>
<field name="data" class="inputbox" format="%Y-%m-%d" timeformat="12" filter="server_utc" translateformat="false" showtime="false" singleheader="false" todaybutton="false" weeknumbers="false" filltable="false" type="calendar" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_DATA" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA"/>
<field name="classe" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_CLASSE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE"/>
<field name="immagine_main" directory="" type="media" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_IMMAGINE_MAIN" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_IMMAGINE_MAIN" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_IMMAGINE_MAIN"/>
<field name="immagine_secondaria" directory="" type="media" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_IMMAGINE_SECONDARIA" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_IMMAGINE_SECONDARIA" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_IMMAGINE_SECONDARIA"/>
<field name="classe" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_CLASSE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE"/>
<field name="colore_testo" default="00000" format="hex" type="color" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_COLORE_TESTO" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO"/>
<field name="colore_sfondo" default="00000" format="hex" type="color" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_COLORE_SFONDO" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO"/>
<field name="opacita" filter="safehtml" type="text" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_OPACITA" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_OPACITA" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_OPACITA"/>
<field name="colore_sfondo_bottone" default="00000" format="hex" type="color" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO_BOTTONE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_COLORE_SFONDO_BOTTONE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO_BOTTONE"/>
<field name="colore_testo_bottone" default="00000" format="hex" type="color" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO_BOTTONE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_COLORE_TESTO_BOTTONE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO_BOTTONE"/>
<field name="data_inizio_pubblicazione" class="inputbox" format="%Y-%m-%d" timeformat="12" filter="server_utc" translateformat="false" showtime="false" singleheader="false" todaybutton="false" weeknumbers="false" filltable="false" type="calendar" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA_INIZIO_PUBBLICAZIONE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_DATA_INIZIO_PUBBLICAZIONE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA_INIZIO_PUBBLICAZIONE"/>
<field name="data_fine_pubblicazione" class="inputbox" format="%Y-%m-%d" timeformat="12" filter="server_utc" translateformat="false" showtime="false" singleheader="false" todaybutton="false" weeknumbers="false" filltable="false" type="calendar" label="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA_FINE_PUBBLICAZIONE" description="COM_HIGHLIGHTS_FORM_DESC_HIGHLIGHT_DATA_FINE_PUBBLICAZIONE" hint="COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA_FINE_PUBBLICAZIONE"/>
<field name="version_note" type="text" label="JGLOBAL_FIELD_VERSION_NOTE_LABEL" description="JGLOBAL_FIELD_VERSION_NOTE_DESC" class="inputbox" size="45" labelclass="control-label"/>

View File

@ -53,11 +53,17 @@ class HighlightsModel extends ListModel
'descrizione', 'a.descrizione',
'lingua', 'a.lingua',
'link_pulsante', 'a.link_pulsante',
'link_pdf', 'a.link_pdf',
'testo_pulsante', 'a.testo_pulsante',
'data', 'a.data',
'classe', 'a.classe',
'immagine_main', 'a.immagine_main',
'immagine_secondaria', 'a.immagine_secondaria',
'classe', 'a.classe',
'colore_testo', 'a.colore_testo',
'colore_sfondo', 'a.colore_sfondo',
'opacita', 'a.opacita',
'colore_sfondo_bottone', 'a.colore_sfondo_bottone',
'colore_testo_bottone', 'a.colore_testo_bottone',
'data_inizio_pubblicazione', 'a.data_inizio_pubblicazione',
'data_fine_pubblicazione', 'a.data_fine_pubblicazione',
);
@ -186,6 +192,14 @@ class HighlightsModel extends ListModel
}
// Filtering etichetta
$filter_etichetta = $this->state->get("filter.etichetta");
if ($filter_etichetta)
{
$query->where("a.`etichetta` = '".$db->escape($filter_etichetta)."'");
}
// Add the list ordering clause.

View File

@ -48,7 +48,8 @@ class HtmlView extends BaseHtmlView
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->params = $app->getParams('com_highlights');
$this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters');
// Check for errors.
if (count($errors = $this->get('Errors')))

View File

@ -65,6 +65,11 @@ if (!$canEdit && Factory::getApplication()->getIdentity()->authorise('core.edit.
<td><?php echo $this->item->link_pulsante; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_LINK_PDF'); ?></th>
<td><?php echo $this->item->link_pdf; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_TESTO_PULSANTE'); ?></th>
<td><?php echo $this->item->testo_pulsante; ?></td>
@ -80,11 +85,6 @@ if (!$canEdit && Factory::getApplication()->getIdentity()->authorise('core.edit.
</td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE'); ?></th>
<td><?php echo $this->item->classe; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_IMMAGINE_MAIN'); ?></th>
<td><?php echo $this->item->immagine_main; ?></td>
@ -95,6 +95,36 @@ if (!$canEdit && Factory::getApplication()->getIdentity()->authorise('core.edit.
<td><?php echo $this->item->immagine_secondaria; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_CLASSE'); ?></th>
<td><?php echo $this->item->classe; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO'); ?></th>
<td><?php echo $this->item->colore_testo; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO'); ?></th>
<td><?php echo $this->item->colore_sfondo; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_OPACITA'); ?></th>
<td><?php echo $this->item->opacita; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_SFONDO_BOTTONE'); ?></th>
<td><?php echo $this->item->colore_sfondo_bottone; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_COLORE_TESTO_BOTTONE'); ?></th>
<td><?php echo $this->item->colore_testo_bottone; ?></td>
</tr>
<tr>
<th><?php echo Text::_('COM_HIGHLIGHTS_FORM_LBL_HIGHLIGHT_DATA_INIZIO_PUBBLICAZIONE'); ?></th>
<td> <?php

View File

@ -11,10 +11,10 @@
label="COM_HIGHLIGHTS_FIELDSET_ITEM_ID_SELECT_LABEL">
<field
name="id"
query="SELECT `id`, `titolo` FROM #__highlights_ ORDER BY `id`"
query="SELECT `id`, `ordering` FROM #__highlights_ ORDER BY `id`"
type="sql"
key_field="id"
value_field="titolo"
value_field="ordering"
label="COM_HIGHLIGHTS_ITEM_ID_SELECT_LABEL"
require="true"
description="JGLOBAL_SHOW_TITLE_DESC">

View File

@ -73,18 +73,32 @@ $canEdit = HighlightsHelper::canUserEdit($this->item, $user);
<?php echo $this->form->renderField('link_pulsante'); ?>
<?php echo $this->form->renderField('link_pdf'); ?>
<?php echo $this->form->renderField('testo_pulsante'); ?>
<?php echo $this->form->renderField('data'); ?>
<?php echo $this->form->renderField('classe'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'Immagini', Text::_('COM_HIGHLIGHTS_TAB_IMMAGINI', true)); ?>
<?php echo $this->form->renderField('immagine_main'); ?>
<?php echo $this->form->renderField('immagine_secondaria'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'Stile', Text::_('COM_HIGHLIGHTS_TAB_STILE', true)); ?>
<?php echo $this->form->renderField('classe'); ?>
<?php echo $this->form->renderField('colore_testo'); ?>
<?php echo $this->form->renderField('colore_sfondo'); ?>
<?php echo $this->form->renderField('opacita'); ?>
<?php echo $this->form->renderField('colore_sfondo_bottone'); ?>
<?php echo $this->form->renderField('colore_testo_bottone'); ?>
<?php echo HTMLHelper::_('uitab.endTab'); ?>
<?php echo HTMLHelper::_('uitab.addTab', 'myTab', 'Pubblicazione', Text::_('COM_HIGHLIGHTS_TAB_PUBBLICAZIONE', true)); ?>
<?php echo $this->form->renderField('data_inizio_pubblicazione'); ?>

View File

@ -44,7 +44,7 @@ $wa->useStyle('com_highlights.list');
<?php endif;?>
<form action="<?php echo htmlspecialchars(Uri::getInstance()->toString()); ?>" method="post"
name="adminForm" id="adminForm">
<?php if(!empty($this->filterForm)) { echo LayoutHelper::render('joomla.searchtools.default', array('view' => $this)); } ?>
<div class="table-responsive">
<table class="table table-striped" id="highlightList">
<thead>
@ -106,13 +106,7 @@ $wa->useStyle('com_highlights.list');
</a>
</td>
<td>
<?php $canCheckin = Factory::getApplication()->getIdentity()->authorise('core.manage', 'com_highlights.' . $item->id) || $item->checked_out == Factory::getApplication()->getIdentity()->id; ?>
<?php if($canCheckin && $item->checked_out > 0) : ?>
<a href="<?php echo Route::_('index.php?option=com_highlights&task=highlight.checkin&id=' . $item->id .'&'. Session::getFormToken() .'=1'); ?>">
<?php echo HTMLHelper::_('jgrid.checkedout', $i, $item->uEditor, $item->checked_out_time, 'highlight.', false); ?></a>
<?php endif; ?>
<a href="<?php echo Route::_('index.php?option=com_highlights&view=highlight&id='.(int) $item->id); ?>">
<?php echo $this->escape($item->titolo); ?></a>
<?php echo $item->titolo; ?>
</td>
<td>
<?php echo $item->etichetta; ?>