Prechádzať zdrojové kódy

#21 proper format, integration in Notes module

Alex Trofimov 13 rokov pred
rodič
commit
ee917fe8c8

+ 2 - 2
install/sql/v70.sql

@@ -473,9 +473,9 @@ INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `or
 SET @iCategoryId = LAST_INSERT_ID();
 SET @iCategoryId = LAST_INSERT_ID();
 
 
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
 INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
-(@iCategoryId, 'sys_format_date', 'Date Format', 'MMMM Do YYYY', 'digit', '', '', '', 10),
+(@iCategoryId, 'sys_format_date', 'Date Format', 'D MMM YYYY', 'digit', '', '', '', 10),
 (@iCategoryId, 'sys_format_time', 'Time Format', 'HH:mm', 'digit', '', '', '', 12),
 (@iCategoryId, 'sys_format_time', 'Time Format', 'HH:mm', 'digit', '', '', '', 12),
-(@iCategoryId, 'sys_format_datetime', 'Datetime Format', 'MMMM Do YYYY, h:mm:ss a', 'digit', '', '', '', 14),
+(@iCategoryId, 'sys_format_datetime', 'Datetime Format', 'D MMM YYYY h:mm:ss a', 'digit', '', '', '', 14),
 (@iCategoryId, 'sys_format_timeago', 'Use \'time ago\' format for dates less than this number of seconds', 432000, 'digit', '', '', '', 20);
 (@iCategoryId, 'sys_format_timeago', 'Use \'time ago\' format for dates less than this number of seconds', 432000, 'digit', '', '', '', 20);
 
 
 -- --------------------------------------------------------
 -- --------------------------------------------------------

+ 1 - 1
modules/boonex/notes/classes/BxNotesTemplate.php

@@ -66,7 +66,7 @@ class BxNotesTemplate extends BxDolModuleTemplate {
             'summary' => $sSummary,
             'summary' => $sSummary,
             'author' => $oProfile->getDisplayName(),
             'author' => $oProfile->getDisplayName(),
             'author_url' => $oProfile->getUrl(),
             'author_url' => $oProfile->getUrl(),
-            'when' => defineTimeInterval($aData['added']),
+            'entry_posting_date' => bx_time_js($aData['added'], BX_FORMAT_DATE),
             'bx_if:thumb' => array (
             'bx_if:thumb' => array (
                 'condition' => $sPhotoThumb,
                 'condition' => $sPhotoThumb,
                 'content' => array (
                 'content' => array (

+ 1 - 1
modules/boonex/notes/template/unit.html

@@ -10,6 +10,6 @@
         __summary__
         __summary__
     </div>
     </div>
     <div class="bx-clear"></div>
     <div class="bx-clear"></div>
-    <div class="bx-notes-unit-info bx-def-margin-sec-top"><a href="__author_url__">__author__</a> <span class="bx-notes-unit-info-div bx-def-font-grayed">&#183;</span> __when__</div>
+    <div class="bx-notes-unit-info bx-def-margin-sec-top"><a href="__author_url__">__author__</a> <span class="bx-notes-unit-info-div bx-def-font-grayed">&#183;</span> __entry_posting_date__</div>
 </div>
 </div>