forked from mozfr/transvision
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mozfr#604, adding two links for an API always working
- Loading branch information
Showing
3 changed files
with
50 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
<?php | ||
if ($controller == "mainsearch") { | ||
?> | ||
<p class="api_link"> | ||
<span>API</span>These results are also available as an API request for the <a href="<?=\Transvision\Utils::redirectToAPI()?>"><?=$requested_sourcelocale?> locale</a> or the <a href="<?=\Transvision\Utils::redirectToAPI(true)?>"><?=$requested_locale?> locale</a>.<br> | ||
<a href="https://github.com/mozfr/transvision/wiki/JSON-API">Learn more about the Transvision API</a>. | ||
</p> | ||
<?php | ||
|
||
} else { | ||
?> | ||
<p class="api_link"> | ||
<span>API</span>These results are also available as an <a href="<?=\Transvision\Utils::redirectToAPI()?>">API request</a>.<br> | ||
<a href="https://github.com/mozfr/transvision/wiki/JSON-API">Learn more about Transvision API</a>. | ||
<a href="https://github.com/mozfr/transvision/wiki/JSON-API">Learn more about the Transvision API</a>. | ||
</p> | ||
<?php | ||
|
||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters