Merge branch '12300' into 12400

This commit is contained in:
Fred Tempez 2023-03-06 15:24:11 +01:00
commit b2c25db925
6 changed files with 64 additions and 74 deletions

View File

@ -3162,12 +3162,6 @@ class core extends common
'style' => file_get_contents($stylePath)
]);
}
if ($output['style']) {
$this->addOutput([
//'style' => $this->output['style'] . file_get_contents($output['style'])
'style' => file_get_contents($output['style'])
]);
}
// JS
$scriptPath = $modulePath . self::MODULE_DIR . $moduleId . '/view/' . $output['view'] . '/' . $output['view'] . '.js.php';

View File

@ -1,4 +1,14 @@
<?php if ($module::$articles) : ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
<img src='module/blog/ressource/feed-icon-16.gif' />
<?php
echo $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) ? '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>' : '';
?>
</a>
</div>
<?php endif; ?>
<article>
<?php foreach ($module::$articles as $articleId => $article) : ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'articlesLenght']) === 0) : ?>
@ -143,16 +153,6 @@
<?php endforeach; ?>
</article>
<?php echo $module::$pages; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
<img src='module/blog/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
?>
</a>
</div>
<?php endif; ?>
<?php else : ?>
<?php echo template::speech('Aucun article'); ?>
<?php endif; ?>

View File

@ -1,6 +1,7 @@
# Version 4.4
- Intl date Formats
- Modification liées à la suppression de flatpickr
- Bug un conflit avec le style de la page
- Modifications liées à la suppression de flatpickr
# Version 4.3
- Multilinguisme
# Version 4.23

View File

@ -266,8 +266,7 @@ class news extends common
// Générer la feuille de CSS
$style = '.newsFrame {';
$style .= 'border-right:' . $this->getInput('newsThemeBorderStyle', helper::FILTER_STRING_SHORT) . ' ' . $this->getInput('newsThemeBorderColor') . ' ' . $this->getInput('newsThemeBorderWidth', helper::FILTER_STRING_SHORT) . ';';
$style .= 'border-left:' . $this->getInput('newsThemeBorderStyle', helper::FILTER_STRING_SHORT) . ' ' . $this->getInput('newsThemeBorderColor') . ' ' . $this->getInput('newsThemeBorderWidth', helper::FILTER_STRING_SHORT) . ';';
$style .= 'border:' . $this->getInput('newsThemeBorderStyle', helper::FILTER_STRING_SHORT) . ' ' . $this->getInput('newsThemeBorderColor') . ' ' . $this->getInput('newsThemeBorderWidth', helper::FILTER_STRING_SHORT) . ';';
$style .= 'background-color:' . $this->getInput('newsThemeBackgroundColor') . ';';
$style .= '}';
@ -546,9 +545,6 @@ class news extends common
'showBarEditButton' => true,
'showPageContent' => true,
'view' => 'index',
'style' => file_exists($this->getData(['module', $this->getUrl(0), 'theme', 'style']))
? $this->getData(['module', $this->getUrl(0), 'theme', 'style'])
: ''
]);
}
}

View File

@ -13,14 +13,9 @@
*/
/*
* Module news
* Module news TRUC
*/
/*
.newsTitle {
background-color: #ECEFF1;
padding:5px;
}*/
.newsContent {
overflow: hidden; /* les dépassements seront masqués */
position: relative;
@ -51,5 +46,3 @@
display: inline;
vertical-align: top;
}

View File

@ -1,54 +1,60 @@
<?php if ($module::$news) : ?>
<article>
<div class="row">
<?php foreach ($module::$news as $newsId => $news) : ?>
<div class="newsFrame col<?php echo $module::$nbrCol; ?>">
<h2 class="newsTitle" id="<?php echo $newsId; ?>">
<?php echo '<a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
</h2>
<div class="newsSignature">
<?php echo template::ico('user'); ?>
<?php echo $news['userId']; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn']) . ' - ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn']); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and
( // Propriétaire
($this->getUser('group') === self::GROUP_ADMIN)
)
) : ?>
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsId . '/' . $_SESSION['csrf']; ?>">
<?php echo template::ico('pencil'); ?> Éditer
</a>
<?php endif; ?>
</div>
</div>
<div class="newsContent">
<?php echo $news['content']; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'height']) !== -1
&& strlen($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'content'])) >= $this->getData(['module', $this->getUrl(0), 'config', 'height'])
) : ?>
<?php echo ' ... <a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '"><span class="newsSuite">lire la suite</span></a>'; ?>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>
</article>
<?php echo $module::$pages; ?>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])) : ?>
<?php if ($module::$news): ?>
<link rel="stylesheet" type="text/css" href="<?php echo helper::baseUrl(false) . $this->getData(['module', $this->getUrl(0), 'theme', 'style']);?> "/>
<?php if ($this->getData(['module', $this->getUrl(0), 'config', 'feeds'])): ?>
<div id="rssFeed">
<a type="application/rss+xml" href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/rss'; ?>" target="_blank">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>';
echo $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) ? '<p>' . $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel']) . '</p>' : '';
?>
</a>
</div>
<?php endif; ?>
<?php else : ?>
<article>
<div class="row">
<?php foreach ($module::$news as $newsId => $news): ?>
<div class="col<?php echo $module::$nbrCol; ?>">
<div class="newsFrame">
<h2 class="newsTitle" id="<?php echo $newsId; ?>">
<?php echo '<a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '">' . $news['title'] . '</a>'; ?>
</h2>
<div class="newsSignature">
<?php echo template::ico('user'); ?>
<?php echo $news['userId']; ?>
<?php echo template::ico('calendar-empty'); ?>
<?php echo helper::dateUTF8($module::$dateFormat, $news['publishedOn']) . ' - ' . helper::dateUTF8($module::$timeFormat, $news['publishedOn']); ?>
<!-- Bloc edition -->
<?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
and
( // Propriétaire
($this->getUser('group') === self::GROUP_ADMIN)
)
): ?>
<a
href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $newsId . '/' . $_SESSION['csrf']; ?>">
<?php echo template::ico('pencil'); ?> Éditer
</a>
<?php endif; ?>
</div>
<div class="newsContent">
<?php echo $news['content']; ?>
<?php if (
$this->getData(['module', $this->getUrl(0), 'config', 'height']) !== -1
&& strlen($this->getData(['module', $this->getUrl(0), 'posts', $newsId, 'content'])) >= $this->getData(['module', $this->getUrl(0), 'config', 'height'])
): ?>
<?php echo ' ... <a href="' . helper::baseUrl(true) . $this->getUrl(0) . '/' . $newsId . '"><span class="newsSuite">lire la suite</span></a>'; ?>
<?php endif; ?>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
</article>
<?php echo $module::$pages; ?>
<?php else: ?>
<?php echo template::speech('Aucune news'); ?>
<?php endif; ?>