Implement non-admin user pdf download

This commit is contained in:
Unknown 2018-05-14 00:57:57 +02:00
parent 9dea19b9b1
commit 24b0bb3798
2 changed files with 42 additions and 14 deletions

View File

@ -9,6 +9,7 @@
<title>PTUT web title</title> <title>PTUT web title</title>
<?php if(in_array('cas_admin', $_SESSION['AUTH'])) { ?>
<!-- Icon --> <!-- Icon -->
<link rel='shortcut icon' href='/favicon.ico'> <link rel='shortcut icon' href='/favicon.ico'>
@ -46,4 +47,23 @@
<!-- Main loop --> <!-- Main loop -->
<script type='text/javascript' src='/js/bundle@home.js' onload="document.body.className=''"></script> <script type='text/javascript' src='/js/bundle@home.js' onload="document.body.className=''"></script>
</body> </body>
<?php }else{?>
<link rel='stylesheet' type='text/css' href='/css/layout.css'>
</head>
<body>
<div id="WRAPPER" class='login'>
<div id='LOGIN_REDIRECT'>
<div class='icon'></div>
<div class='title'><b>P</b><i>lateforme</i> <b>A</b><i>ssistée de</i> <b>T</b><i>raitement</i> <b>A</b><i>dministratif des</i> <b>T</b><i>aches d'</i><b>E</b><i>nseignement</i></div>
<a href="/api/v/1.0/professor/pdf/<?php echo $_SESSION['CAS']["id"]; ?>" class="downloadButton">Télécharger ma fiche</a>
</div>
</div>
</body>
<?php } ?>
</html> </html>

View File

@ -281,5 +281,13 @@ body.body404{
} }
.downloadButton{
text-decoration: none;
color: #3f4a5e;
box-shadow: 0px 0px 1px 1px #7f8d9b;
background: whitesmoke;
padding: 10px;
border-radius: 2px;
}