]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Add creation date when editing a link 882/head
authorArthurHoaro <arthur@hoa.ro>
Wed, 31 May 2017 15:50:11 +0000 (17:50 +0200)
committerArthurHoaro <arthur@hoa.ro>
Wed, 31 May 2017 15:50:11 +0000 (17:50 +0200)
Also, alter the title on edition

Fixes #431

index.php
tpl/default/css/shaarli.css
tpl/default/editlink.html

index 92eb443ba6310477ed04d831a62c72d03f2bcc3c..cb0afbd0901a9efae11958dc7040f05172c40042 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1431,7 +1431,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);
index 2892064837ed49ca0293fd36139d0137c59ef1b8..8b86bce21de628dec6f1784c24a5fe5dda0a4ab4 100644 (file)
@@ -992,6 +992,14 @@ form[name="linkform"].page-form {
     color: #3f3f3f;
 }
 
+/**
+ * EDIT LINK
+ */
+#editlinkform .created-date {
+    color: #767676;
+    margin-bottom: 10px;
+}
+
 /**
  * LOGIN
  */
index 354499a4121376d8e143a073f1f53603531bc2ef..d03fd72ff2f0ec74db1c8ff7debfc549796c47f7 100644 (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 @@
 
 
       <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">