Shorthand php echo
This commit is contained in:
parent
f495774be4
commit
60208407ea
35 changed files with 192 additions and 192 deletions
|
@ -3,8 +3,8 @@ CustomAssetViewDecorator::setSubTitle('authentication form');
|
|||
CustomAssetViewDecorator::addStylesheet('auth.css');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('auth', 'login') ?>" class="auth" method="post">
|
||||
<p>If you don't have an account yet,<br/><a href="<?php echo \Chibi\UrlHelper::route('user', 'registration'); ?>">click here</a> to create a new one.</p>
|
||||
<form action="<?= \Chibi\UrlHelper::route('auth', 'login') ?>" class="auth" method="post">
|
||||
<p>If you don't have an account yet,<br/><a href="<?= \Chibi\UrlHelper::route('user', 'registration'); ?>">click here</a> to create a new one.</p>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="name">User name:</label>
|
||||
|
@ -38,9 +38,9 @@ CustomAssetViewDecorator::addStylesheet('auth.css');
|
|||
<div>
|
||||
<p>Problems logging in?</p>
|
||||
<ul>
|
||||
<li><a href="<?php echo \Chibi\UrlHelper::route('user', 'password-reset-proxy') ?>">I don't remember my password</a></li>
|
||||
<li><a href="<?php echo \Chibi\UrlHelper::route('user', 'activation-proxy') ?>">I haven't received activation e-mail</a></li>
|
||||
<li><a href="<?php echo \Chibi\UrlHelper::route('user', 'registration') ?>">I don't have an account</a></li>
|
||||
<li><a href="<?= \Chibi\UrlHelper::route('user', 'password-reset-proxy') ?>">I don't remember my password</a></li>
|
||||
<li><a href="<?= \Chibi\UrlHelper::route('user', 'activation-proxy') ?>">I haven't received activation e-mail</a></li>
|
||||
<li><a href="<?= \Chibi\UrlHelper::route('user', 'registration') ?>">I don't have an account</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,7 +3,7 @@ CustomAssetViewDecorator::addStylesheet('comment-edit.css');
|
|||
CustomAssetViewDecorator::addScript('comment-edit.js');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('comment', 'add', ['postId' => $this->context->transport->post->id]) ?>" method="post" class="add-comment">
|
||||
<form action="<?= \Chibi\UrlHelper::route('comment', 'add', ['postId' => $this->context->transport->post->id]) ?>" method="post" class="add-comment">
|
||||
<h1>add comment</h1>
|
||||
|
||||
<div class="preview"></div>
|
||||
|
|
|
@ -3,13 +3,13 @@ CustomAssetViewDecorator::addStylesheet('comment-edit.css');
|
|||
CustomAssetViewDecorator::addScript('comment-edit.js');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->transport->comment->id]) ?>" method="post" class="edit-comment">
|
||||
<form action="<?= \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->transport->comment->id]) ?>" method="post" class="edit-comment">
|
||||
<h1>edit comment</h1>
|
||||
|
||||
<div class="preview"></div>
|
||||
|
||||
<div class="form-row text">
|
||||
<div class="input-wrapper"><textarea name="text" cols="50" rows="3"><?php echo TextHelper::secureWhitespace($this->context->transport->comment->text) ?></textarea></div>
|
||||
<div class="input-wrapper"><textarea name="text" cols="50" rows="3"><?= TextHelper::secureWhitespace($this->context->transport->comment->text) ?></textarea></div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="submit" value="1"/>
|
||||
|
|
|
@ -18,17 +18,17 @@ CustomAssetViewDecorator::setSubTitle('comments');
|
|||
<div class="comment-group">
|
||||
<div class="post-wrapper">
|
||||
<?php $this->context->post = $post ?>
|
||||
<?php echo $this->renderFile('post-small') ?>
|
||||
<?= $this->renderFile('post-small') ?>
|
||||
</div>
|
||||
<div class="comments">
|
||||
<?php $comments = array_reverse($post->getComments()) ?>
|
||||
<?php foreach (array_slice($comments, 0, $this->config->comments->maxCommentsInList) as $comment): ?>
|
||||
<?php $this->context->comment = $comment ?>
|
||||
<?php echo $this->renderFile('comment-small') ?>
|
||||
<?= $this->renderFile('comment-small') ?>
|
||||
<?php endforeach ?>
|
||||
|
||||
<?php if (count($comments) > $this->config->comments->maxCommentsInList): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<span class="hellip">(more…)</span>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -8,11 +8,11 @@ CustomAssetViewDecorator::addScript('comment-edit.js');
|
|||
<div class="avatar">
|
||||
<?php $commenter = $this->context->comment->getCommenter() ?>
|
||||
<?php if ($commenter): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
||||
<img src="<?php echo htmlspecialchars($commenter->getAvatarUrl(40)) ?>" alt="<?php echo $commenter->name ?>"/>
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
||||
<img src="<?= htmlspecialchars($commenter->getAvatarUrl(40)) ?>" alt="<?= $commenter->name ?>"/>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<img src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?php echo UserModel::getAnonymousName() ?>">
|
||||
<img src="<?= \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?= UserModel::getAnonymousName() ?>">
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
|
@ -20,21 +20,21 @@ CustomAssetViewDecorator::addScript('comment-edit.js');
|
|||
<div class="header">
|
||||
<span class="nickname">
|
||||
<?php if ($commenter): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
||||
<?php echo $commenter->name ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $commenter->name]) ?>">
|
||||
<?= $commenter->name ?>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<?php echo UserModel::getAnonymousName() ?>
|
||||
<?= UserModel::getAnonymousName() ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
|
||||
<span class="date" title="<?php echo TextHelper::formatDate($this->context->comment->commentDate, true) ?>">
|
||||
<?php echo TextHelper::formatDate($this->context->comment->commentDate, false) ?>
|
||||
<span class="date" title="<?= TextHelper::formatDate($this->context->comment->commentDate, true) ?>">
|
||||
<?= TextHelper::formatDate($this->context->comment->commentDate, false) ?>
|
||||
</span>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::EditComment, PrivilegesHelper::getIdentitySubPrivilege($commenter))): ?>
|
||||
<span class="edit">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->comment->id]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('comment', 'edit', ['id' => $this->context->comment->id]) ?>">
|
||||
edit
|
||||
</a>
|
||||
</span>
|
||||
|
@ -42,7 +42,7 @@ CustomAssetViewDecorator::addScript('comment-edit.js');
|
|||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::DeleteComment, PrivilegesHelper::getIdentitySubPrivilege($commenter))): ?>
|
||||
<span class="delete">
|
||||
<a class="simple-action confirmable" href="<?php echo \Chibi\UrlHelper::route('comment', 'delete', ['id' => $this->context->comment->id]) ?>" data-confirm-text="Are you sure you want to delete this comment?">
|
||||
<a class="simple-action confirmable" href="<?= \Chibi\UrlHelper::route('comment', 'delete', ['id' => $this->context->comment->id]) ?>" data-confirm-text="Are you sure you want to delete this comment?">
|
||||
delete
|
||||
</a>
|
||||
</span>
|
||||
|
@ -50,7 +50,7 @@ CustomAssetViewDecorator::addScript('comment-edit.js');
|
|||
</div>
|
||||
|
||||
<div class="content">
|
||||
<?php echo $this->context->comment->getText() ?>
|
||||
<?= $this->context->comment->getText() ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
$query = str_replace('(', '<span>(', $query);
|
||||
$query = str_replace(')', ')</span>', $query);
|
||||
?>
|
||||
<pre class="query"><?php echo $query ?></pre>
|
||||
<pre class="query"><?= $query ?></pre>
|
||||
|
||||
<pre class="bindings"><?php echo join(', ', array_map(function($key) use ($log)
|
||||
<pre class="bindings"><?= join(', ', array_map(function($key) use ($log)
|
||||
{
|
||||
return $key . '=<span class="value">' . $log->getStatement()->getBindings()[$key] . '</span>';
|
||||
},
|
||||
array_keys($log->getStatement()->getBindings()))) ?></pre>
|
||||
|
||||
<table>
|
||||
<tr><td>Execution:</td><td><?php echo sprintf('%.05fs', $log->getExecutionTime()) ?></td></tr>
|
||||
<tr><td>Retrieval:</td><td><?php echo sprintf('%.05fs', $log->getRetrievalTime()) ?></td></tr>
|
||||
<tr><td>Execution:</td><td><?= sprintf('%.05fs', $log->getExecutionTime()) ?></td></tr>
|
||||
<tr><td>Retrieval:</td><td><?= sprintf('%.05fs', $log->getRetrievalTime()) ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
<h1>Error</h1>
|
||||
<?php echo $this->context->query ?> not found.
|
||||
<?= $this->context->query ?> not found.
|
||||
|
|
|
@ -12,12 +12,12 @@ $showTabs = count($tabs) > 1;
|
|||
<ul>
|
||||
<?php foreach ($tabs as $tab => $text): ?>
|
||||
<?php if ($tab == $this->context->tab): ?>
|
||||
<li class="selected <?php echo $tab ?>">
|
||||
<li class="selected <?= $tab ?>">
|
||||
<?php else: ?>
|
||||
<li class="<?php echo $tab ?>">
|
||||
<li class="<?= $tab ?>">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('index', 'help', $tab == $firstTab ? [] : ['tab' => $tab]) ?>">
|
||||
<?php echo $text ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('index', 'help', $tab == $firstTab ? [] : ['tab' => $tab]) ?>">
|
||||
<?= $text ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
@ -27,7 +27,7 @@ $showTabs = count($tabs) > 1;
|
|||
<div class="tab-content">
|
||||
<?php endif ?>
|
||||
|
||||
<?php echo TextHelper::parseMarkdown(file_get_contents($this->context->path)) ?>
|
||||
<?= TextHelper::parseMarkdown(file_get_contents($this->context->path)) ?>
|
||||
|
||||
<?php if ($showTabs): ?>
|
||||
</div>
|
||||
|
|
|
@ -4,9 +4,9 @@ CustomAssetViewDecorator::addStylesheet('index-index.css');
|
|||
?>
|
||||
|
||||
<div id="welcome">
|
||||
<h1><?php echo $this->config->main->title ?></h1>
|
||||
<h1><?= $this->config->main->title ?></h1>
|
||||
<p>
|
||||
<span>serving <?php echo $this->context->transport->postCount ?> posts</span>
|
||||
<span>serving <?= $this->context->transport->postCount ?> posts</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
@ -14,7 +14,7 @@ CustomAssetViewDecorator::addStylesheet('index-index.css');
|
|||
<div class="body">
|
||||
<?php $this->context->imageLink = \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->featuredPost->id]) ?>
|
||||
<?php $this->context->transport->post = $this->context->featuredPost ?>
|
||||
<?php echo $this->renderFile('post-file-render') ?>
|
||||
<?= $this->renderFile('post-file-render') ?>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
|
@ -25,8 +25,8 @@ CustomAssetViewDecorator::addStylesheet('index-index.css');
|
|||
<?php uasort($tags, function($a, $b) { return strnatcasecmp($a->name, $b->name); }) ?>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?php echo $tag->name ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?= $tag->name ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
@ -36,7 +36,7 @@ CustomAssetViewDecorator::addStylesheet('index-index.css');
|
|||
<div class="right">
|
||||
Featured 
|
||||
<?php if ($this->context->featuredPostUser): ?>
|
||||
by <a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?php echo $this->context->featuredPostUser->name ?></a>, 
|
||||
by <a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->featuredPostUser->name]) ?>"><?= $this->context->featuredPostUser->name ?></a>, 
|
||||
<?php endif ?>
|
||||
<?php $x = round((time() - $this->context->featuredPostDate) / (24 * 3600.)) ?>
|
||||
<?php if ($x == 0): ?>
|
||||
|
|
|
@ -16,7 +16,7 @@ CustomAssetViewDecorator::addScript('core.js');
|
|||
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
var lastSearchQuery = <?php echo json_encode(isset($this->context->transport->lastSearchQuery) ? $this->context->transport->lastSearchQuery : '') ?>;
|
||||
var lastSearchQuery = <?= json_encode(isset($this->context->transport->lastSearchQuery) ? $this->context->transport->lastSearchQuery : '') ?>;
|
||||
</script>
|
||||
|
||||
<nav id="top-nav">
|
||||
|
@ -28,7 +28,7 @@ CustomAssetViewDecorator::addScript('core.js');
|
|||
|
||||
<section id="content">
|
||||
<div class="main-wrapper">
|
||||
<?php echo $this->renderView() ?>
|
||||
<?= $this->renderView() ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</section>
|
||||
|
@ -36,18 +36,18 @@ CustomAssetViewDecorator::addScript('core.js');
|
|||
<footer>
|
||||
<div class="main-wrapper">
|
||||
<hr>
|
||||
<span>Load: <?php echo sprintf('%.05f', microtime(true) - $this->context->startTime) ?>s</span>
|
||||
<span>Queries: <?php echo count(\Chibi\Database::getLogs()) ?></span>
|
||||
<span><a href="<?php echo SZURU_LINK ?>">szurubooru v<?php echo SZURU_VERSION ?></a></span>
|
||||
<span>Load: <?= sprintf('%.05f', microtime(true) - $this->context->startTime) ?>s</span>
|
||||
<span>Queries: <?= count(\Chibi\Database::getLogs()) ?></span>
|
||||
<span><a href="<?= SZURU_LINK ?>">szurubooru v<?= SZURU_VERSION ?></a></span>
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ListLogs)): ?>
|
||||
<span><a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
|
||||
<span><a href="<?= \Chibi\UrlHelper::route('log', 'list') ?>">Logs</a></span>
|
||||
<?php endif ?>
|
||||
<hr>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<?php if ($this->config->misc->debugQueries): ?>
|
||||
<?php echo $this->renderFile('debug') ?>
|
||||
<?= $this->renderFile('debug') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<div id="small-screen"></div>
|
||||
|
|
|
@ -8,8 +8,8 @@ $this->context->subTitle = 'latest logs';
|
|||
<ul>
|
||||
<?php foreach ($this->context->transport->logs as $log): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('log', 'view', ['name' => $log]) ?>">
|
||||
<?php echo $log ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('log', 'view', ['name' => $log]) ?>">
|
||||
<?= $log ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -3,21 +3,21 @@ CustomAssetViewDecorator::setSubTitle('logs (' . $name . ')');
|
|||
?>
|
||||
|
||||
<?php if (empty($this->context->transport->lines)): ?>
|
||||
<p class="alert alert-warning">This log is empty. <a href="<?php echo \Chibi\UrlHelper::route('log', 'list') ?>">Go back</a></p>
|
||||
<p class="alert alert-warning">This log is empty. <a href="<?= \Chibi\UrlHelper::route('log', 'list') ?>">Go back</a></p>
|
||||
<?php else: ?>
|
||||
<?php
|
||||
CustomAssetViewDecorator::addStylesheet('logs.css');
|
||||
CustomAssetViewDecorator::addScript('logs.js');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('log', 'view', ['name' => $this->context->transport->name]) ?>" method="get">
|
||||
<form action="<?= \Chibi\UrlHelper::route('log', 'view', ['name' => $this->context->transport->name]) ?>" method="get">
|
||||
Keep only lines that contain:
|
||||
|
||||
<input type="text" name="query" value="<?php echo htmlspecialchars($this->context->transport->filter) ?>" placeholder="any text…"/>
|
||||
<input type="text" name="query" value="<?= htmlspecialchars($this->context->transport->filter) ?>" placeholder="any text…"/>
|
||||
</form>
|
||||
|
||||
<div class="paginator-content">
|
||||
<pre><?php echo $this->context->transport->lines ?></pre>
|
||||
<pre><?= $this->context->transport->lines ?></pre>
|
||||
</div>
|
||||
|
||||
<?php $this->renderFile('paginator') ?>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php if (!empty($this->context->transport->message)): ?>
|
||||
<p class="alert <?php echo $this->context->transport->success ? 'alert-success' : 'alert-error'; ?>">
|
||||
<?php echo $this->context->transport->messageHtml ?>
|
||||
<p class="alert <?= $this->context->transport->success ? 'alert-success' : 'alert-error'; ?>">
|
||||
<?= $this->context->transport->messageHtml ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
|
|
|
@ -54,7 +54,7 @@ if (!function_exists('pageUrl'))
|
|||
<?php else: ?>
|
||||
<li class="prev disabled">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo pageUrl($page - 1) ?>">
|
||||
<a href="<?= pageUrl($page - 1) ?>">
|
||||
«
|
||||
</a>
|
||||
</li>
|
||||
|
@ -68,8 +68,8 @@ if (!function_exists('pageUrl'))
|
|||
<?php else: ?>
|
||||
<li>
|
||||
<?php endif ?>
|
||||
<a href="<?php echo pageUrl($subPage) ?>">
|
||||
<?php echo $subPage ?>
|
||||
<a href="<?= pageUrl($subPage) ?>">
|
||||
<?= $subPage ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
@ -80,7 +80,7 @@ if (!function_exists('pageUrl'))
|
|||
<?php else: ?>
|
||||
<li class="next disabled">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo pageUrl($page + 1) ?>">
|
||||
<a href="<?= pageUrl($page + 1) ?>">
|
||||
»
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form action="<?php echo \Chibi\UrlHelper::route('post', 'edit', ['id' => $this->context->transport->post->id]) ?>" method="post" enctype="multipart/form-data" class="edit-post">
|
||||
<form action="<?= \Chibi\UrlHelper::route('post', 'edit', ['id' => $this->context->transport->post->id]) ?>" method="post" enctype="multipart/form-data" class="edit-post">
|
||||
<h1>edit post</h1>
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::EditPostSafety, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
<div class="form-row safety">
|
||||
|
@ -6,8 +6,8 @@
|
|||
<div class="input-wrapper">
|
||||
<?php foreach (PostSafety::getAll() as $safety): ?>
|
||||
<label>
|
||||
<input type="radio" name="safety" value="<?php echo $safety ?>" <?php if ($this->context->transport->post->safety == $safety) echo 'checked="checked"' ?>/>
|
||||
<?php echo ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
<input type="radio" name="safety" value="<?= $safety ?>" <?php if ($this->context->transport->post->safety == $safety) echo 'checked="checked"' ?>/>
|
||||
<?= ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
</label>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
@ -17,22 +17,22 @@
|
|||
<?php if (PrivilegesHelper::confirm(Privilege::EditPostTags, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
<div class="form-row tags">
|
||||
<label for="tags">Tags:</label>
|
||||
<div class="input-wrapper"><input type="text" name="tags" id="tags" placeholder="enter some tags…" value="<?php echo join(',', array_map(function($tag) { return htmlspecialchars($tag->name); }, $this->context->transport->post->getTags())) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="text" name="tags" id="tags" placeholder="enter some tags…" value="<?= join(',', array_map(function($tag) { return htmlspecialchars($tag->name); }, $this->context->transport->post->getTags())) ?>"/></div>
|
||||
</div>
|
||||
<input type="hidden" name="edit-token" id="edit-token" value="<?php echo htmlspecialchars($this->context->transport->post->getEditToken()) ?>"/>
|
||||
<input type="hidden" name="edit-token" id="edit-token" value="<?= htmlspecialchars($this->context->transport->post->getEditToken()) ?>"/>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::EditPostSource, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
<div class="form-row source">
|
||||
<label for="source">Source:</label>
|
||||
<div class="input-wrapper"><input type="text" name="source" id="source" value="<?php echo htmlspecialchars($this->context->transport->post->source) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="text" name="source" id="source" value="<?= htmlspecialchars($this->context->transport->post->source) ?>"/></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::EditPostRelations, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
<div class="form-row thumb">
|
||||
<label for="relations">Relations:</label>
|
||||
<div class="input-wrapper"><input type="text" name="relations" id="relations" placeholder="id1,id2,…" value="<?php echo join(',', array_map(function($post) { return $post->id; }, $this->context->transport->post->getRelations())) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="text" name="relations" id="relations" placeholder="id1,id2,…" value="<?= join(',', array_map(function($post) { return $post->id; }, $this->context->transport->post->getRelations())) ?>"/></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
<?php if ($post->type == PostType::Image): ?>
|
||||
|
||||
<?php if (!empty($this->context->imageLink)): ?>
|
||||
<a href="<?php echo $this->context->imageLink ?>">
|
||||
<a href="<?= $this->context->imageLink ?>">
|
||||
<?php endif ?>
|
||||
|
||||
<img src="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>" alt="<?php echo $post->name ?>"/>
|
||||
<img src="<?= \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>" alt="<?= $post->name ?>"/>
|
||||
|
||||
<?php if (!empty($this->context->imageLink)): ?>
|
||||
</a>
|
||||
|
@ -15,14 +15,14 @@
|
|||
|
||||
<?php elseif ($post->type == PostType::Flash): ?>
|
||||
|
||||
<object type="<?php echo $post->mimeType ?>" width="<?php echo $post->imageWidth ?>" height="<?php echo $post->imageHeight ?>" data="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>">
|
||||
<param name="movie" value="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>"/>
|
||||
<object type="<?= $post->mimeType ?>" width="<?= $post->imageWidth ?>" height="<?= $post->imageHeight ?>" data="<?= \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>">
|
||||
<param name="movie" value="<?= \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $post->name]) ?>"/>
|
||||
<param name="wmode" value="opaque"/>
|
||||
</object>
|
||||
|
||||
<?php elseif ($post->type == PostType::Youtube): ?>
|
||||
|
||||
<iframe style="width: 800px; height: 600px; border: 0;" src="//www.youtube.com/embed/<?php echo $post->fileHash ?>?wmode=opaque" allowfullscreen></iframe>
|
||||
<iframe style="width: 800px; height: 600px; border: 0;" src="//www.youtube.com/embed/<?= $post->fileHash ?>?wmode=opaque" allowfullscreen></iframe>
|
||||
|
||||
<?php elseif ($post->type == PostType::Video): ?>
|
||||
|
||||
|
|
|
@ -44,12 +44,12 @@ if (PrivilegesHelper::confirm(Privilege::MassTag))
|
|||
<?php foreach ($tabs as $i => $tab): ?>
|
||||
<?php list($name, $url) = $tab ?>
|
||||
<?php if ($i == $activeTab): ?>
|
||||
<li class="selected <?php echo TextCaseConverter::convert($name, TextCaseConverter::BLANK_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<li class="selected <?= TextCaseConverter::convert($name, TextCaseConverter::BLANK_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<?php else: ?>
|
||||
<li class="<?php echo TextCaseConverter::convert($name, TextCaseConverter::BLANK_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<li class="<?= TextCaseConverter::convert($name, TextCaseConverter::BLANK_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo $url ?>">
|
||||
<?php echo $name ?>
|
||||
<a href="<?= $url ?>">
|
||||
<?= $name ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -17,7 +17,7 @@ CustomAssetViewDecorator::addScript('post-list.js');
|
|||
<div class="posts paginator-content">
|
||||
<?php foreach ($this->context->transport->posts as $post): ?>
|
||||
<?php $this->context->post = $post ?>
|
||||
<?php echo $this->renderFile('post-small') ?>
|
||||
<?= $this->renderFile('post-small') ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
|
|
@ -25,19 +25,19 @@ if ($masstag)
|
|||
}
|
||||
?>
|
||||
|
||||
<div class="<?php echo implode(' ', $classNames) ?>">
|
||||
<div class="<?= implode(' ', $classNames) ?>">
|
||||
<?php if ($masstag): ?>
|
||||
<a class="toggle-tag" href="<?php echo \Chibi\UrlHelper::route('post', 'toggle-tag', ['id' => $this->context->post->id, 'tag' => $this->context->additionalInfo, 'enable' => '_enable_']) ?>" data-text-tagged="Tagged" data-text-untagged="Untagged">
|
||||
<?php echo in_array('tagged', $classNames) ? 'Tagged' : 'Untagged' ?>
|
||||
<a class="toggle-tag" href="<?= \Chibi\UrlHelper::route('post', 'toggle-tag', ['id' => $this->context->post->id, 'tag' => $this->context->additionalInfo, 'enable' => '_enable_']) ?>" data-text-tagged="Tagged" data-text-untagged="Untagged">
|
||||
<?= in_array('tagged', $classNames) ? 'Tagged' : 'Untagged' ?>
|
||||
</a>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->context->user->hasEnabledPostTagTitles()): ?>
|
||||
<a title="<?php echo TextHelper::reprTags($this->context->post->getTags()) ?>" class="link" href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<a title="<?= TextHelper::reprTags($this->context->post->getTags()) ?>" class="link" href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<?php else: ?>
|
||||
<a class="link" href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<a class="link" href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->post->id]) ?>">
|
||||
<?php endif ?>
|
||||
<img class="thumb" src="<?php echo \Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->post->name]) ?>" alt="@<?php echo $this->context->post->id ?>"/>
|
||||
<img class="thumb" src="<?= \Chibi\UrlHelper::route('post', 'thumb', ['name' => $this->context->post->name]) ?>" alt="@<?= $this->context->post->id ?>"/>
|
||||
<?php
|
||||
$x =
|
||||
[
|
||||
|
@ -54,8 +54,8 @@ if ($masstag)
|
|||
<?php else: ?>
|
||||
<span>
|
||||
<?php endif ?>
|
||||
<i class="icon-<?php echo $key ?>"></i>
|
||||
<?php echo $val ?>
|
||||
<i class="icon-<?= $key ?>"></i>
|
||||
<?= $val ?>
|
||||
</span>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
|
|
|
@ -36,7 +36,7 @@ CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
|
|||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div id="upload-step2" data-redirect-url="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>">
|
||||
<div id="upload-step2" data-redirect-url="<?= \Chibi\UrlHelper::route('post', 'list') ?>">
|
||||
<hr>
|
||||
|
||||
<div class="posts">
|
||||
|
@ -50,7 +50,7 @@ CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
|
|||
<div id="post-template" class="post">
|
||||
<p class="alert alert-error">Some kind of error</p>
|
||||
|
||||
<img class="thumbnail" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
|
||||
<img class="thumbnail" src="<?= \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Thumbnail"/>
|
||||
|
||||
<div class="form-wrapper">
|
||||
<div class="ops">
|
||||
|
@ -67,7 +67,7 @@ CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
|
||||
<form action="<?= \Chibi\UrlHelper::route('post', 'upload') ?>" method="post">
|
||||
<div class="form-row file-name">
|
||||
<label>File:</label>
|
||||
<strong>filename.jpg</strong>
|
||||
|
@ -79,8 +79,8 @@ CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
|
|||
<?php $checked = false ?>
|
||||
<?php foreach (PostSafety::getAll() as $safety): ?>
|
||||
<label>
|
||||
<input type="radio" name="safety" value="<?php echo $safety ?>"<?php if (!$checked) echo ' checked="checked"' ?>/>
|
||||
<?php echo ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
<input type="radio" name="safety" value="<?= $safety ?>"<?php if (!$checked) echo ' checked="checked"' ?>/>
|
||||
<?= ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
<?php $checked = true ?>
|
||||
</label>
|
||||
<?php endforeach ?>
|
||||
|
@ -108,4 +108,4 @@ CustomAssetViewDecorator::addScript('../lib/tagit/jquery.tagit.js');
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<img id="lightbox" src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Preview"/>
|
||||
<img id="lightbox" src="<?= \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="Preview"/>
|
||||
|
|
|
@ -24,7 +24,7 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<nav id="around">
|
||||
<div class="left">
|
||||
<?php if ($this->context->transport->nextPostId): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->transport->nextPostId]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->transport->nextPostId]) ?>">
|
||||
<?php else: ?>
|
||||
<a class="disabled">
|
||||
<?php endif ?>
|
||||
|
@ -35,7 +35,7 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
|
||||
<div class="right">
|
||||
<?php if ($this->context->transport->prevPostId): ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->transport->prevPostId]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $this->context->transport->prevPostId]) ?>">
|
||||
<?php else: ?>
|
||||
<a class="disabled">
|
||||
<?php endif ?>
|
||||
|
@ -49,23 +49,23 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<?php if (!empty($this->context->transport->lastSearchQuery)): ?>
|
||||
<div class="text">
|
||||
Current search:<br/>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $this->context->transport->lastSearchQuery]) ?>"><?php echo $this->context->transport->lastSearchQuery ?></a>
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'list', ['query' => $this->context->transport->lastSearchQuery]) ?>"><?= $this->context->transport->lastSearchQuery ?></a>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</nav>
|
||||
|
||||
<div class="unit tags">
|
||||
<?php $tags = $this->context->transport->post->getTags() ?>
|
||||
<h1>tags (<?php echo count($tags) ?>)</h1>
|
||||
<h1>tags (<?= count($tags) ?>)</h1>
|
||||
<ul>
|
||||
<?php uasort($tags, function($a, $b) { return strnatcasecmp($a->name, $b->name); }) ?>
|
||||
<?php foreach ($tags as $tag): ?>
|
||||
<li title="<?php echo $tag->name ?>">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?php echo $tag->name ?>
|
||||
<li title="<?= $tag->name ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'list', ['query' => $tag->name]) ?>">
|
||||
<?= $tag->name ?>
|
||||
</a>
|
||||
<span class="count">
|
||||
<?php echo TextHelper::useDecimalUnits($tag->getPostCount()) ?>
|
||||
<?= TextHelper::useDecimalUnits($tag->getPostCount()) ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
@ -78,38 +78,38 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<div class="uploader">
|
||||
<?php $uploader = $this->context->transport->post->getUploader() ?>
|
||||
<?php if ($uploader): ?>
|
||||
<span class="value" title="<?php echo $val = $uploader->name ?>">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $uploader->name]) ?>">
|
||||
<img src="<?php echo htmlentities($uploader->getAvatarUrl(24)) ?>" alt="<?php echo $uploader->name ?>"/>
|
||||
<?php echo $val ?>
|
||||
<span class="value" title="<?= $val = $uploader->name ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $uploader->name]) ?>">
|
||||
<img src="<?= htmlentities($uploader->getAvatarUrl(24)) ?>" alt="<?= $uploader->name ?>"/>
|
||||
<?= $val ?>
|
||||
</a>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<span class="value" title="<?php echo UserModel::getAnonymousName() ?>">
|
||||
<img src="<?php echo \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?php echo UserModel::getAnonymousName() ?>"/>
|
||||
<?php echo UserModel::getAnonymousName() ?>
|
||||
<span class="value" title="<?= UserModel::getAnonymousName() ?>">
|
||||
<img src="<?= \Chibi\UrlHelper::absoluteUrl('/media/img/pixel.gif') ?>" alt="<?= UserModel::getAnonymousName() ?>"/>
|
||||
<?= UserModel::getAnonymousName() ?>
|
||||
</span>
|
||||
<?php endif ?>
|
||||
<br>
|
||||
<span class="date" title="<?php echo TextHelper::formatDate($this->context->transport->post->uploadDate, true) ?>">
|
||||
<?php echo TextHelper::formatDate($this->context->transport->post->uploadDate, false) ?>
|
||||
<span class="date" title="<?= TextHelper::formatDate($this->context->transport->post->uploadDate, true) ?>">
|
||||
<?= TextHelper::formatDate($this->context->transport->post->uploadDate, false) ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="key-value safety">
|
||||
<span class="key">Safety:</span>
|
||||
<span class="value safety-<?php echo $val = PostSafety::toDisplayString($this->context->transport->post->safety) ?>" title="<?php echo $val ?>">
|
||||
<?php echo $val ?>
|
||||
<span class="value safety-<?= $val = PostSafety::toDisplayString($this->context->transport->post->safety) ?>" title="<?= $val ?>">
|
||||
<?= $val ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="key-value source">
|
||||
<span class="key">Source:</span>
|
||||
<span class="value" title="<?php echo $val = htmlspecialchars($this->context->transport->post->source ?: 'unknown') ?>">
|
||||
<span class="value" title="<?= $val = htmlspecialchars($this->context->transport->post->source ?: 'unknown') ?>">
|
||||
<?php if (preg_match('/^((https?|ftp):|)\/\//', $this->context->transport->post->source)): ?>
|
||||
<a href="<?php echo $val ?>"><?php echo $val ?></a>
|
||||
<a href="<?= $val ?>"><?= $val ?></a>
|
||||
<?php else: ?>
|
||||
<?php echo $val ?>
|
||||
<?= $val ?>
|
||||
<?php endif ?>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -117,10 +117,10 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<?php if ($this->context->transport->post->imageWidth > 0): ?>
|
||||
<div class="key-value dim">
|
||||
<span class="key">Dimensions:</span>
|
||||
<span class="value" title="<?php echo $val = sprintf('%dx%d',
|
||||
<span class="value" title="<?= $val = sprintf('%dx%d',
|
||||
$this->context->transport->post->imageWidth,
|
||||
$this->context->transport->post->imageHeight) ?>">
|
||||
<?php echo $val ?>
|
||||
<?= $val ?>
|
||||
</span>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
@ -128,16 +128,16 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<div class="key-value score">
|
||||
<span class="key">Score:</span>
|
||||
<span class="value">
|
||||
<?php echo $this->context->transport->post->score ?>
|
||||
<?= $this->context->transport->post->score ?>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ScorePost, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
[
|
||||
<?php $scoreLink = function($score) { return \Chibi\UrlHelper::route('post', 'score', ['id' => $this->context->transport->post->id, 'score' => $score]); } ?>
|
||||
|
||||
<?php if ($this->context->score === 1): ?>
|
||||
<a class="simple-action selected" href="<?php echo $scoreLink(0) ?>">
|
||||
<a class="simple-action selected" href="<?= $scoreLink(0) ?>">
|
||||
<?php else: ?>
|
||||
<a class="simple-action" href="<?php echo $scoreLink(1) ?>">
|
||||
<a class="simple-action" href="<?= $scoreLink(1) ?>">
|
||||
<?php endif ?>
|
||||
vote up
|
||||
</a>
|
||||
|
@ -145,9 +145,9 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
,
|
||||
|
||||
<?php if ($this->context->score === -1): ?>
|
||||
<a class="simple-action selected" href="<?php echo $scoreLink(0) ?>">
|
||||
<a class="simple-action selected" href="<?= $scoreLink(0) ?>">
|
||||
<?php else: ?>
|
||||
<a class="simple-action" href="<?php echo $scoreLink(-1) ?>">
|
||||
<a class="simple-action" href="<?= $scoreLink(-1) ?>">
|
||||
<?php endif ?>
|
||||
down
|
||||
</a>]
|
||||
|
@ -159,7 +159,7 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<div class="unit hl-options">
|
||||
<?php if ($this->context->transport->post->type != PostType::Youtube): ?>
|
||||
<div class="hl-option">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" title="Download">
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'retrieve', ['name' => $this->context->transport->post->name]) ?>" title="Download">
|
||||
<i class="icon-dl"></i>
|
||||
<span>
|
||||
<?php
|
||||
|
@ -176,12 +176,12 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<?php if (PrivilegesHelper::confirm(Privilege::FavoritePost, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->post->getUploader()))): ?>
|
||||
<div class="hl-option">
|
||||
<?php if (!$this->context->favorite): ?>
|
||||
<a class="add-fav icon simple-action" href="<?php echo \Chibi\UrlHelper::route('post', 'add-favorite', ['id' => $this->context->transport->post->id]) ?>">
|
||||
<a class="add-fav icon simple-action" href="<?= \Chibi\UrlHelper::route('post', 'add-favorite', ['id' => $this->context->transport->post->id]) ?>">
|
||||
<i class="icon-fav"></i>
|
||||
<span>Add to favorites</span>
|
||||
</a>
|
||||
<?php else: ?>
|
||||
<a class="rem-fav icon simple-action" href="<?php echo \Chibi\UrlHelper::route('post', 'rem-favorite', ['id' => $this->context->transport->post->id]) ?>">
|
||||
<a class="rem-fav icon simple-action" href="<?= \Chibi\UrlHelper::route('post', 'rem-favorite', ['id' => $this->context->transport->post->id]) ?>">
|
||||
<i class="icon-fav"></i>
|
||||
<span>Remove from favorites</span>
|
||||
</a>
|
||||
|
@ -201,12 +201,12 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
|
||||
<?php if (count($this->context->transport->post->getFavorites()) > 0): ?>
|
||||
<div class="unit favorites">
|
||||
<h1>favorites (<?php echo count($this->context->transport->post->getFavorites()) ?>)</h1>
|
||||
<h1>favorites (<?= count($this->context->transport->post->getFavorites()) ?>)</h1>
|
||||
<ul>
|
||||
<?php foreach ($this->context->transport->post->getFavorites() as $user): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>" title="<?php echo $user->name ?>">
|
||||
<img src="<?php echo htmlspecialchars($user->getAvatarUrl()) ?>" alt="<?php echo $user->name ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>" title="<?= $user->name ?>">
|
||||
<img src="<?= htmlspecialchars($user->getAvatarUrl()) ?>" alt="<?= $user->name ?>">
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
@ -220,8 +220,8 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<ul>
|
||||
<?php foreach ($this->context->transport->post->getRelations() as $relatedPost): ?>
|
||||
<li>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('post', 'view', ['id' => $relatedPost->id]) ?>">
|
||||
@<?php echo $relatedPost->id ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('post', 'view', ['id' => $relatedPost->id]) ?>">
|
||||
@<?= $relatedPost->id ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
@ -313,8 +313,8 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="post-wrapper post-type-<?php echo PostType::toString($this->context->transport->post->type) ?>">
|
||||
<?php echo $this->renderFile('post-file-render') ?>
|
||||
<div class="post-wrapper post-type-<?= PostType::toString($this->context->transport->post->type) ?>">
|
||||
<?= $this->renderFile('post-file-render') ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
@ -324,11 +324,11 @@ $canEditAnything = count(array_filter($editPostPrivileges)) > 0;
|
|||
<div class="comments-wrapper">
|
||||
<?php if (!empty($this->context->transport->post->getComments())): ?>
|
||||
<div class="unit comments">
|
||||
<h1>comments (<?php echo count($this->context->transport->post->getComments()) ?>)</h1>
|
||||
<h1>comments (<?= count($this->context->transport->post->getComments()) ?>)</h1>
|
||||
<div class="comments">
|
||||
<?php foreach ($this->context->transport->post->getComments() as $comment): ?>
|
||||
<?php $this->context->comment = $comment ?>
|
||||
<?php echo $this->renderFile('comment-small') ?>
|
||||
<?= $this->renderFile('comment-small') ?>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<ul>
|
||||
<?php foreach ($this->context->options as $option): ?>
|
||||
<li class="<?php echo $option['class']; if (isset($option['inactive'])) echo ' inactive' ?>">
|
||||
<li class="<?= $option['class']; if (isset($option['inactive'])) echo ' inactive' ?>">
|
||||
<?php
|
||||
$class = [];
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@ $showTabs = count($tabs) > 1;
|
|||
<ul>
|
||||
<?php foreach ($tabs as $tab => $name): ?>
|
||||
<?php if ($this->context->route->simpleActionName == $tab): ?>
|
||||
<li class="selected <?php echo $tab ?>">
|
||||
<li class="selected <?= $tab ?>">
|
||||
<?php else: ?>
|
||||
<li class="<?php echo $tab ?>">
|
||||
<li class="<?= $tab ?>">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('tag', $tab) ?>">
|
||||
<?php echo $name ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('tag', $tab) ?>">
|
||||
<?= $name ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<?php else: ?>
|
||||
<li>
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('tag', 'list', ['filter' => $key]) ?>"><?php echo $text ?></a>
|
||||
<a href="<?= \Chibi\UrlHelper::route('tag', 'list', ['filter' => $key]) ?>"><?= $text ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
@ -34,9 +34,9 @@
|
|||
<?php foreach ($this->context->transport->tags as $tag): ?>
|
||||
<?php $name = $tag['name'] ?>
|
||||
<?php $count = $tag['post_count'] ?>
|
||||
<li class="tag" title="<?php echo $name ?> (<?php echo $count ?>)">
|
||||
<a href="<?php echo str_replace('_query_', $name, $url) ?>" class="frequency<?php printf('%1.0f', $add + $mul * log($count)) ?>">
|
||||
<?php echo $name . ' (' . $count . ')' ?>
|
||||
<li class="tag" title="<?= $name ?> (<?= $count ?>)">
|
||||
<a href="<?= str_replace('_query_', $name, $url) ?>" class="frequency<?php printf('%1.0f', $add + $mul * log($count)) ?>">
|
||||
<?= $name . ' (' . $count . ')' ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<div class="form-wrapper">
|
||||
<form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'mass-tag-redirect') ?>">
|
||||
<form method="post" action="<?= \Chibi\UrlHelper::route('tag', 'mass-tag-redirect') ?>">
|
||||
<h1>mass tag</h1>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="mass-tag-query">Search query:</label>
|
||||
<div class="input-wrapper"><input class="autocomplete" type="text" name="query" id="mass-tag-query" value="<?php echo isset($this->context->massTagQuery) ? htmlspecialchars($this->context->massTagQuery) : '' ?>"/></div>
|
||||
<div class="input-wrapper"><input class="autocomplete" type="text" name="query" id="mass-tag-query" value="<?= isset($this->context->massTagQuery) ? htmlspecialchars($this->context->massTagQuery) : '' ?>"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="mass-tag-tag">Tag:</label>
|
||||
<div class="input-wrapper"><input class="autocomplete" type="text" name="tag" id="mass-tag-tag" value="<?php echo isset($this->context->massTagTag) ? htmlspecialchars($this->context->massTagTag) : '' ?>"/></div>
|
||||
<div class="input-wrapper"><input class="autocomplete" type="text" name="tag" id="mass-tag-tag" value="<?= isset($this->context->massTagTag) ? htmlspecialchars($this->context->massTagTag) : '' ?>"/></div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="old-page" value="<?php echo isset($this->context->transport->paginator) ? htmlspecialchars($this->context->transport->paginator->page) : '' ?>"/>
|
||||
<input type="hidden" name="old-query" value="<?php echo isset($this->context->massTagQuery) ? htmlspecialchars($this->context->massTagQuery) : '' ?>"/>
|
||||
<input type="hidden" name="old-page" value="<?= isset($this->context->transport->paginator) ? htmlspecialchars($this->context->transport->paginator->page) : '' ?>"/>
|
||||
<input type="hidden" name="old-query" value="<?= isset($this->context->massTagQuery) ? htmlspecialchars($this->context->massTagQuery) : '' ?>"/>
|
||||
<input type="hidden" name="submit" value="1"/>
|
||||
|
||||
<div class="form-row">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="form-wrapper">
|
||||
<form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'merge') ?>">
|
||||
<form method="post" action="<?= \Chibi\UrlHelper::route('tag', 'merge') ?>">
|
||||
<h1>merge tags</h1>
|
||||
|
||||
<div class="form-row">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="form-wrapper">
|
||||
<form method="post" action="<?php echo \Chibi\UrlHelper::route('tag', 'rename') ?>">
|
||||
<form method="post" action="<?= \Chibi\UrlHelper::route('tag', 'rename') ?>">
|
||||
<h1>rename tags</h1>
|
||||
|
||||
<div class="form-row">
|
||||
|
|
|
@ -114,9 +114,9 @@
|
|||
<ul>
|
||||
<?php foreach (PostSafety::getAll() as $safety): ?>
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ListPosts, PostSafety::toString($safety))): ?>
|
||||
<li class="safety-<?php echo TextCaseConverter::convert(PostSafety::toString($safety), TextCaseConverter::CAMEL_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'toggle-safety', ['safety' => $safety]) ?>" class="<?php echo $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>" title="Searching <?php echo PostSafety::toDisplayString($safety) ?> posts: <?php echo $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>">
|
||||
<span><?php echo ucfirst(PostSafety::toDisplayString($safety)) ?></span>
|
||||
<li class="safety-<?= TextCaseConverter::convert(PostSafety::toString($safety), TextCaseConverter::CAMEL_CASE, TextCaseConverter::SPINAL_CASE) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'toggle-safety', ['safety' => $safety]) ?>" class="<?= $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>" title="Searching <?= PostSafety::toDisplayString($safety) ?> posts: <?= $this->context->user->hasEnabledSafety($safety) ? 'enabled' : 'disabled' ?>">
|
||||
<span><?= ucfirst(PostSafety::toDisplayString($safety)) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
|
@ -126,8 +126,8 @@
|
|||
<?php endif ?>
|
||||
|
||||
<li class="search">
|
||||
<form name="search" action="<?php echo \Chibi\UrlHelper::route('post', 'list') ?>" method="get">
|
||||
<input class="autocomplete" type="search" name="query" placeholder="Search…" value="<?php echo isset($this->context->transport->searchQuery) ? htmlspecialchars($this->context->transport->searchQuery) : '' ?>"/>
|
||||
<form name="search" action="<?= \Chibi\UrlHelper::route('post', 'list') ?>" method="get">
|
||||
<input class="autocomplete" type="search" name="query" placeholder="Search…" value="<?= isset($this->context->transport->searchQuery) ? htmlspecialchars($this->context->transport->searchQuery) : '' ?>"/>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form action="<?php echo \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>" method="post" class="delete confirmable" autocomplete="off" data-confirm-text="Are you sure you want to delete your account?">
|
||||
<form action="<?= \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>" method="post" class="delete confirmable" autocomplete="off" data-confirm-text="Are you sure you want to delete your account?">
|
||||
<?php if ($this->context->user->id == $this->context->transport->user->id): ?>
|
||||
<div class="form-row current-password">
|
||||
<label for="current-password">Current password:</label>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form action="<?php echo \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>" method="post" class="edit" autocomplete="off">
|
||||
<form action="<?= \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>" method="post" class="edit" autocomplete="off">
|
||||
<?php if ($this->context->user->id == $this->context->transport->user->id): ?>
|
||||
<div class="form-row current-password">
|
||||
<label for="current-password">Current password:</label>
|
||||
|
@ -10,25 +10,25 @@
|
|||
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserName, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
|
||||
<div class="form-row nickname">
|
||||
<label for="name">Name:</label>
|
||||
<div class="input-wrapper"><input type="text" name="name" id="name" placeholder="New name…" value="<?php echo htmlspecialchars($this->context->suppliedName) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="text" name="name" id="name" placeholder="New name…" value="<?= htmlspecialchars($this->context->suppliedName) ?>"/></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserEmail, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
|
||||
<div class="form-row email">
|
||||
<label for="name">E-mail:</label>
|
||||
<div class="input-wrapper"><input type="text" name="email" id="email" placeholder="New e-mail…" value="<?php echo htmlspecialchars($this->context->suppliedEmail) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="text" name="email" id="email" placeholder="New e-mail…" value="<?= htmlspecialchars($this->context->suppliedEmail) ?>"/></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ChangeUserPassword, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
|
||||
<div class="form-row password1">
|
||||
<label for="password1">New password:</label>
|
||||
<div class="input-wrapper"><input type="password" name="password1" id="password1" placeholder="New password…" value="<?php echo htmlspecialchars($this->context->suppliedPassword1) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="password" name="password1" id="password1" placeholder="New password…" value="<?= htmlspecialchars($this->context->suppliedPassword1) ?>"/></div>
|
||||
</div>
|
||||
<div class="form-row password2">
|
||||
<label for="password2"></label>
|
||||
<div class="input-wrapper"><input type="password" name="password2" id="password2" placeholder="New password… (repeat)" value="<?php echo htmlspecialchars($this->context->suppliedPassword2) ?>"/></div>
|
||||
<div class="input-wrapper"><input type="password" name="password2" id="password2" placeholder="New password… (repeat)" value="<?= htmlspecialchars($this->context->suppliedPassword2) ?>"/></div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
|
@ -39,11 +39,11 @@
|
|||
<?php foreach (AccessRank::getAll() as $rank): ?>
|
||||
<?php if ($rank == AccessRank::Nobody) continue ?>
|
||||
<?php if (($this->context->suppliedAccessRank != '' and $rank == $this->context->suppliedAccessRank) or ($this->context->suppliedAccessRank == '' and $rank == $this->context->transport->user->accessRank)): ?>
|
||||
<option value="<?php echo $rank ?>" selected="selected">
|
||||
<option value="<?= $rank ?>" selected="selected">
|
||||
<?php else: ?>
|
||||
<option value="<?php echo $rank ?>">
|
||||
<option value="<?= $rank ?>">
|
||||
<?php endif ?>
|
||||
<?php echo AccessRank::toDisplayString($rank) ?>
|
||||
<?= AccessRank::toDisplayString($rank) ?>
|
||||
</option>
|
||||
<?php endforeach ?>
|
||||
</select></div>
|
||||
|
|
|
@ -27,7 +27,7 @@ if ($this->context->user->hasEnabledEndlessScrolling())
|
|||
<?php else: ?>
|
||||
<li>
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'list', ['filter' => $key]) ?>"><?php echo $text ?></a>
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'list', ['filter' => $key]) ?>"><?= $text ?></a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
@ -40,26 +40,26 @@ if ($this->context->user->hasEnabledEndlessScrolling())
|
|||
<div class="users paginator-content">
|
||||
<?php foreach ($this->context->transport->users as $user): ?>
|
||||
<div class="user">
|
||||
<a class="avatar" href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<img src="<?php echo htmlspecialchars($user->getAvatarUrl(100)) ?>" alt="<?php echo $user->name ?>"/>
|
||||
<a class="avatar" href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<img src="<?= htmlspecialchars($user->getAvatarUrl(100)) ?>" alt="<?= $user->name ?>"/>
|
||||
</a>
|
||||
<div class="details">
|
||||
<h1>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<?php echo $user->name ?>
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $user->name]) ?>">
|
||||
<?= $user->name ?>
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<div class="date-registered" title="<?php echo TextHelper::formatDate($user->joinDate, true) ?>">
|
||||
Registered: <?php echo TextHelper::formatDate($user->joinDate, false) ?>
|
||||
<div class="date-registered" title="<?= TextHelper::formatDate($user->joinDate, true) ?>">
|
||||
Registered: <?= TextHelper::formatDate($user->joinDate, false) ?>
|
||||
</div>
|
||||
|
||||
<div class="post-count">
|
||||
Uploaded: <?php echo TextHelper::useDecimalUnits($user->getPostCount()) ?>
|
||||
Uploaded: <?= TextHelper::useDecimalUnits($user->getPostCount()) ?>
|
||||
</div>
|
||||
|
||||
<div class="fav-count">
|
||||
Favorites: <?php echo TextHelper::useDecimalUnits($user->getFavoriteCount()) ?>
|
||||
Favorites: <?= TextHelper::useDecimalUnits($user->getFavoriteCount()) ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -9,27 +9,27 @@ CustomAssetViewDecorator::setSubTitle('registration form');
|
|||
CustomAssetViewDecorator::addStylesheet('auth.css');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route('auth', 'register') ?>" class="auth register" method="post">
|
||||
<form action="<?= \Chibi\UrlHelper::route('auth', 'register') ?>" class="auth register" method="post">
|
||||
<p>Registered users can view more content,<br/>upload files and add posts to favorites.</p>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="name">User name:</label>
|
||||
<div class="input-wrapper"><input type="text" id="name" name="name" value="<?php echo htmlspecialchars($this->context->suppliedName) ?>" placeholder="e.g. darth_vader" autocomplete="off"/></div>
|
||||
<div class="input-wrapper"><input type="text" id="name" name="name" value="<?= htmlspecialchars($this->context->suppliedName) ?>" placeholder="e.g. darth_vader" autocomplete="off"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="password1">Password:</label>
|
||||
<div class="input-wrapper"><input type="password" id="password1" name="password1" value="<?php echo htmlspecialchars($this->context->suppliedPassword1) ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||
<div class="input-wrapper"><input type="password" id="password1" name="password1" value="<?= htmlspecialchars($this->context->suppliedPassword1) ?>" placeholder="e.g. <?= str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="password2">Password (repeat):</label>
|
||||
<div class="input-wrapper"><input type="password" id="password2" name="password2" value="<?php echo htmlspecialchars($this->context->suppliedPassword2) ?>" placeholder="e.g. <?php echo str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||
<div class="input-wrapper"><input type="password" id="password2" name="password2" value="<?= htmlspecialchars($this->context->suppliedPassword2) ?>" placeholder="e.g. <?= str_repeat('●', 8) ?>" autocomplete="off"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label for="email">E-mail address:</label>
|
||||
<div class="input-wrapper"><input type="text" id="email" name="email" value="<?php echo htmlspecialchars($this->context->suppliedEmail) ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/></div>
|
||||
<div class="input-wrapper"><input type="text" id="email" name="email" value="<?= htmlspecialchars($this->context->suppliedEmail) ?>" placeholder="e.g. vader@empire.gov" autocomplete="off"/></div>
|
||||
</div>
|
||||
|
||||
<p id="email-info">Your e-mail will be used to show your <a href="http://gravatar.com/">Gravatar</a>.<br/>Leave blank for random Gravatar.</p>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
CustomAssetViewDecorator::addStylesheet('auth.css');
|
||||
?>
|
||||
|
||||
<form action="<?php echo \Chibi\UrlHelper::route($this->context->route->simpleControllerName, $this->context->route->simpleActionName) ?>" method="post" class="auth" autocomplete="off">
|
||||
<form action="<?= \Chibi\UrlHelper::route($this->context->route->simpleControllerName, $this->context->route->simpleActionName) ?>" method="post" class="auth" autocomplete="off">
|
||||
<div class="form-row">
|
||||
<label>User:</label>
|
||||
<div class="input-wrapper">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form action="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings">
|
||||
<form action="<?= \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>" method="post" class="settings">
|
||||
<div class="form-row safety">
|
||||
<label>Safety:</label>
|
||||
<div class="input-wrapper">
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
echo TextHelper::htmlTag('input', TextHelper::HTML_LEAF, $attrs);
|
||||
?>
|
||||
<?php echo ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
<?= ucfirst(PostSafety::toDisplayString($safety)) ?>
|
||||
</label>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
|
|
|
@ -5,10 +5,10 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
|
||||
<div id="sidebar">
|
||||
<div class="avatar-wrapper">
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name]) ?>">
|
||||
<img src="<?php echo htmlspecialchars($this->context->transport->user->getAvatarUrl(140)) ?>" alt="<?php echo $this->context->transport->user->name ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name]) ?>">
|
||||
<img src="<?= htmlspecialchars($this->context->transport->user->getAvatarUrl(140)) ?>" alt="<?= $this->context->transport->user->name ?>">
|
||||
</a>
|
||||
<h1><?php echo $this->context->transport->user->name ?></h1>
|
||||
<h1><?= $this->context->transport->user->name ?></h1>
|
||||
</div>
|
||||
|
||||
<div class="unit details">
|
||||
|
@ -16,32 +16,32 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
|
||||
<div class="key-value join-date">
|
||||
<span class="key">Joined:</span>
|
||||
<span class="value" title="<?php echo TextHelper::formatDate($this->context->transport->user->joinDate, true) ?>">
|
||||
<?php echo TextHelper::formatDate($this->context->transport->user->joinDate, false) ?>
|
||||
<span class="value" title="<?= TextHelper::formatDate($this->context->transport->user->joinDate, true) ?>">
|
||||
<?= TextHelper::formatDate($this->context->transport->user->joinDate, false) ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="key-value last-login">
|
||||
<span class="key">Last login:</span>
|
||||
<span class="value" title="<?php echo TextHelper::formatDate($this->context->transport->user->lastLoginDate, true) ?>">
|
||||
<?php echo TextHelper::formatDate($this->context->transport->user->lastLoginDate, false) ?>
|
||||
<span class="value" title="<?= TextHelper::formatDate($this->context->transport->user->lastLoginDate, true) ?>">
|
||||
<?= TextHelper::formatDate($this->context->transport->user->lastLoginDate, false) ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="key-value access-rank">
|
||||
<span class="key">Access rank:</span>
|
||||
<span class="value" title="<?php echo $val = AccessRank::toDisplayString($this->context->transport->user->accessRank) ?>">
|
||||
<?php echo $val ?>
|
||||
<span class="value" title="<?= $val = AccessRank::toDisplayString($this->context->transport->user->accessRank) ?>">
|
||||
<?= $val ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?php if (PrivilegesHelper::confirm(Privilege::ViewUserEmail, PrivilegesHelper::getIdentitySubPrivilege($this->context->transport->user))): ?>
|
||||
<div class="key-value email">
|
||||
<span class="key">E-mail:</span>
|
||||
<span class="value" title="<?php echo $val = ($this->context->transport->user->emailUnconfirmed
|
||||
<span class="value" title="<?= $val = ($this->context->transport->user->emailUnconfirmed
|
||||
? '(unconfirmed) ' . $this->context->transport->user->emailUnconfirmed
|
||||
: $this->context->transport->user->emailConfirmed ?: 'none specified') ?>">
|
||||
<?php echo $val ?>
|
||||
<?= $val ?>
|
||||
</span>
|
||||
<br>(only you and staff can see this)
|
||||
</div>
|
||||
|
@ -156,7 +156,7 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
<?php else: ?>
|
||||
<li class="favs">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name, 'tab' => 'favs', 'page' => 1]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name, 'tab' => 'favs', 'page' => 1]) ?>">
|
||||
Favs
|
||||
</a>
|
||||
</li>
|
||||
|
@ -166,7 +166,7 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
<?php else: ?>
|
||||
<li class="uploads">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name, 'tab' => 'uploads', 'page' => 1]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'view', ['name' => $this->context->transport->user->name, 'tab' => 'uploads', 'page' => 1]) ?>">
|
||||
Uploads
|
||||
</a>
|
||||
</li>
|
||||
|
@ -177,7 +177,7 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
<?php else: ?>
|
||||
<li class="settings">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'settings', ['name' => $this->context->transport->user->name]) ?>">
|
||||
Browsing settings
|
||||
</a>
|
||||
</li>
|
||||
|
@ -189,7 +189,7 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
<?php else: ?>
|
||||
<li class="edit">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'edit', ['name' => $this->context->transport->user->name]) ?>">
|
||||
Account settings
|
||||
</a>
|
||||
</li>
|
||||
|
@ -201,7 +201,7 @@ CustomAssetViewDecorator::addStylesheet('user-view.css');
|
|||
<?php else: ?>
|
||||
<li class="delete">
|
||||
<?php endif ?>
|
||||
<a href="<?php echo \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>">
|
||||
<a href="<?= \Chibi\UrlHelper::route('user', 'delete', ['name' => $this->context->transport->user->name]) ?>">
|
||||
Delete account
|
||||
</a>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue