Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow view/edit in new tabs from list view #22888

Merged
merged 5 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,18 @@ _%>
</button>
<%_ } _%>
<%_ } _%>
<button type="submit"
[routerLink]="['/<%= entityPage %>', <%= entityInstance %>.<%= primaryKey.name %>, 'view']"
class="btn btn-info btn-sm"
data-cy="entityDetailsButton">
<a [routerLink]="['/<%= entityPage %>', <%= entityInstance %>.<%= primaryKey.name %>, 'view']"
class="btn btn-info btn-sm" data-cy="entityDetailsButton">
<fa-icon icon="eye"></fa-icon>
<span class="d-none d-md-inline" <%= jhiPrefix %>Translate="entity.action.view">__jhiTransformTranslate__('entity.action.view')</span>
</button>
</a>
<%_ if (!readOnly) { _%>

<button type="submit"
[routerLink]="['/<%= entityPage %>', <%= entityInstance %>.<%= primaryKey.name %>, 'edit']"
class="btn btn-primary btn-sm"
data-cy="entityEditButton">
<a [routerLink]="['/<%= entityPage %>', <%= entityInstance %>.<%= primaryKey.name %>, 'edit']"
class="btn btn-primary btn-sm" data-cy="entityEditButton">
<fa-icon icon="pencil-alt"></fa-icon>
<span class="d-none d-md-inline" <%= jhiPrefix %>Translate="entity.action.edit">__jhiTransformTranslate__('entity.action.edit')</span>
</button>
</a>

<button type="submit" (click)="delete(<%= entityInstance %>)"
class="btn btn-danger btn-sm"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ _%>
<Button tag={Link} to={`/<%= entityPage %>/${<%= entityInstance %>.<%= primaryKey.name %>}/edit<%_ if (paginationPagination) { _%>?page=${paginationState.activePage}&sort=${paginationState.sort},${paginationState.order}<%_ } _%>`} color="primary" size="sm" data-cy="entityEditButton">
<FontAwesomeIcon icon="pencil-alt" /> <span className="d-none d-md-inline"><Translate contentKey="entity.action.edit">Edit</Translate></span>
</Button>
<Button tag={Link} to={`/<%= entityPage %>/${<%= entityInstance %>.<%= primaryKey.name %>}/delete<%_ if (paginationPagination) { _%>?page=${paginationState.activePage}&sort=${paginationState.sort},${paginationState.order}<%_ } _%>`} color="danger" size="sm" data-cy="entityDeleteButton">
<Button onClick={() => location.href=`/<%= entityPage %>/${<%= entityInstance %>.<%= primaryKey.name %>}/delete<%_ if (paginationPagination) { _%>?page=${paginationState.activePage}&sort=${paginationState.sort},${paginationState.order}<%_ } _%>`} color="danger" size="sm" data-cy="entityDeleteButton">
<FontAwesomeIcon icon="trash" /> <span className="d-none d-md-inline"><Translate contentKey="entity.action.delete">Delete</Translate></span>
</Button>
<%_ } _%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,30 @@
<%_ } _%>
<td class="text-right">
<div class="btn-group">
<%_ if (authenticationTypeSession) { _%>
<router-link :to="{name: '<%= entityAngularName %>View', params: {<%= entityInstance %>Id: <%= entityInstance %>.id}}" class="btn btn-info btn-sm details" data-cy="entityDetailsButton">
<%_ } else { _%>
<router-link :to="{name: '<%= entityAngularName %>View', params: {<%= entityInstance %>Id: <%= entityInstance %>.id}}" custom v-slot="{ navigate }">
<button @click="navigate" class="btn btn-info btn-sm details" data-cy="entityDetailsButton">
<%_ } _%>
<font-awesome-icon icon="eye"></font-awesome-icon>
<span class="d-none d-md-inline" v-text="t$('entity.action.view')">View</span>
<%_ if (!authenticationTypeSession) { _%>
</button>
<%_ } _%>
</router-link>
<%_ if (!readOnly) { _%>
<%_ if (authenticationTypeSession) { _%>
<router-link :to="{name: '<%= entityAngularName %>Edit', params: {<%= entityInstance %>Id: <%= entityInstance %>.id}}" class="btn btn-primary btn-sm edit" data-cy="entityEditButton">
<%_ } else { _%>
<router-link :to="{name: '<%= entityAngularName %>Edit', params: {<%= entityInstance %>Id: <%= entityInstance %>.id}}" custom v-slot="{ navigate }">
<button @click="navigate" class="btn btn-primary btn-sm edit" data-cy="entityEditButton">
<%_ } _%>
<font-awesome-icon icon="pencil-alt"></font-awesome-icon>
<span class="d-none d-md-inline" v-text="t$('entity.action.edit')">Edit</span>
<%_ if (!authenticationTypeSession) { _%>
</button>
<%_ } _%>
</router-link>
<b-button v-on:click="prepareRemove(<%= entityInstance %>)"
variant="danger"
Expand Down