From 34668cb0ea998b62a859c09ee4ab2485fd3a7927 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 9 Aug 2018 00:44:55 +0200 Subject: [PATCH] Make it possible to view projects in more detail --- www/css/projects.css | 6 ++++++ www/prosjekt/index.php | 4 ++-- www/prosjekt/info.php | 36 ++++++++++++++++++++++++++++++++---- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/www/css/projects.css b/www/css/projects.css index db2631b..f7a7ddd 100644 --- a/www/css/projects.css +++ b/www/css/projects.css @@ -1,3 +1,9 @@ +a.nostyle { + text-decoration: none; + color:inherit; + cursor: pointer; +} + .project-card { position: relative; box-sizing: border-box; diff --git a/www/prosjekt/index.php b/www/prosjekt/index.php index e177f42..f4a922a 100644 --- a/www/prosjekt/index.php +++ b/www/prosjekt/index.php @@ -90,13 +90,13 @@ $projects = $projectManager->getAll(); $owner = $projectManager->getProjectOwner($project->getID()); ?> -
+

getName(); ?>

',array_slice($project->getDescription(), 0, 2)); ?>

Organisert av

-
+
diff --git a/www/prosjekt/info.php b/www/prosjekt/info.php index cda28ad..ae5f37a 100644 --- a/www/prosjekt/info.php +++ b/www/prosjekt/info.php @@ -9,12 +9,32 @@ if(isset($_GET['id'])){ exit(); } +require_once(__DIR__ . '/../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); +$as = new SimpleSAML_Auth_Simple('default-sp'); +$attrs = $as->getAttributes(); + $projectManager = new \pvv\side\ProjectManager($pdo); $project = $projectManager->getByID($projectID); $members = $projectManager->getProjectMembers($projectID); +$is_owner = False; +$is_member = False; +if ($attrs){ + $uname = $attrs['uid'][0]; + foreach($members as $member){ + if ($member['uname'] == $uname){ + if ($member['owner']==1){ + $is_owner = True; + } + else if ($member['owner']==0){ + $is_member = True; + } + } + } +} ?> - + + @@ -37,7 +57,7 @@ $members = $projectManager->getProjectMembers($projectID);
-

Prosjektledelse

+

Prosjektledelsen

$data){ if($data['lead']){ @@ -56,13 +76,21 @@ $members = $projectManager->getProjectMembers($projectID); $data){ if($data['lead']){ continue; } ?> -
+

+

+

+ + + + + +

- \ No newline at end of file +