Skip to content
Snippets Groups Projects
Commit d6fab988 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Move assets to assets-dir + PSR-2

parent d65cbb88
No related branches found
No related tags found
No related merge requests found
Showing
with 49 additions and 62 deletions
...@@ -10,12 +10,11 @@ $(document).ready(function() { ...@@ -10,12 +10,11 @@ $(document).ready(function() {
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
echo '<h1>OAuth Client</h1>';
echo('<h1>OAuth Client</h1>'); echo $this->data['form'];
echo($this->data['form']); echo '<p style="float: right"><a href="registry.php">Return to entity listing <strong>without saving...</strong></a></p>';
echo('<p style="float: right"><a href="registry.php">Return to entity listing <strong>without saving...</strong></a></p>');
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
...@@ -2,21 +2,11 @@ ...@@ -2,21 +2,11 @@
{% extends "base.twig" %} {% extends "base.twig" %}
{% block preload %} {% block preload %}
<link href="{{ baseurlpath }}resources/style.css" rel="stylesheet" /> <link href="{{ baseurlpath }}assets/css/oauth.css" rel="stylesheet">
{% endblock %} {% endblock %}
{% block postload %} {% block postload %}
<script type="text/javascript"> <script src="{{ baseurlpath}}assets/js/oauth.js"></script>
$(document).ready(function() {
$("#tabdiv").tabs();
$('ul.tabset_tabs li').click(
function() {
$("html, body").animate({ scrollTop: 0 }, "slow");
}
)
});
</script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
<?php <?php
$this->data['jquery'] = array('core' => TRUE, 'ui' => TRUE, 'css' => TRUE); $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true);
$this->data['head'] = '<link rel="stylesheet" type="text/css" href="/' . $this->data['baseurlpath'] . 'module.php/oauth/resources/style.css" />' . "\n"; $this->data['head'] = '<link rel="stylesheet" type="text/css" href="/'.$this->data['baseurlpath'].'module.php/oauth/assets/oauth.css" />'."\n";
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
echo '<h1>OAuth Client Registry</h1>';
echo('<h1>OAuth Client Registry</h1>'); echo '<p>Here you can register new OAuth Clients. You are successfully logged in as '.htmlspecialchars($this->data['userid']).'</p>';
echo('<p>Here you can register new OAuth Clients. You are successfully logged in as ' . htmlspecialchars($this->data['userid']) . '</p>'); echo '<h2>Your clients</h2>';
echo '<table class="metalist" style="width: 100%">';
echo('<h2>Your clients</h2>'); $i = 0;
echo('<table class="metalist" style="width: 100%">'); $rows = array('odd', 'even');
$i = 0; $rows = array('odd', 'even'); foreach ($this->data['entries']['mine'] as $entryc) {
foreach($this->data['entries']['mine'] AS $entryc ) { $entry = $entryc['value'];
$entry = $entryc['value']; $i++;
$i++; echo '<tr class="'.$rows[$i % 2].'"><td>'.
echo('<tr class="' . $rows[$i % 2] . '"> htmlspecialchars($entry['name']).'</td> <td><tt>'.htmlspecialchars($entry['key']).
<td>' . htmlspecialchars($entry['name']) . '</td> '</tt></td><td><a href="registry.edit.php?editkey='.urlencode($entry['key']).
<td><tt>' . htmlspecialchars($entry['key']) . '</tt></td> '">edit</a><a href="registry.php?delete='.urlencode($entry['key']).'">delete</a></td></tr>';
<td>
<a href="registry.edit.php?editkey=' . urlencode($entry['key']) . '">edit</a>
<a href="registry.php?delete=' . urlencode($entry['key']) . '">delete</a>
</td></tr>');
} }
if ($i == 0) { if ($i == 0) {
echo('<tr><td colspan="3">No entries registered</td></tr>'); echo'<tr><td colspan="3">No entries registered</td></tr>';
} }
echo('</table>'); echo '</table>';
echo('<p><a href="registry.edit.php">Add new client</a></p>'); echo '<p><a href="registry.edit.php">Add new client</a></p>';
echo('<h2>Other clients</h2>'); echo '<h2>Other clients</h2>';
echo('<table class="metalist" style="width: 100%">'); echo '<table class="metalist" style="width: 100%">';
$i = 0; $rows = array('odd', 'even'); $i = 0;
foreach($this->data['entries']['others'] AS $entryc ) { $rows = array('odd', 'even');
$entry = $entryc['value']; foreach ($this->data['entries']['others'] as $entryc) {
$i++; $entry = $entryc['value'];
echo('<tr class="' . $rows[$i % 2] . '"> $i++;
<td>' . htmlspecialchars($entry['name']) . '</td> echo '<tr class="'.$rows[$i % 2].'"><td>'.
<td><tt>' . htmlspecialchars($entry['key']) . '</tt></td> htmlspecialchars($entry['name']).'</td><td><tt>'.htmlspecialchars($entry['key']).
<td>' . (isset($entry['owner']) ? htmlspecialchars($entry['owner']) : 'No owner') . ' '</tt></td><td>'.(isset($entry['owner']) ? htmlspecialchars($entry['owner']) : 'No owner').
</td></tr>'); '</td></tr>';
} }
if ($i == 0) { if ($i == 0) {
echo('<tr><td colspan="3">No entries registered</td></tr>'); echo '<tr><td colspan="3">No entries registered</td></tr>';
} }
echo('</table>'); echo '</table>';
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% extends "base.twig" %} {% extends "base.twig" %}
{% block preload %} {% block preload %}
<link href="{{ baseurlpath }}style.css" rel="stylesheet" /> <link href="{{ baseurlpath }}assets/css/oauth.css" rel="stylesheet" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
...@@ -12,4 +12,3 @@ echo('<p><a href="registry.php">Go back to OAuth client listing</a></p>'); ...@@ -12,4 +12,3 @@ echo('<p><a href="registry.php">Go back to OAuth client listing</a></p>');
$this->includeAtTemplateBase('includes/footer.php'); $this->includeAtTemplateBase('includes/footer.php');
document.addEventListener('DOMContentLoaded', function () {
$("#tabdiv").tabs();
});
...@@ -3,8 +3,8 @@ $this->data['header'] = 'SimpleSAMLphp Statistics'; ...@@ -3,8 +3,8 @@ $this->data['header'] = 'SimpleSAMLphp Statistics';
$this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true); $this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true);
$this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/assets/statistics.css") . '" />' . "\n"; $this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/assets/css/statistics.css") . '" />' . "\n";
$this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleURL("statistics/assets/statistics.js") . '"></script>' . "\n"; $this->data['head'] .= '<script type="text/javascript" src="' . SimpleSAML\Module::getModuleURL("statistics/assets/js/statistics.js") . '"></script>' . "\n";
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
{% extends "base.twig" %} {% extends "base.twig" %}
{% block preload %} {% block preload %}
<link href="{{ baseurlpath }}assets/statistics.css" rel="stylesheet" /> <link href="{{ baseurlpath }}assets/css/statistics.css" rel="stylesheet" />
{% endblock %} {% endblock %}
{% block postload %} {% block postload %}
<script type="text/javascript" src="{{ baseurlpath }}assets/statistics.js"></script> <script type="text/javascript" src="{{ baseurlpath }}assets/js/statistics.js"></script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
<?php <?php
$this->data['header'] = 'SimpleSAMLphp Statistics Metadata'; $this->data['header'] = 'SimpleSAMLphp Statistics Metadata';
$this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/style.css") . '" />'; $this->data['head'] = '<link rel="stylesheet" type="text/css" href="' . SimpleSAML\Module::getModuleURL("statistics/assets/css/statistics.css") . '" />';
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
echo '<table id="statmeta">' ; echo '<table id="statmeta">' ;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% extends "base.twig" %} {% extends "base.twig" %}
{% block preload %} {% block preload %}
<link href="{{ baseurlpath }}style.css" rel="stylesheet" /> <link href="{{ baseurlpath }}assets/css/statistics.css" rel="stylesheet" />
{% endblock %} {% endblock %}
{% block content %} {% block content %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment