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,49 +144,66 @@ $formats = Format::searchInformation();
<h1>RSS-Bridge</h1> <h1>RSS-Bridge</h1>
<h2>·Reconnecting the Web·</h2> <h2>·Reconnecting the Web·</h2>
</header> </header>
<?php
$bridgecount = 0;
foreach($bridges as $bridgeReference => $bridgeInformations):
?>
<?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">
<?= isset($bridgeInformations['description']) ? $bridgeInformations['description'] : 'No description provided' ?>
</p>
<?php $bridgecount = 0; foreach($bridges as $bridgeReference => $bridgeInformations): ?> <?php if( isset($bridgeInformations['use']) && count($bridgeInformations['use']) > 0 ): ?>
<?php if(BridgeWhitelist($whitelist_selection, $bridgeReference)) { ?> <ol class="list-use">
<section id="bridge-<?php echo $bridgeReference ?>" data-ref="<?php echo $bridgeReference ?>"> <?php foreach($bridgeInformations['use'] as $anUseNum => $anUse): ?>
<h2><?php echo isset($bridgeInformations['homepage']) ? '<a href="'.$bridgeInformations['homepage'].'">'.$bridgeInformations['name'].'</a>' : $bridgeInformations['name'] ?></h2> <li data-use="<?= $anUseNum ?>">
<p class="description"> <form method="GET" action="?">
<?php echo isset($bridgeInformations['description']) ? $bridgeInformations['description'] : 'No description provided' ?> <input type="hidden" name="action" value="display" />
</p> <input type="hidden" name="bridge" value="<?= $bridgeReference ?>" />
<?php
foreach($anUse as $argName => $argDescription)
{
$idArg = 'arg-' . $bridgeReference . '-' . $anUseNum . '-' . $argName;
echo '<input id="', $idArg, '" type="text" value="" placeholder="', $argDescription, '" name="', $argName, '" />'
}
<?php if( isset($bridgeInformations['use']) && count($bridgeInformations['use']) > 0 ): ?> foreach( $formats as $name => $infos )
<ol class="list-use"> {
<?php foreach($bridgeInformations['use'] as $anUseNum => $anUse): ?> if ( isset($infos['name']) )
<li data-use="<?php echo $anUseNum ?>"> {
<form method="GET" action="?"> echo getHelperButtonFormat($name, $infos['name']);
<input type="hidden" name="action" value="display" /> }
<input type="hidden" name="bridge" value="<?php echo $bridgeReference ?>" /> }
<?php foreach($anUse as $argName => $argDescription): ?> ?>
<?php </form>
$idArg = 'arg-' . $bridgeReference . '-' . $anUseNum . '-' . $argName; </li>
?> <?php endforeach; ?>
<input id="<?php echo $idArg ?>" type="text" value="" placeholder="<?php echo $argDescription; ?>" name="<?php echo $argName ?>" /> </ol>
<?php endforeach; ?> <?php else: ?>
<?php foreach( $formats as $name => $infos ): ?> <form method="GET" action="?">
<?php if( isset($infos['name']) ){ echo getHelperButtonFormat($name, $infos['name']); } ?> <input type="hidden" name="action" value="display" />
<?php endforeach; ?> <input type="hidden" name="bridge" value="<?= $bridgeReference ?>" />
</form> <?php
</li> foreach( $formats as $name => $infos )
<?php endforeach; ?> {
</ol> if( isset($infos['name']) )
<?php else: ?> {
<form method="GET" action="?"> echo getHelperButtonFormat($name, $infos['name']);
<input type="hidden" name="action" value="display" /> }
<input type="hidden" name="bridge" value="<?php echo $bridgeReference ?>" /> }
<?php foreach( $formats as $name => $infos ): ?> ?>
<?php if( isset($infos['name']) ){ echo getHelperButtonFormat($name, $infos['name']); } ?> </form>
<?php endforeach; ?> <?php endif; ?>
</form> <?= isset($bridgeInformations['maintainer']) ? '<span class="maintainer">'.$bridgeInformations['maintainer'].'</span>' : '' ?>
<?php endif; ?> </section>
<?php echo isset($bridgeInformations['maintainer']) ? '<span class="maintainer">'.$bridgeInformations['maintainer'].'</span>' : '' ?> <?php
</section> $bridgecount++;
<?php $bridgecount++; } endforeach; ?> 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>