Browse Source

add edit history menu item #15

main
ghost 1 year ago
parent
commit
cbf0902677
  1. 1
      src/app/controller/module/profile.php
  2. 25
      src/app/view/theme/default/module/profile.phtml

1
src/app/controller/module/profile.php

@ -17,6 +17,7 @@ class AppControllerModuleProfile
$views = $this->_user->getUserPageViewsTotal(); $views = $this->_user->getUserPageViewsTotal();
$downloads = $this->_user->getUserPageDownloadsTotal(); $downloads = $this->_user->getUserPageDownloadsTotal();
$comments = $this->_user->getUserPageCommentsTotal(); $comments = $this->_user->getUserPageCommentsTotal();
$editions = $this->_user->getUserPageEditionsTotal();
include __DIR__ . '../../../view/theme/default/module/profile.phtml'; include __DIR__ . '../../../view/theme/default/module/profile.phtml';
} }

25
src/app/view/theme/default/module/profile.phtml

@ -137,4 +137,29 @@
</span> </span>
</a> </a>
<?php } ?> <?php } ?>
<?php if ($route == 'editions') { ?>
<span class="padding-x-16 padding-y-8 display-block background-color-green cursor-default text-color-white">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" class="bi bi-file-diff-fill" viewBox="0 0 16 16">
<path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM8.5 4.5V6H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V7H6a.5.5 0 0 1 0-1h1.5V4.5a.5.5 0 0 1 1 0zM6 10h4a.5.5 0 0 1 0 1H6a.5.5 0 0 1 0-1z"/>
</svg>
<span class="margin-l-4">
<?php echo _('Editions') ?>
</span>
<span class="float-right">
<?php echo $editions ?>
</span>
</span>
<?php } else { ?>
<a class="padding-x-16 padding-y-8 display-block background-color-hover-night-light text-color-default" href="editions">
<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" fill="currentColor" class="bi bi-file-diff-fill" viewBox="0 0 16 16">
<path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM8.5 4.5V6H10a.5.5 0 0 1 0 1H8.5v1.5a.5.5 0 0 1-1 0V7H6a.5.5 0 0 1 0-1h1.5V4.5a.5.5 0 0 1 1 0zM6 10h4a.5.5 0 0 1 0 1H6a.5.5 0 0 1 0-1z"/>
</svg>
<span class="margin-l-4">
<?php echo _('Editions') ?>
</span>
<span class="float-right">
<?php echo $editions ?>
</span>
</a>
<?php } ?>
</div> </div>
Loading…
Cancel
Save