]> git.mxchange.org Git - friendica.git/commitdiff
Move title attribute to <time> tag
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 22 Nov 2021 03:51:21 +0000 (22:51 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 22 Nov 2021 03:51:21 +0000 (22:51 -0500)
- Use correct machine-readable value in datetime attribute

src/Content/Conversation.php
src/Module/Settings/TwoFactor/Trusted.php
src/Security/TwoFactor/Model/AppSpecificPassword.php
view/templates/settings/twofactor/app_specific.tpl
view/templates/settings/twofactor/trusted_browsers.tpl
view/templates/wall_thread.tpl
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/quattro/templates/wall_thread.tpl
view/theme/smoothly/templates/wall_thread.tpl
view/theme/vier/templates/wall_thread.tpl

index d8cbbf7cbb6dec2129ea5cdaab2c4bbbe5ad2a97..8fb078fce355eba6321f41cd1d1a91db7baef5e4 100644 (file)
@@ -669,6 +669,7 @@ class Conversation
                                                'folders'              => $folders,
                                                'text'                 => strip_tags($body_html),
                                                'localtime'            => DateTimeFormat::local($item['created'], 'r'),
+                                               'utc'                  => DateTimeFormat::utc($item['created'], 'c'),
                                                'ago'                  => (($item['app']) ? $this->l10n->t('%s from %s', Temporal::getRelativeDate($item['created']), $item['app']) : Temporal::getRelativeDate($item['created'])),
                                                'location_html'        => $location_html,
                                                'indent'               => '',
index e38d64ac0476ba5ced01ecc02f00136a7611b2b6..844cd4dff4c9b91e60d7fae0f465db8bafe70fed 100644 (file)
@@ -8,6 +8,7 @@ use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues;
 use Friendica\Core\Renderer;
 use Friendica\Module\BaseSettings;
 use Friendica\Security\TwoFactor;
+use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Temporal;
 use UAParser\Parser;
 
@@ -88,7 +89,11 @@ class Trusted extends BaseSettings
                $trustedBrowserDisplay = array_map(function (TwoFactor\Model\TrustedBrowser $trustedBrowser) use ($parser) {
                        $dates = [
                                'created_ago' => Temporal::getRelativeDate($trustedBrowser->created),
+                               'created_utc' => DateTimeFormat::utc($trustedBrowser->created, 'c'),
+                               'created_local' => DateTimeFormat::local($trustedBrowser->created, 'r'),
                                'last_used_ago' => Temporal::getRelativeDate($trustedBrowser->last_used),
+                               'last_used_utc' => DateTimeFormat::utc($trustedBrowser->last_used, 'c'),
+                               'last_used_local' => DateTimeFormat::local($trustedBrowser->last_used, 'r'),
                        ];
 
                        $result = $parser->parse($trustedBrowser->user_agent);
index cab160483862d4a5ab58b4235a05841b81a51995..0c47ed5564cf43a217e835c55b272b61eca2445a 100644 (file)
@@ -87,6 +87,8 @@ class AppSpecificPassword
 
                array_walk($appSpecificPasswords, function (&$value) {
                        $value['ago'] = Temporal::getRelativeDate($value['last_used']);
+                       $value['utc'] = DateTimeFormat::utc($value['last_used'], 'c');
+                       $value['local'] = DateTimeFormat::local($value['last_used'], 'r');
                });
 
                return $appSpecificPasswords;
index 1f582674458ba80584d4cefafe078d048087dbe6..965caffc8c484399bfba09c5c20b5e74b80b2396 100644 (file)
@@ -30,9 +30,7 @@
                                {{$app_specific_password.description}}
                                        </td>
                                        <td>
-                                               <span class="time" title="{{$app_specific_password.last_used}}" data-toggle="tooltip">
-                                                       <time datetime="{{$app_specific_password.last_used}}">{{$app_specific_password.ago}}</time>
-                                               </span>
+                                               <time class="time" title="{{$app_specific_password.local}}" data-toggle="tooltip" datetime="{{$app_specific_password.utc}}">{{$app_specific_password.ago}}</time>
                                        </td>
                                        <td>
                                                <button type="submit" name="revoke_id" class="btn btn-default btn-small" value="{{$app_specific_password.id}}">{{$revoke_label}}</button>
index e6d434b4fe405d49923af49d2932d0f546d34200..29d2ab29c6d87f8d42d4250e88ec9cc1d71e67fb 100644 (file)
                                {{$trusted_browser.browser}}
                                        </td>
                                        <td>
-                                               <span class="time" title="{{$trusted_browser.created}}" data-toggle="tooltip">
-                                                       <time datetime="{{$trusted_browser.created}}">{{$trusted_browser.created_ago}}</time>
-                                               </span>
+                                               <time class="time" title="{{$trusted_browser.created_local}}" data-toggle="tooltip" datetime="{{$trusted_browser.created_utc}}">{{$trusted_browser.created_ago}}</time>
                                        </td>
                                        <td>
-                                               <span class="time" title="{{$trusted_browser.last_used}}" data-toggle="tooltip">
-                                                       <time datetime="{{$trusted_browser.last_used}}">{{$trusted_browser.last_used_ago}}</time>
-                                               </span>
+                                               <time class="time" title="{{$trusted_browser.last_used_local}}" data-toggle="tooltip" datetime="{{$trusted_browser.last_used_utc}}">{{$trusted_browser.last_used_ago}}</time>
                                        </td>
                                        <td>
                                                <button type="submit" name="remove_id" class="btn btn-default btn-small" value="{{$trusted_browser.cookie_hash}}">{{$remove_label}}</button>
index c7da59a0de1bbef7b15133959ad738e950e2a879..d0e3b51eab53f22f3fd7d09fb0a33872cb350d16 100644 (file)
@@ -53,7 +53,7 @@
                </div>
                <div class="wall-item-author">
                                <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}">{{$item.name}}</span></a>{{if $item.owner_url}} {{$item.to}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a> {{$item.vwall}}{{/if}}<br />
-                               <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.localtime}}"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time><span class="pinned">{{$item.pinned}}</span></div>
+                               <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}"><time class="dt-published" title="{{$item.localtime}}" datetime="{{$item.utc}}">{{$item.ago}}</time><span class="pinned">{{$item.pinned}}</span></div>
                </div>
                <div class="wall-item-content" id="wall-item-content-{{$item.id}}">
                        <div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}" dir="auto">{{$item.title}}</div>
index 344e73f1d913d6ca432d3724db65a7f8941faf80..95e83ce8d63690264b8d122bef5879088044040c 100644 (file)
 
                                        <div class="additional-info text-muted">
                                                <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
-                                                       <small><a href="{{$item.plink.orig}}"><span class="time" title="{{$item.localtime}}" data-toggle="tooltip">{{$item.ago}}</span></a></small>
+                                                       <small>
+                                                               <a href="{{$item.plink.orig}}">
+                                                                       <time class="time" title="{{$item.localtime}}" data-toggle="tooltip" datetime="{{$item.utc}}">{{$item.ago}}</time>
+                                                               </a>
+                                                       </small>
                                                </div>
 
                                                {{if $item.location_html}}
index e91b1b99f8649acb648940046c2844c0a2831419..17f2c9d79ba55df51b0cbc52a51a81176c159cf2 100644 (file)
@@ -168,9 +168,7 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <div id="wall-item-ago-{{$item.id}}" class="wall-item-ago">
                                                <small>
                                                        <a href="{{$item.plink.orig}}">
-                                                               <span class="time" title="{{$item.localtime}}" data-toggle="tooltip">
-                                                                       <time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time>
-                                                               </span>
+                                                               <time class="time dt-published" title="{{$item.localtime}}" data-toggle="tooltip" datetime="{{$item.utc}}">{{$item.ago}}</time>
                                                        </a>
                                                        {{if $item.owner_self}}
                                                                {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
@@ -201,7 +199,9 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span>{{$item.name}}</span></a>
                                        <p class="text-muted">
                                                <small>
-                                                       <a class="time" href="{{$item.plink.orig}}"><span class="wall-item-ago">{{$item.ago}}</span></a>
+                                                       <a href="{{$item.plink.orig}}">
+                                                               <time class="time" class="wall-item-ago" datetime="{{$item.utc}}">{{$item.ago}}</time>
+                                                       </a>
                                                        {{if $item.location_html}}&nbsp;&mdash;&nbsp;({{$item.location_html nofilter}}){{/if}}
                                                        {{if $item.owner_self}}
                                                                {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
@@ -220,7 +220,9 @@ as the value of $top_child_total (this is done at the end of this file)
                                        <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link userinfo hover-card"><span class="fakelink">{{$item.name}}</span></a>
                                        <span class="text-muted">
                                <small>
-                                       <a class="time" href="{{$item.plink.orig}}" title="{{$item.localtime}}" data-toggle="tooltip">{{$item.ago}}</a>
+                                       <a href="{{$item.plink.orig}}">
+                                               <time class="time" title="{{$item.localtime}}" data-toggle="tooltip" datetime="{{$item.utc}}">{{$item.ago}}</time>
+                                       </a>
                                        {{if $item.location_html}}&nbsp;&mdash;&nbsp;({{$item.location_html nofilter}}){{/if}}
                                        {{if $item.owner_self}}
                                                {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
index 3eab3f56908aaa998349306135719011f2641a25..29dae72b43c523ec54ad9ea94de10ca0187a41fb 100644 (file)
@@ -90,7 +90,7 @@
                                 title="{{$item.linktitle}}"
                                 class="wall-item-name-link"><span
                                 class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a>
-                                <span class="wall-item-ago" title="{{$item.localtime}}"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time></span>
+                                <span class="wall-item-ago"><time class="dt-published" title="{{$item.localtime}}" datetime="{{$item.utc}}">{{$item.ago}}</time></span>
                                <span class="pinned">{{$item.pinned}}</span>
                                 {{if $item.owner_url}}<br/>{{$item.to}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a> {{$item.vwall}}
                                 {{/if}}
index 37bff215440d075ef905196b4fec7e64ac2ad9c6..773938f3c5853766a178dee03b693aa4bc3e97f4 100644 (file)
@@ -54,7 +54,7 @@
                        <span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}">{{$item.name}}</span>
                        </a>
                        <div class="wall-item-ago">&bull;</div>
-                       <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}" title="{{$item.localtime}}"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.ago}}</time><span class="pinned">{{$item.pinned}}</span></div>
+                       <div class="wall-item-ago" id="wall-item-ago-{{$item.id}}"><time class="dt-published" title="{{$item.localtime}}" datetime="{{$item.utc}}">{{$item.ago}}</time><span class="pinned">{{$item.pinned}}</span></div>
                </div>
 
                <div>
index 1d13b9e528ec1d2fbea40372cfef2143d47f51e0..f2bd02e7e7caf67db9cc40ad28a610487386b417 100644 (file)
@@ -56,7 +56,7 @@
                        <a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}">{{$item.name}}</span></a>
                        {{if $item.owner_url}}{{$item.via}} <a href="{{$item.owner_url}}" target="redir" title="{{$item.olinktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.osparkle}}" id="wall-item-ownername-{{$item.id}}">{{$item.owner_name}}</span></a>{{/if}}
                        <span class="wall-item-ago">
-                               {{if $item.plink}}<a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="u-url" style="color: #999"><time class="dt-published" datetime="{{$item.localtime}}">{{$item.created}}</time></a>{{else}} <time class="dt-published" datetime="{{$item.localtime}}">{{$item.created}}</time> {{/if}}
+                               {{if $item.plink}}<a title="{{$item.plink.title}}" href="{{$item.plink.href}}" class="u-url" style="color: #999"><time class="dt-published" datetime="{{$item.utc}}">{{$item.created}}</time></a>{{else}} <time class="dt-published" datetime="{{$item.utc}}">{{$item.created}}</time> {{/if}}
                                {{if $item.owner_self}}
                                        {{include file="sub/delivery_count.tpl" delivery=$item.delivery}}
                                {{/if}}