Merge pull request #882 from ArthurHoaro/feature/edit-timestamp

Add creation date when editing a link
This commit is contained in:
ArthurHoaro 2017-05-31 17:54:46 +02:00 committed by GitHub
commit 5c6fac0bfc
3 changed files with 16 additions and 3 deletions

View file

@ -1425,7 +1425,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
'url' => $url,
'description' => $description,
'tags' => $tags,
'private' => $private
'private' => $private,
);
} else {
$link['linkdate'] = $link['created']->format(LinkDB::LINK_DATE_FORMAT);

View file

@ -992,6 +992,14 @@ form[name="linkform"].page-form {
color: #3f3f3f;
}
/**
* EDIT LINK
*/
#editlinkform .created-date {
color: #767676;
margin-bottom: 10px;
}
/**
* LOGIN
*/

View file

@ -8,11 +8,15 @@
<div id="editlinkform" class="pure-g">
<div class="pure-u-lg-1-5 pure-u-1-24"></div>
<form method="post" name="linkform" class="page-form pure-u-lg-3-5 pure-u-22-24 page-form page-form-light">
<h2 class="window-title">{'Shaare'|t}</h2>
<h2 class="window-title">
{if="!$link_is_new"}{'Edit'|t}{/if}
{'Shaare'|t}
</h2>
<input type="hidden" name="lf_linkdate" value="{$link.linkdate}">
{if="isset($link.id)"}
<input type="hidden" name="lf_id" value="{$link.id}">
{/if}
{if="!$link_is_new"}<div class="created-date">{'Created:'|t} {$link.created|format_date}</div>{/if}
<div>
<label for="lf_url">{'URL'|t}</label>
</div>
@ -55,7 +59,8 @@ <h2 class="window-title">{'Shaare'|t}</h2>
<div class="submit-buttons center">
<input type="submit" value="{'Save'|t}" name="save_edit" class="" id="button-save-edit">
<input type="submit" name="save_edit" class="" id="button-save-edit"
value="{if="$link_is_new"}{'Save'|t}{else}{'Apply Changes'|t}{/if}">
{if="!$link_is_new"}
<a href="?delete_link&amp;lf_linkdate={$link.id}&amp;token={$token}"
title="" name="delete_link" class="button button-red confirm-delete">