Browse Source

Replace obsolete calls to $APP->is_mobile in templates

pull/9701/head
Hypolite Petovan 1 month ago
parent
commit
241cd32b14
5 changed files with 19 additions and 15 deletions
  1. +2
    -1
      include/conversation.php
  2. +2
    -1
      mod/editpost.php
  3. +2
    -0
      src/Module/Notifications/Introductions.php
  4. +1
    -1
      view/templates/jot-header.tpl
  5. +12
    -12
      view/theme/frio/templates/notifications/intros.tpl

+ 2
- 1
include/conversation.php View File

@ -1177,7 +1177,8 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
'$term' => DI::l10n()->t('Tag term:'),
'$fileas' => DI::l10n()->t('Save to Folder:'),
'$whereareu' => DI::l10n()->t('Where are you right now?'),
'$delitems' => DI::l10n()->t("Delete item\x28s\x29?")
'$delitems' => DI::l10n()->t("Delete item\x28s\x29?"),
'$is_mobile' => DI::mode()->isMobile(),
]);
$jotplugins = '';

+ 2
- 1
mod/editpost.php View File

@ -66,7 +66,8 @@ function editpost_content(App $a)
DI::page()['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => '&nbsp;', // DI::l10n()->t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
'$nickname' => $a->user['nickname'],
'$is_mobile' => DI::mode()->isMobile(),
]);
if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) {

+ 2
- 0
src/Module/Notifications/Introductions.php View File

@ -112,6 +112,7 @@ class Introductions extends BaseNotifications
'$note' => $notification->getNote(),
'$ignore' => DI::l10n()->t('Ignore'),
'$discard' => DI::l10n()->t('Discard'),
'$is_mobile' => DI::mode()->isMobile(),
]);
break;
@ -190,6 +191,7 @@ class Introductions extends BaseNotifications
'$ignore' => DI::l10n()->t('Ignore'),
'$discard' => $discard,
'$action' => $action,
'$is_mobile' => DI::mode()->isMobile(),
]);
break;
}

+ 1
- 1
view/templates/jot-header.tpl View File

@ -8,7 +8,7 @@ var textlen = 0;
function initEditor(callback) {
if (editor == false) {
var colorbox_options = {
{{if $APP->is_mobile}}
{{if $is_mobile}}
'width' : '100%',
'height' : '100%',
{{/if}}

+ 12
- 12
view/theme/frio/templates/notifications/intros.tpl View File

@ -36,6 +36,17 @@
<div class="intro-note intro-note-{{$intro_id}}">{{$note}}</div>
</div>
{{* On mobile touch devices we use buttons for approve, ingnore && discard to have a better UX *}}
{{if $is_mobile}}
<div class="intro-action-buttons">
<form class="intro-form pull-left" action="notification/{{$intro_id}}" method="post">
<button class="btn btn-small btn-default intro-submit-ignore" type="submit" name="submit" value="{{$ignore}}">{{$ignore}}</button>
{{if $discard}}<button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard}}">{{$discard}}</button>&nbsp;{{/if}}
</form>
<button class="btn btn-small btn-primary intro-submit-approve pull-right" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}')">{{$approve}}</button>
</div>
<div class="clear"></div>
{{else}}
{{* The intro actions like approve, ignore, discard intro*}}
<div class="intro-actions pull-right nav-pills preferences">
<button class="btn-link intro-action-link" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}');" aria-label="{{$approve}}" title="{{$approve}}" data-toggle="tooltip"><i class="fa fa-check" aria-hidden="true"></i></button>
@ -45,6 +56,7 @@
{{if $discard}}<button class="btn-link intro-submit-discard intro-action-link" type="submit" name="submit" value="{{$discard}}" aria-label="{{$discard}}" title="{{$discard}}" data-toggle="tooltip"><i class="fa fa-trash-o" aria-hidden="true"></i></button>{{/if}}
</form>
</div>
{{/if}}
{{* This sections contains special settings for contact approval. We hide it by default and load this section in
a bootstrap modal in the case of approval *}}
@ -74,17 +86,5 @@
</form>
</div>
</div>
{{* On mobile touch devices we use buttons for approve, ingnore && discard to have a better UX *}}
{{if $APP->is_mobile}}
<div class="intro-action-buttons">
<form class="intro-form pull-left" action="notification/{{$intro_id}}" method="post">
<button class="btn btn-small btn-default intro-submit-ignore" type="submit" name="submit" value="{{$ignore}}">{{$ignore}}</button>
{{if $discard}}<button class="btn btn-small btn-default intro-submit-discard" type="submit" name="submit" value="{{$discard}}">{{$discard}}</button>&nbsp;{{/if}}
</form>
<button class="btn btn-small btn-primary intro-submit-approve pull-right" onclick="addElmToModal('#intro-approve-wrapper-{{$intro_id}}')">{{$approve}}</button>
</div>
<div class="clear"></div>
{{/if}}
</div>
<div class="intro-end"></div>

Loading…
Cancel
Save