1
0
Fork 0

Merge pull request #13268 from MrPetovan/task/normalize-item-action-label

Normalize item action label key name
This commit is contained in:
Tobias Diekershoff 2023-07-10 10:01:50 +02:00 committed by GitHub
commit 1359b171af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 43 additions and 45 deletions

View file

@ -248,9 +248,6 @@ class Post
$pinned = DI::l10n()->t('Pinned item');
}
// Showing the one or the other text, depending upon if we can only hide it or really delete it.
$delete = $origin ? DI::l10n()->t('Delete globally') : DI::l10n()->t('Remove locally');
$drop = false;
$block = false;
$ignore = false;
@ -261,24 +258,24 @@ class Post
'dropping' => $dropping,
'pagedrop' => $item['pagedrop'],
'select' => DI::l10n()->t('Select'),
'delete' => $delete,
'label' => $origin ? DI::l10n()->t('Delete globally') : DI::l10n()->t('Remove locally'),
];
}
if (!$item['self'] && DI::userSession()->getLocalUserId()) {
$block = [
'blocking' => true,
'block' => DI::l10n()->t('Block %s', $item['author-name']),
'label' => DI::l10n()->t('Block %s', $item['author-name']),
'author_id' => $item['author-id'],
];
$ignore = [
'ignoring' => true,
'ignore' => DI::l10n()->t('Ignore %s', $item['author-name']),
'label' => DI::l10n()->t('Ignore %s', $item['author-name']),
'author_id' => $item['author-id'],
];
$collapse = [
'collapsing' => true,
'collapse' => DI::l10n()->t('Collapse %s', $item['author-name']),
'label' => DI::l10n()->t('Collapse %s', $item['author-name']),
'author_id' => $item['author-id'],
];
$report = [

View file

@ -7,8 +7,8 @@
<div class="wall-item-outside-wrapper {{$item.indent}}{{$item.previewing}}" id="wall-item-outside-wrapper-{{$item.id}}">
<div class="wall-item-content-wrapper {{$item.indent}}" id="wall-item-content-wrapper-{{$item.id}}">
<div class="wall-item-info" id="wall-item-info-{{$item.id}}">
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-{{$item.id}}"
onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')"
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-{{$item.id}}"
onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')"
onmouseout="t{{$item.id}}=setTimeout('closeMenu(\'wall-item-photo-menu-button-{{$item.id}}\'); closeMenu(\'wall-item-photo-menu-{{$item.id}}\');',200)">
<a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$item.id}}">
<img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" style="height: 80px; width: 80px;" alt="{{$item.name}}" /></a>
@ -19,17 +19,17 @@
</ul>
</div>
</div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-wrapper" id="wall-item-wrapper-{{$item.id}}">
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" /></div>
{{else}}<div class="wall-item-lock"></div>{{/if}}
{{else}}<div class="wall-item-lock"></div>{{/if}}
<div class="wall-item-location" id="wall-item-location-{{$item.id}}">{{$item.location_html nofilter}}</div>
</div>
</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>
<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-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" id="wall-item-title-{{$item.id}}" dir="auto">{{$item.title}}</div>
<div class="wall-item-title-end"></div>
@ -46,7 +46,7 @@
</div>
<div class="wall-item-tools" id="wall-item-tools-{{$item.id}}">
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}">
{{if $item.drop && $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>{{/if}}
{{if $item.drop && $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.label}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>{{/if}}
</div>
{{if $item.drop && $item.drop.pagedrop}}<input type="checkbox" onclick="checkboxhighlight(this);" title="{{$item.drop.select}}" class="item-select" name="itemselected[]" value="{{$item.id}}" />{{/if}}
<div class="wall-item-delete-end"></div>

View file

@ -165,7 +165,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a role="button" href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" title="{{$item.drop.delete}}"><i class="icon-trash icon-large"><span class="sr-only">{{$item.drop.delete}}</span></i></a>
<a role="button" href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" title="{{$item.drop.label}}"><i class="icon-trash icon-large"><span class="sr-only">{{$item.drop.label}}</span></i></a>
{{/if}}
{{if $item.report}}
<a href="{{$item.report.href}}" title="{{$item.report.label}}"><i class="icon-flag icon-large"><span class="sr-only">{{$item.report.label}}</span></i></a>

View file

@ -245,7 +245,7 @@
{{if $item.drop && $item.drop.dropping}}
<li role="menuitem">
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</a>
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
</li>
{{/if}}
</ul>

View file

@ -390,23 +390,24 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $item.drop && $item.drop.dropping}}
<li role="menuitem">
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</a>
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
</li>
{{/if}}
{{if $item.block}}
<li role="menuitem">
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.block.block}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.block}}</a>
<a class="btn-link navicon block" href="javascript:blockAuthor('item/block/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.block.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.block.label}}</a>
</li>
{{/if}}
{{if $item.ignore_author}}
<li role="menuitem">
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.ignore}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.ignore_author.ignore}}</a>
<a class="btn-link navicon ignore" href="javascript:ignoreAuthor('item/ignore/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.ignore_author.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.ignore_author.label}}</a>
</li>
{{/if}}
{{if $item.collapse}}
<li role="menuitem">
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.collapse.collapse}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.collapse.collapse}}</a>
<a class="btn-link navicon collapse" href="javascript:collapseAuthor('item/collapse/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.collapse.label}}"><i class="fa fa-ban" aria-hidden="true"></i> {{$item.collapse.label}}</a>
</li>
</li>
{{/if}}
{{if $item.report}}
@ -564,7 +565,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $item.drop && $item.drop.dropping}}
<li role="menuitem">
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}/{{$item.return}}', 'item-{{$item.guid}}');" title="{{$item.drop.delete}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.delete}}</a>
<a class="btn-link navicon delete" href="javascript:dropItem('item/drop/{{$item.id}}', 'item-{{$item.guid}}');" title="{{$item.drop.label}}"><i class="fa fa-trash" aria-hidden="true"></i> {{$item.drop.label}}</a>
</li>
{{/if}}
</ul>

View file

@ -75,7 +75,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.label}}">{{$item.drop.label}}</a>
{{/if}}
{{if $item.edpost}}
<a class="icon edit s16" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"></a>

View file

@ -2,12 +2,12 @@
{{else}}
{{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer">
<span id="hide-comments-total-{{$item.id}}"
<span id="hide-comments-total-{{$item.id}}"
class="hide-comments-total">{{$item.num_comments}}</span>
<span id="hide-comments-{{$item.id}}"
class="hide-comments fakelink"
<span id="hide-comments-{{$item.id}}"
class="hide-comments fakelink"
onclick="showHideComments({{$item.id}});">{{$item.hide_text}}</span>
{{if $item.thread_level==3}} -
{{if $item.thread_level==3}} -
<span id="hide-thread-{{$item}}-id"
class="fakelink"
onclick="showThread({{$item.id}});">expand</span> /
@ -32,7 +32,7 @@
<ul class="contact-menu menu-popup" id="wall-item-photo-menu-{{$item.id}}">
{{$item.item_photo_menu_html nofilter}}
</ul>
</div>
<div class="wall-item-location">{{$item.location_html nofilter}}</div>
</div>
@ -44,7 +44,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.label}}">{{$item.drop.label}}</a>
{{/if}}
</div>
</div>

View file

@ -149,7 +149,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
<a href="item/drop/{{$item.id}}/{{$item.return}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.label}}">{{$item.drop.label}}</a>
{{/if}}
{{if $item.edpost}}
<a class="icon edit s16" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"></a>

View file

@ -5,8 +5,8 @@
<span class="uriid" style="display: none;">{{$item.uriid}}</span>
<div class="wall-item-content-wrapper {{$item.indent}} {{$item.shiny}}" id="wall-item-content-wrapper-{{$item.id}}">
<div class="wall-item-info" id="wall-item-info-{{$item.id}}">
<div class="wall-item-photo-wrapper mframe" id="wall-item-photo-wrapper-{{$item.id}}"
onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')"
<div class="wall-item-photo-wrapper mframe" id="wall-item-photo-wrapper-{{$item.id}}"
onmouseover="if (typeof t{{$item.id}} != 'undefined') clearTimeout(t{{$item.id}}); openMenu('wall-item-photo-menu-button-{{$item.id}}')"
onmouseout="t{{$item.id}}=setTimeout('closeMenu(\'wall-item-photo-menu-button-{{$item.id}}\'); closeMenu(\'wall-item-photo-menu-{{$item.id}}\');',200)">
<a href="{{$item.profile_url}}" target="redir" title="{{$item.linktitle}}" class="wall-item-photo-link" id="wall-item-photo-link-{{$item.id}}">
<img src="{{$item.thumb}}" class="wall-item-photo{{$item.sparkle}}" id="wall-item-photo-{{$item.id}}" style="height: 80px; width: 80px;" alt="{{$item.name}}" /></a>
@ -17,16 +17,16 @@
</ul>
</div>
</div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-photo-end"></div>
<div class="wall-item-location" id="wall-item-location-{{$item.id}}">{{if $item.location_html}}<span class="icon globe"></span>{{$item.location_html nofilter}} {{/if}}</div>
</div>
<div class="wall-item-lock-wrapper">
{{if $item.lock}}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="{{$item.lock}}" onclick="lockview(event, 'item', {{$item.id}});" /></div>
{{else}}<div class="wall-item-lock"></div>{{/if}}
{{else}}<div class="wall-item-lock"></div>{{/if}}
</div>
<div class="wall-item-tools" id="wall-item-tools-{{$item.id}}">
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}">
{{if $item.drop && $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>{{/if}}
{{if $item.drop && $item.drop.dropping}}<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.label}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>{{/if}}
</div>
{{if $item.drop && $item.drop.pagedrop}}<input type="checkbox" onclick="checkboxhighlight(this);" title="{{$item.drop.select}}" class="item-select" name="itemselected[]" value="{{$item.id}}" />{{/if}}
<div class="wall-item-delete-end"></div>
@ -39,9 +39,9 @@
<div class="wall-item-author">
<a href="{{$item.profile_url}}" 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>
<div class="wall-item-ago" id="wall-item-ago-{{$item.id}}">{{$item.ago}}</div>
</div>
</div>
</div>
<div class="wall-item-wrapper-end"></div>

View file

@ -136,7 +136,7 @@
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-{{$item.id}}">
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.delete}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon drophide" title="{{$item.drop.label}}" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
{{/if}}
</div>

View file

@ -80,7 +80,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.label}}">{{$item.drop.label}}</a>
{{/if}}
{{if $item.edpost}}
<a class="icon edit s16" href="{{$item.edpost.0}}" title="{{$item.edpost.1}}"></a>

View file

@ -3,12 +3,12 @@
{{else}}
{{if $item.comment_firstcollapsed}}
<div class="hide-comments-outer">
<span id="hide-comments-total-{{$item.id}}"
<span id="hide-comments-total-{{$item.id}}"
class="hide-comments-total">{{$item.num_comments}}</span>
<span id="hide-comments-{{$item.id}}"
class="hide-comments fakelink"
<span id="hide-comments-{{$item.id}}"
class="hide-comments fakelink"
onclick="showHideComments({{$item.id}});">{{$item.hide_text}}</span>
{{if $item.thread_level==3}} -
{{if $item.thread_level==3}} -
<span id="hide-thread-{{$item}}-id"
class="fakelink"
onclick="showThread({{$item.id}});">expand</span> /
@ -32,7 +32,7 @@
<ul role="menu" aria-haspopup="true" class="contact-menu menu-popup" id="wall-item-photo-menu-{{$item.id}}">
{{$item.item_photo_menu_html nofilter}}
</ul>
</div>
<div class="wall-item-location">{{$item.location_html nofilter}}</div>
</div>
@ -44,7 +44,7 @@
<input type="checkbox" title="{{$item.drop.select}}" name="itemselected[]" class="item-select" value="{{$item.id}}" />
{{/if}}
{{if $item.drop && $item.drop.dropping}}
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.delete}}">{{$item.drop.delete}}</a>
<a href="item/drop/{{$item.id}}" onclick="return confirmDelete();" class="icon delete s16" title="{{$item.drop.label}}">{{$item.drop.label}}</a>
{{/if}}
</div>
</div>