Unverified Commit 897b8869 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

backend selection: add homepage links

parent e2b53658
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1010,11 +1010,14 @@ sub backend_form {
		if ( $backend->{iris} ) {
			$type                = 'IRIS-TTS';
			$backend->{name}     = 'DB';
			$backend->{longname} = 'Deutsche Bahn';
			$backend->{homepage} = 'https://www.bahn.de';
		}
		elsif ( $backend->{hafas} ) {
			if ( my $s = $self->hafas->get_service( $backend->{name} ) ) {
				$type                = 'HAFAS';
				$backend->{longname} = $s->{name};
				$backend->{homepage} = $s->{homepage};
			}
			else {
				$type = undef;
+7 −7
Original line number Diff line number Diff line
@@ -16,19 +16,19 @@
	% }
	% for my $backend (@{ stash('backends') // [] }) {
		<div class="row">
			<div class="col s12 m4 l4 center-align">
				<button class="btn waves-effect waves-light <%= $backend->{id} == $user->{backend_id} ? 'disabled' : q{} %>" type="submit" name="backend" value="<%= $backend->{id} %>">
					<%= $backend->{name} %> (<%= $backend->{type} %>)
				</button>
			</div>
			<div class="col s12 m8 l8">
			<div class="col s8 m6 l6 right-align">
				% if ($backend->{longname}) {
					<%= $backend->{longname} %>
					<a href="<%= $backend->{homepage} %>"><%= $backend->{longname} %></a>
				% }
				% if ($backend->{id} == $user->{backend_id}) {
					(aktuell ausgewählt)
				% }
			</div>
			<div class="col s4 m6 l6 left-align">
				<button class="btn waves-effect waves-light <%= $backend->{id} == $user->{backend_id} ? 'disabled' : q{} %>" type="submit" name="backend" value="<%= $backend->{id} %>">
					<%= $backend->{name} %> (<%= $backend->{type} %>)
				</button>
			</div>
		</div>
	% }
%= end