add data attribution
This commit is contained in:
parent
5ede0da61e
commit
184e230e70
@ -40,6 +40,12 @@ body {
|
|||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attribution {
|
||||||
|
font-size: small;
|
||||||
|
color: $text-muted;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
@extend .flex;
|
@extend .flex;
|
||||||
border-top: 2px solid black;
|
border-top: 2px solid black;
|
||||||
|
@ -37,18 +37,23 @@ class DummyProvider implements Provider
|
|||||||
throw new NotSupportedException();
|
throw new NotSupportedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName()
|
public function getName(): string
|
||||||
{
|
{
|
||||||
return "Dummy data for debugging";
|
return "Dummy data for debugging";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShortName()
|
public function getShortName(): string
|
||||||
{
|
{
|
||||||
return "dummy";
|
return "dummy";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIdentifier()
|
public function getIdentifier(): string
|
||||||
{
|
{
|
||||||
return "dummy";
|
return "dummy";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAttribution(): ?string
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
@ -10,7 +10,8 @@ interface Provider
|
|||||||
public function getMessageRepository(): MessageRepository;
|
public function getMessageRepository(): MessageRepository;
|
||||||
public function getTrackRepository(): TrackRepository;
|
public function getTrackRepository(): TrackRepository;
|
||||||
|
|
||||||
public function getName();
|
public function getName(): string;
|
||||||
public function getShortName();
|
public function getShortName(): string;
|
||||||
public function getIdentifier();
|
public function getIdentifier(): string;
|
||||||
|
public function getAttribution(): ?string;
|
||||||
}
|
}
|
@ -25,21 +25,26 @@ class ZtmGdanskProvider implements Provider
|
|||||||
private $tracks;
|
private $tracks;
|
||||||
private $messages;
|
private $messages;
|
||||||
|
|
||||||
public function getName()
|
public function getName(): string
|
||||||
{
|
{
|
||||||
return 'MZKZG - Trójmiasto';
|
return 'MZKZG - Trójmiasto';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getShortName()
|
public function getShortName(): string
|
||||||
{
|
{
|
||||||
return 'Trójmiasto';
|
return 'Trójmiasto';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getIdentifier()
|
public function getIdentifier(): string
|
||||||
{
|
{
|
||||||
return 'trojmiasto';
|
return 'trojmiasto';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAttribution(): string
|
||||||
|
{
|
||||||
|
return '<a href="http://ztm.gda.pl/otwarty_ztm">Otwarte Dane</a> Zarządu Transportu Miejskiego w Gdańsku';
|
||||||
|
}
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
EntityManagerInterface $em,
|
EntityManagerInterface $em,
|
||||||
GenericLineRepository $lines,
|
GenericLineRepository $lines,
|
||||||
|
@ -29,6 +29,12 @@
|
|||||||
</button>
|
</button>
|
||||||
</h2>
|
</h2>
|
||||||
<departures :stops="stops" ref="departures" @update:state="departures.state = $event"></departures>
|
<departures :stops="stops" ref="departures" @update:state="departures.state = $event"></departures>
|
||||||
|
{% if provider.attribution %}
|
||||||
|
<div class="attribution">
|
||||||
|
<fa :icon="['fal', 'info-circle']"></fa>
|
||||||
|
Pochodzenie danych: {{ provider.attribution|raw }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4 order-md-first">
|
<div class="col-md-4 order-md-first">
|
||||||
|
Loading…
Reference in New Issue
Block a user