Skip to content

Commit

Permalink
Issue #414: Change terminology in UI: "Build" -> "Edit"
Browse files Browse the repository at this point in the history
  • Loading branch information
danhgov committed Aug 27, 2024
1 parent 9f24960 commit a991268
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion config/sync/page_manager.page.data_set_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ langcode: en
status: true
dependencies: { }
id: data_set_build
label: 'Data set build'
label: 'Editing data set' # In browser tab.
description: ''
use_admin_theme: false
path: '/node/{node}/build'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ variant_settings:
- ''
html_id: ''
css_styles: ''
page_title: 'Build: [node:title]'
page_title: 'Edit: [node:title]' # In page title on Edit/Build page.
layout: bcbb_bricks
layout_settings: { }
builder: standard
Expand Down
4 changes: 2 additions & 2 deletions config/sync/views.view.dashboard_moderation_blocks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,15 +303,15 @@ display:
exclude: false
alter:
alter_text: true
text: Build
text: Edit # Button on right side of metadata-records list on dashboard.
make_link: true
path: '/node/{{ nid }}/build'
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: 'Build {{ title }}'
alt: 'Edit {{ title }}'
rel: ''
link_class: 'btn btn-primary'
prefix: ''
Expand Down
2 changes: 1 addition & 1 deletion html/modules/custom/bc_dc/bc_dc.links.task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bc_dc.data_set_archive_page:
bc_dc.data_set_build_page_tab:
route_name: bc_dc.data_set_build_page_tab
base_route: entity.node.canonical
title: 'Build'
title: 'Edit' # In localtask tab.

bc_dc.user_reports_tab:
route_name: bc_dc.user_reports_tab
Expand Down
5 changes: 5 additions & 0 deletions html/modules/custom/bc_dc/bc_dc.module
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,11 @@ function bc_dc_menu_local_tasks_alter(array &$data, string $route_name, Refinabl
if (!$user->hasPermission('use The form mode default linked to node entity( data_set )')) {
unset($data['tabs'][0]['entity.node.edit_form']);
}
else {
// We're changing the "Build" tab to be the "Edit" tab.
// So the old drupal "Edit" tab it getting relabeled.
$data['tabs'][0]['entity.node.edit_form']['#link']['title'] = t('Drupal Edit');
}
}

// Rename certain tabs.
Expand Down
6 changes: 3 additions & 3 deletions html/modules/custom/bc_dc/bc_dc.views.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
*/
function bc_dc_views_data_alter(array &$data) {
$data['node']['bc_dc_build'] = [
'title' => t('Build link'),
'title' => t('Edit link'),
'field' => [
'title' => t('Build'),
'help' => t('Links to Build page.'),
'title' => t('Edit'),
'help' => t('Links to Edit page (previously known as "Build page").'),
'id' => 'bc_dc_build',
],
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static function buildContent(?NodeInterface $node, string $form_mode, Ent
'destination' => $redirectDestination->get(),
],
];
$links[] = Link::createFromRoute(t('Edit'), 'entity.node.edit_form', $route_parameters, $link_options);
$links[] = Link::createFromRoute(t('Modify') /*The blue buttons on the Build page */, 'entity.node.edit_form', $route_parameters, $link_options);

// Remove links with no access.
foreach ($links as $key => $link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class BcDcBuild extends BcDcButtonBase {
*/
protected function buttonConfig(): array {
return [
'text' => $this->t('Build'),
// This shows up in the 'Operations' section of the 'user/123/manage' screen.
'text' => $this->t('Edit'),
'class' => 'btn-primary',
'route' => 'bc_dc.data_set_build_page_tab',
];
Expand Down

0 comments on commit a991268

Please sign in to comment.