Bouton édition léger blog et download

This commit is contained in:
Fred Tempez 2021-03-15 16:46:59 +01:00
parent e5b1165333
commit f8887806a0
2 changed files with 31 additions and 38 deletions

View File

@ -10,7 +10,7 @@
</div> </div>
</div> </div>
<div class="row verticalAlignMiddle"> <div class="row verticalAlignMiddle">
<div class="col11 blogDate"> <div class="col12 blogDate">
<!-- bloc signature et date --> <!-- bloc signature et date -->
<?php echo $module::$articleSignature . ' - ';?> <?php echo $module::$articleSignature . ' - ';?>
<i class="far fa-calendar-alt"></i> <i class="far fa-calendar-alt"></i>
@ -22,19 +22,7 @@
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn']))); : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(1), 'publishedOn'])));
echo $date . ' à ' . $heure; echo $date . ' à ' . $heure;
?> ?>
<!-- Bloc RSS--> <!-- Bloc edition -->
<?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'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
</div>
<div class="col1">
<?php if ( <?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
@ -59,12 +47,19 @@
) )
): ?> ): ?>
<a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];?>"> <a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];?>">
<?php echo template::ico('pencil');?> <?php echo template::ico('pencil');?> Editer
</a> </a>
<?php echo template::button('blogEdit', [ <?php endif; ?>
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'], <!-- Bloc RSS-->
'value' => template::ico('pencil') <?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'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>

View File

@ -6,7 +6,7 @@
</div> </div>
</div> </div>
<div class="row verticalAlignMiddle"> <div class="row verticalAlignMiddle">
<div class="col11 downloadDate"> <div class="col12 downloadDate">
<?php echo $module::$itemSignature . ' - ';?> <?php echo $module::$itemSignature . ' - ';?>
<i class="far fa-calendar-alt"></i> <i class="far fa-calendar-alt"></i>
<?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true) <?php $date = mb_detect_encoding(strftime('%d %B %Y', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])), 'UTF-8', true)
@ -17,20 +17,8 @@
: utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn']))); : utf8_encode(strftime('%H:%M', $this->getData(['module', $this->getUrl(0), 'items', $this->getUrl(1), 'publishedOn'])));
echo $date . ' à ' . $heure; echo $date . ' à ' . $heure;
?> ?>
<!-- Bloc RSS-->
<?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'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
<!-- Bouton d'édition --> <!-- Bouton d'édition -->
</div>
<div class="col1">
<?php if ( <?php if (
$this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD') $this->getUser('password') === $this->getInput('ZWII_USER_PASSWORD')
AND AND
@ -53,11 +41,21 @@
) )
) )
): ?> ): ?>
<?php echo template::button('downloadItemEdit', [ <a href ="<?php echo helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'];?>">
'href' => helper::baseUrl() . $this->getUrl(0) . '/edit/' . $this->getUrl(1) . '/' . $_SESSION['csrf'], <?php echo template::ico('pencil');?> Editer
'value' => template::ico('pencil') </a>
]); ?> <?php endif; ?>
<?php endif; ?> <!-- Bloc RSS-->
<?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'; ?> ">
<img src='module/news/ressource/feed-icon-16.gif' />
<?php
echo '<p>' . $this->getData(['module',$this->getUrl(0), 'config', 'feedsLabel']) . '</p>' ;
?>
</a>
</div>
<?php endif; ?>
</div> </div>
</div> </div>
</div> </div>