Skip to content

Commit

Permalink
Merge pull request #22888 from nitram84/view_edit_in_tabs
Browse files Browse the repository at this point in the history
allow view/edit in new tabs from list view
  • Loading branch information
DanielFran authored Oct 28, 2023
2 parents 0def0e9 + 755fd05 commit 98ae48b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
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

0 comments on commit 98ae48b

Please sign in to comment.