Skip to content

Commit

Permalink
contributions: remove link on source title
Browse files Browse the repository at this point in the history
* Removes link on rero id.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
  • Loading branch information
Garfield-fr committed Aug 18, 2021
1 parent d4ba704 commit aeda635
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,23 @@
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<ng-container *ngIf="record$ | async as record">
<ng-container *ngIf="record$ | async as record">
<h1 class="mb-0">{{ record.metadata | extractSourceField : 'authorized_access_point' }}</h1>
<small *ngVar="icon(record.metadata.type) as icon">
<i class="fa {{ icon.class }}" title="{{ icon.title }}" aria-hidden="true"></i>
<i class="fa {{ icon.class }}" title="{{ icon.title }}" aria-hidden="true"></i>
{{ 'MEF ID' | translate }}: {{ record.metadata.pid }}
</small>

<!-- SOURCES -->
<article class="card my-2" *ngFor="let source of record.metadata.sources.sort()">
<a class="card-link" data-toggle="collapse" data-target="#collapse-rero" aria-expanded="true">
<header class="card-header">
<b class="card-title mb-0">
{{ source | translate | uppercase }}
</b>
</header>
</a>
<header class="card-header">
<b class="card-title mb-0">
{{ source | translate | uppercase }}
</b>
</header>
<article id="contribution-{{ source }}" class="card-body collapse show" [ngSwitch]="record.metadata.type">
<admin-person-detail-view *ngSwitchCase="'bf:Person'" [record]="record.metadata[source]"></admin-person-detail-view>
<admin-corporate-bodies-detail-view *ngSwitchCase="'bf:Organisation'" [record]="record.metadata[source]"></admin-corporate-bodies-detail-view>
<admin-person-detail-view *ngSwitchCase="'bf:Person'" [record]="record.metadata[source]" [source]="source"></admin-person-detail-view>
<admin-corporate-bodies-detail-view *ngSwitchCase="'bf:Organisation'" [record]="record.metadata[source]" [source]="source"></admin-corporate-bodies-detail-view>
<span *ngSwitchDefault>Missing contribution type.</span>
</article>
</article>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,20 @@
</ul>
</dd>
</dl>

<!-- ID -->
<dl class="row mb-0" *ngIf="record.identifier">
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate>
Id
</dt>
<dd class="col-sm-7 col-md-8 mb-0">
<ng-container *ngIf="source != 'rero'; else noLink">
<a href="{{ record.identifier }}">
{{ record.pid }}
</a>
</ng-container>
<ng-template #noLink>
{{ record.pid }}
</ng-template>
</dd>
</dl>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ export class CorporateBodiesDetailViewComponent {

/** Record metadata */
@Input() record: any;

/** Record source */
@Input() source: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@
[innerHtml]="record.biographical_information.join('\n') | urlActive | nl2br"
></dd>
</dl>
<!-- PERMALINK -->
<dl class="row mb-0" *ngIf="record.identifier_for_person">
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate>
Id
</dt>
<dd class="col-sm-7 col-md-8 mb-0">
<a href="{{ record.identifier_for_person }}">
{{ record.pid }}
</a>
</dd>
</dl>
<!-- NAME -->
<dl class="row mb-0" *ngIf="record.name">
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate>
Expand Down Expand Up @@ -108,4 +97,20 @@
{{ record.authorized_access_point }}
</dd>
</dl>
<!-- ID -->
<dl class="row mb-0" *ngIf="record.identifier">
<dt class="col-sm-3 offset-sm-2 offset-md-0 label-title" translate>
Id
</dt>
<dd class="col-sm-7 col-md-8 mb-0">
<ng-container *ngIf="source != 'rero'; else noLink">
<a href="{{ record.identifier }}">
{{ record.pid }}
</a>
</ng-container>
<ng-template #noLink>
{{ record.pid }}
</ng-template>
</dd>
</dl>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ export class PersonDetailViewComponent {

/** record metadata */
@Input() record: any;

/** record source */
@Input() source: string;
}

0 comments on commit aeda635

Please sign in to comment.