Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
3645d1ad
Commit
3645d1ad
authored
Oct 18, 2019
by
FORESTIER Fabien
Committed by
ncastejon
Oct 31, 2019
Browse files
Prevent error when a credit doesn't have a link
parent
6de6f672
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/editorialisation/components/credits/credits.component.html
View file @
3645d1ad
...
...
@@ -11,7 +11,7 @@
<div
class=
"credit"
>
<div
class=
"logo-content"
>
<a
[href]=
"credit.links[0].url"
target=
"_blank"
*ngIf=
"credit.links[0]; else withoutLink"
>
<a
[href]=
"credit.links[0].url"
target=
"_blank"
*ngIf=
"credit.links
&& credit.links
[0]; else withoutLink"
>
<img
[src]=
"credit.logo"
[alt]=
"credit.name"
>
</a>
<ng-template
#withoutLink
>
...
...
@@ -22,7 +22,8 @@
<p>
{{credit.description}}
</p>
<div
class=
"bottom-section"
>
<a
[href]=
"credit.links[0].url"
i18n=
"@@credits.visitWebsite"
>
Visit the website
</a>
<a
*ngIf=
"credit.links && credit.links[0]"
[href]=
"credit.links[0].url"
i18n=
"@@credits.visitWebsite"
>
Visit
the website
</a>
</div>
</div>
</div>
...
...
src/app/editorialisation/components/credits/credits.component.ts
View file @
3645d1ad
import
{
Component
,
OnInit
}
from
'
@angular/core
'
;
import
{
OrganizationsService
}
from
'
../../services/organizations.service
'
;
import
{
Organization
,
Credit
}
from
'
../../models
'
;
import
{
ElasticsearchService
,
DatasetResearchService
}
from
'
../../../geosource/services
'
;
import
{
Router
}
from
'
@angular/router
'
;
import
{
Credit
}
from
'
../../models
'
;
import
{
AppRoutes
}
from
'
../../../routes
'
;
import
{
Aggregation
}
from
'
../../../geosource/models/filter.model
'
;
import
{
scopesResearch
}
from
'
../../../geosource/models/scopes-research
'
;
import
{
IPageHeaderInfo
}
from
'
../../../shared/models
'
;
import
{
pageTitles
,
notificationMessages
}
from
'
../../../../i18n/traductions
'
;
import
{
NotificationService
}
from
'
../../../core/services
'
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment