"Actions" drop down options do not give context to the user (#6301)
This commit is contained in:
@@ -15,7 +15,14 @@
|
||||
<umb-dropdown-item class="umb-action" ng-class="{'sep':action.separatorm, '-opens-dialog': action.opensDialog}" ng-repeat="action in actions">
|
||||
<button type="button" ng-click="executeMenuItem(action)">
|
||||
<i class="icon icon-{{action.cssclass}}" aria-hidden="true"></i>
|
||||
<span class="menu-label">{{action.name}}</span>
|
||||
<!-- Render the text that will be visually displayed -->
|
||||
<span class="menu-label" aria-hidden="true">{{action.name}}</span>
|
||||
<!-- Render the textDescription from the language files if it's attached to the action object-->
|
||||
<span class="sr-only" ng-if="action.textDescription">
|
||||
<localize key="visuallyHiddenTexts_{{action.alias}}Description" tokens="[currentNode.name]"></localize>
|
||||
</span>
|
||||
<!-- Otherwise render a combination of the nodename and the currentNode name-->
|
||||
<span class="sr-only" ng-if="!action.textDescription">{{action.name}} {{currentNode.name}}</span>
|
||||
</button>
|
||||
</umb-dropdown-item>
|
||||
</umb-dropdown>
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
<key alias="routeErrorCannotRoute">Dette dokument er udgivet, men dets URL kan ikke dirigeres</key>
|
||||
<key alias="publish">Udgiv</key>
|
||||
<key alias="published">Udgivet</key>
|
||||
<key alias="publishedPendingChanges">Udgivet (Afventende ændringer)</key>
|
||||
<key alias="publishedPendingChanges">Udgivet (Ventede ændringer)</key>
|
||||
<key alias="publishStatus">Udgivelsesstatus</key>
|
||||
<key alias="publishDescendantsHelp"><![CDATA[Klik <em>Udgiv med undersider</em> for at udgive <strong>%0%</strong> og alle sider under og dermed gøre deres indhold offentligt tilgængelige.]]></key>
|
||||
<key alias="publishDescendantsWithVariantsHelp"><![CDATA[Klik <em>Udgiv med undersider</em> for at udgive <strong>de valgte sprog</strong> og de samme sprog for sider under og dermed gøre deres indhold offentligt tilgængelige.]]></key>
|
||||
@@ -426,6 +426,7 @@
|
||||
<key alias="linkinternal">Internt link:</key>
|
||||
<key alias="linklocaltip">Ved lokalt link, indsæt da en "#" foran linket</key>
|
||||
<key alias="linknewwindow">Åben i nyt vindue?</key>
|
||||
<key alias="macroContainerSettings">Makroindstillinger</key>
|
||||
<key alias="macroDoesNotHaveProperties">Denne makro har ingen egenskaber du kan redigere</key>
|
||||
<key alias="paste">Indsæt tekst</key>
|
||||
<key alias="permissionsEdit">Rediger rettigheder for</key>
|
||||
@@ -663,6 +664,7 @@
|
||||
<key alias="icon">Ikon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Importer</key>
|
||||
<key alias="includeFromsubFolders">Inkludér undermapper i søgning</key>
|
||||
<key alias="excludeFromSubFolders">Søg kun i denne mappe</key>
|
||||
<key alias="info">Info</key>
|
||||
<key alias="innerMargin">Indre margen</key>
|
||||
@@ -1749,6 +1751,12 @@ Mange hilsner fra Umbraco robotten
|
||||
<key alias="openBackofficeSearch">Åben backoffice søgning</key>
|
||||
<key alias="openCloseBackofficeHelp">Åben/Luk backoffice hjælp</key>
|
||||
<key alias="openCloseBackofficeProfileOptions">Åben/Luk dine profil indstillinger</key>
|
||||
<key alias="assignDomainDescription">Tilføj domæne på %0%</key>
|
||||
<key alias="createDescription">Opret ny node under %0%</key>
|
||||
<key alias="protectDescription">Opsæt offentlig adgang på %0%</key>
|
||||
<key alias="rightsDescription">Opsæt rettigheder på %0%</key>
|
||||
<key alias="sortDescription">Juster soterings rækkefølgen for %0%</key>
|
||||
<key alias="createblueprintDescription">Opret indholds skabelon baseret på %0%</key>
|
||||
<key alias="currentLanguage">Aktivt sprog</key>
|
||||
<key alias="switchLanguage">Skift sprog til</key>
|
||||
<key alias="createNewFolder">Opret ny mappe</key>
|
||||
|
||||
@@ -141,6 +141,7 @@
|
||||
<key alias="saveToPublish">Save and send for approval</key>
|
||||
<key alias="saveListView">Save list view</key>
|
||||
<key alias="schedulePublish">Schedule</key>
|
||||
<key alias="showPage">Preview</key>
|
||||
<key alias="saveAndPreview">Save and preview</key>
|
||||
<key alias="showPageDisabled">Preview is disabled because there's no template assigned</key>
|
||||
<key alias="styleChoose">Choose style</key>
|
||||
@@ -686,6 +687,7 @@
|
||||
<key alias="icon">Icon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Import</key>
|
||||
<key alias="includeFromsubFolders">Include subfolders in search</key>
|
||||
<key alias="excludeFromSubFolders">Search only this folder</key>
|
||||
<key alias="info">Info</key>
|
||||
<key alias="innerMargin">Inner margin</key>
|
||||
@@ -2228,6 +2230,12 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="openBackofficeSearch">Open backoffice search</key>
|
||||
<key alias="openCloseBackofficeHelp">Open/Close backoffice help</key>
|
||||
<key alias="openCloseBackofficeProfileOptions">Open/Close your profile options</key>
|
||||
<key alias="assignDomainDescription">Setup Culture and Hostnames for %0%</key>
|
||||
<key alias="createDescription">Create new node under %0%</key>
|
||||
<key alias="protectDescription">Setup Public access on %0%</key>
|
||||
<key alias="rightsDescription">Setup Permissions on %0%</key>
|
||||
<key alias="sortDescription">Change sort order for %0%</key>
|
||||
<key alias="createblueprintDescription">Create Content Template based on %0%</key>
|
||||
<key alias="openContextMenu">Open context menu for</key>
|
||||
<key alias="currentLanguage">Current language</key>
|
||||
<key alias="switchLanguage">Switch language to</key>
|
||||
@@ -2243,7 +2251,7 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="create">Create</key>
|
||||
<key alias="edit">Edit</key>
|
||||
<key alias="name">Name</key>
|
||||
<key alias="addNewRow">Add new row</key>
|
||||
<key alias="addNewRow">Add new row</key>
|
||||
<key alias="tabExpand">View more options</key>
|
||||
</area>
|
||||
<area alias="references">
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
<key alias="saveToPublish">Send for approval</key>
|
||||
<key alias="saveListView">Save list view</key>
|
||||
<key alias="schedulePublish">Schedule</key>
|
||||
<key alias="showPage">Preview</key>
|
||||
<key alias="saveAndPreview">Save and preview</key>
|
||||
<key alias="showPageDisabled">Preview is disabled because there's no template assigned</key>
|
||||
<key alias="styleChoose">Choose style</key>
|
||||
@@ -369,7 +370,8 @@
|
||||
<key alias="noDocumentTypesAllowedAtRoot"><![CDATA[There are no allowed document types available for creating content here. You must enable these in <strong>Document Types</strong> within the <strong>Settings</strong> section, by changing the <strong>Allow as root</strong> option under <strong>Permissions</strong>.]]></key>
|
||||
<key alias="noMediaTypes" version="7.0"><![CDATA[There are no allowed media types available for creating media here. You must enable these in <strong>Media Types Types</strong> within the <strong>Settings</strong> section, by editing the <strong>Allowed child node types</strong> under <strong>Permissions</strong>.]]></key>
|
||||
<key alias="noMediaTypesWithNoSettingsAccess">The selected media in the tree doesn't allow for any other media to be created below it.</key>
|
||||
<key alias="noMediaTypesEditPermissions">Edit permissions for this media type</key> <key alias="documentTypeWithoutTemplate">Document Type without a template</key>
|
||||
<key alias="noMediaTypesEditPermissions">Edit permissions for this media type</key>
|
||||
<key alias="documentTypeWithoutTemplate">Document Type without a template</key>
|
||||
<key alias="newFolder">New folder</key>
|
||||
<key alias="newDataType">New data type</key>
|
||||
<key alias="newJavascriptFile">New JavaScript file</key>
|
||||
@@ -570,6 +572,9 @@
|
||||
<key alias="anchor">#value or ?key=value</key>
|
||||
<key alias="enterAlias">Enter alias...</key>
|
||||
<key alias="generatingAlias">Generating alias...</key>
|
||||
<key alias="a11yCreateItem">Create item</key>
|
||||
<key alias="a11yEdit">Edit</key>
|
||||
<key alias="a11yName">Name</key>
|
||||
</area>
|
||||
<area alias="editcontenttype">
|
||||
<key alias="createListView" version="7.2">Create custom list view</key>
|
||||
@@ -690,6 +695,7 @@
|
||||
<key alias="icon">Icon</key>
|
||||
<key alias="id">Id</key>
|
||||
<key alias="import">Import</key>
|
||||
<key alias="includeFromsubFolders">Include subfolders in search</key>
|
||||
<key alias="excludeFromSubFolders">Search only this folder</key>
|
||||
<key alias="info">Info</key>
|
||||
<key alias="innerMargin">Inner margin</key>
|
||||
@@ -2244,6 +2250,12 @@ To manage your website, simply open the Umbraco back office and start adding con
|
||||
<key alias="openBackofficeSearch">Open backoffice search</key>
|
||||
<key alias="openCloseBackofficeHelp">Open/Close backoffice help</key>
|
||||
<key alias="openCloseBackofficeProfileOptions">Open/Close your profile options</key>
|
||||
<key alias="assignDomainDescription">Setup Culture and Hostnames for %0%</key>
|
||||
<key alias="createDescription">Create new node under %0%</key>
|
||||
<key alias="protectDescription">Setup Public access on %0%</key>
|
||||
<key alias="rightsDescription">Setup Permissions on %0%</key>
|
||||
<key alias="sortDescription">Change sort order for %0%</key>
|
||||
<key alias="createblueprintDescription">Create Content Template based on %0%</key>
|
||||
<key alias="openContextMenu">Open context menu for</key>
|
||||
<key alias="currentLanguage">Current language</key>
|
||||
<key alias="switchLanguage">Switch language to</key>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
using System.Threading;
|
||||
|
||||
namespace Umbraco.Web.Models.Trees
|
||||
{
|
||||
@@ -28,12 +29,15 @@ namespace Umbraco.Web.Models.Trees
|
||||
Name = name;
|
||||
}
|
||||
|
||||
|
||||
public MenuItem(string alias, ILocalizedTextService textService)
|
||||
: this()
|
||||
{
|
||||
var values = textService.GetAllStoredValues(Thread.CurrentThread.CurrentUICulture);
|
||||
values.TryGetValue($"visuallyHiddenTexts/{alias}_description", out var textDescription);
|
||||
|
||||
Alias = alias;
|
||||
Name = textService.Localize($"actions/{Alias}");
|
||||
TextDescription = textDescription;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -74,6 +78,9 @@ namespace Umbraco.Web.Models.Trees
|
||||
[Required]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[DataMember(Name = "textDescription")]
|
||||
public string TextDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ensures a menu separator will exist before this menu item
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Actions;
|
||||
@@ -75,7 +76,7 @@ namespace Umbraco.Web.Models.Trees
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
internal MenuItem CreateMenuItem<T>(string name, bool hasSeparator = false, bool opensDialog = false)
|
||||
where T : IAction
|
||||
{
|
||||
@@ -96,14 +97,18 @@ namespace Umbraco.Web.Models.Trees
|
||||
var item = Current.Actions.GetAction<T>();
|
||||
if (item == null) return null;
|
||||
|
||||
var values = textService.GetAllStoredValues(Thread.CurrentThread.CurrentUICulture);
|
||||
values.TryGetValue($"visuallyHiddenTexts/{item.Alias}Description", out var textDescription);
|
||||
|
||||
var menuItem = new MenuItem(item, textService.Localize($"actions/{item.Alias}"))
|
||||
{
|
||||
SeparatorBefore = hasSeparator,
|
||||
OpensDialog = opensDialog
|
||||
OpensDialog = opensDialog,
|
||||
TextDescription = textDescription,
|
||||
};
|
||||
|
||||
return menuItem;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace Umbraco.Web.Trees
|
||||
private void AddActionNode<TAction>(IUmbracoEntity item, MenuItemCollection menu, bool hasSeparator = false, bool opensDialog = false)
|
||||
where TAction : IAction
|
||||
{
|
||||
var menuItem = menu.Items.Add<TAction>(Services.TextService.Localize("actions", _actions.GetAction<TAction>().Alias), hasSeparator, opensDialog);
|
||||
var menuItem = menu.Items.Add<TAction>(Services.TextService, hasSeparator, opensDialog);
|
||||
}
|
||||
|
||||
public IEnumerable<SearchResultEntity> Search(string query, int pageSize, long pageIndex, out long totalFound, string searchFrom = null)
|
||||
|
||||
Reference in New Issue
Block a user