a bit of cleaning for reading

This commit is contained in:
Grummfy 2014-07-20 16:47:02 +02:00
parent 035dfbeed8
commit 785cf75d60

View file

@ -144,31 +144,39 @@ $formats = Format::searchInformation();
<h1>RSS-Bridge</h1> <h1>RSS-Bridge</h1>
<h2>·Reconnecting the Web·</h2> <h2>·Reconnecting the Web·</h2>
</header> </header>
<?php
<?php $bridgecount = 0; foreach($bridges as $bridgeReference => $bridgeInformations): ?> $bridgecount = 0;
<?php if(BridgeWhitelist($whitelist_selection, $bridgeReference)) { ?> foreach($bridges as $bridgeReference => $bridgeInformations):
<section id="bridge-<?php echo $bridgeReference ?>" data-ref="<?php echo $bridgeReference ?>"> ?>
<h2><?php echo isset($bridgeInformations['homepage']) ? '<a href="'.$bridgeInformations['homepage'].'">'.$bridgeInformations['name'].'</a>' : $bridgeInformations['name'] ?></h2> <?php if(BridgeWhitelist($whitelist_selection, $bridgeReference)): ?>
<section id="bridge-<?= $bridgeReference ?>" data-ref="<?= $bridgeReference ?>">
<h2><?= isset($bridgeInformations['homepage']) ? '<a href="'.$bridgeInformations['homepage'].'">'.$bridgeInformations['name'].'</a>' : $bridgeInformations['name'] ?></h2>
<p class="description"> <p class="description">
<?php echo isset($bridgeInformations['description']) ? $bridgeInformations['description'] : 'No description provided' ?> <?= isset($bridgeInformations['description']) ? $bridgeInformations['description'] : 'No description provided' ?>
</p> </p>
<?php if( isset($bridgeInformations['use']) && count($bridgeInformations['use']) > 0 ): ?> <?php if( isset($bridgeInformations['use']) && count($bridgeInformations['use']) > 0 ): ?>
<ol class="list-use"> <ol class="list-use">
<?php foreach($bridgeInformations['use'] as $anUseNum => $anUse): ?> <?php foreach($bridgeInformations['use'] as $anUseNum => $anUse): ?>
<li data-use="<?php echo $anUseNum ?>"> <li data-use="<?= $anUseNum ?>">
<form method="GET" action="?"> <form method="GET" action="?">
<input type="hidden" name="action" value="display" /> <input type="hidden" name="action" value="display" />
<input type="hidden" name="bridge" value="<?php echo $bridgeReference ?>" /> <input type="hidden" name="bridge" value="<?= $bridgeReference ?>" />
<?php foreach($anUse as $argName => $argDescription): ?>
<?php <?php
foreach($anUse as $argName => $argDescription)
{
$idArg = 'arg-' . $bridgeReference . '-' . $anUseNum . '-' . $argName; $idArg = 'arg-' . $bridgeReference . '-' . $anUseNum . '-' . $argName;
echo '<input id="', $idArg, '" type="text" value="" placeholder="', $argDescription, '" name="', $argName, '" />'
}
foreach( $formats as $name => $infos )
{
if ( isset($infos['name']) )
{
echo getHelperButtonFormat($name, $infos['name']);
}
}
?> ?>
<input id="<?php echo $idArg ?>" type="text" value="" placeholder="<?php echo $argDescription; ?>" name="<?php echo $argName ?>" />
<?php endforeach; ?>
<?php foreach( $formats as $name => $infos ): ?>
<?php if( isset($infos['name']) ){ echo getHelperButtonFormat($name, $infos['name']); } ?>
<?php endforeach; ?>
</form> </form>
</li> </li>
<?php endforeach; ?> <?php endforeach; ?>
@ -176,17 +184,26 @@ $formats = Format::searchInformation();
<?php else: ?> <?php else: ?>
<form method="GET" action="?"> <form method="GET" action="?">
<input type="hidden" name="action" value="display" /> <input type="hidden" name="action" value="display" />
<input type="hidden" name="bridge" value="<?php echo $bridgeReference ?>" /> <input type="hidden" name="bridge" value="<?= $bridgeReference ?>" />
<?php foreach( $formats as $name => $infos ): ?> <?php
<?php if( isset($infos['name']) ){ echo getHelperButtonFormat($name, $infos['name']); } ?> foreach( $formats as $name => $infos )
<?php endforeach; ?> {
if( isset($infos['name']) )
{
echo getHelperButtonFormat($name, $infos['name']);
}
}
?>
</form> </form>
<?php endif; ?> <?php endif; ?>
<?php echo isset($bridgeInformations['maintainer']) ? '<span class="maintainer">'.$bridgeInformations['maintainer'].'</span>' : '' ?> <?= isset($bridgeInformations['maintainer']) ? '<span class="maintainer">'.$bridgeInformations['maintainer'].'</span>' : '' ?>
</section> </section>
<?php $bridgecount++; } endforeach; ?> <?php
$bridgecount++;
endif;
endforeach; ?>
<footer> <footer>
<?php echo $bridgecount; ?> active bridges<br> <?= $bridgecount; ?> active bridges<br>
<a href="https://github.com/sebsauvage/rss-bridge">RSS-Bridge alpha 0.1 ~ Public Domain</a> <a href="https://github.com/sebsauvage/rss-bridge">RSS-Bridge alpha 0.1 ~ Public Domain</a>
</footer> </footer>
</body> </body>