Projects/nettsiden-old
Projects
/
nettsiden-old
Archived
8
0
Fork 0

Merge pull request #17 from Programvareverkstedet/AddDriftkveld

Added biweekly driftkveld
This commit is contained in:
Felix Albrigtsen 2022-01-29 19:33:54 +01:00 committed by GitHub
commit 500ea63c77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 7 deletions

2
dev.sh
View File

@ -17,7 +17,7 @@ if test ! -d vendor; then
php composer.phar install || exit $?
cp -v dist/authsources_example.php vendor/simplesamlphp/simplesamlphp/config/authsources.php
cp -v dist/saml20-idp-remote.php vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php
# cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
cp -v vendor/simplesamlphp/simplesamlphp/config-templates/config.php vendor/simplesamlphp/simplesamlphp/config/config.php
sed -e "s/'trusted.url.domains' => array()/'trusted.url.domains' => array('localhost:1080')/g" < vendor/simplesamlphp/simplesamlphp/config-templates/config.php > vendor/simplesamlphp/simplesamlphp/config/config.php
ln -s ../vendor/simplesamlphp/simplesamlphp/www/ www/simplesaml
fi

View File

@ -27,7 +27,7 @@ use \pvv\side\Agenda;
$agenda = new \pvv\side\Agenda([
new \pvv\side\social\NerdepitsaActivity,
// new \pvv\side\social\AnimekveldActivity,
// new \pvv\side\social\DriftkveldActivity,
new \pvv\side\social\DriftkveldActivity,
new \pvv\side\DBActivity($pdo),
]);

View File

@ -11,8 +11,10 @@ class DriftkveldActivity implements Activity {
if ($date->format('H') > 18 || $date->format('H') == 17 && $date->format('i') > 30)
return $this->nextDate($date->add(new DateInterval('P1D'))->setTime(18, 15, 0));
$date = $date->setTime(18, 15, 0);
if ($date->format('N') != 2)
if ($date->format('N') != 6)
return $this->nextDate($date->add(new DateInterval('P1D')));
if ($date->format('W') % 2)
return $this->nextDate($date->add(new DateInterval('P7D')));
return $date;
}
@ -20,8 +22,10 @@ class DriftkveldActivity implements Activity {
if ($date->format('H') < 17 || $date->format('H') == 18 && $date->format('i') < 30)
return $this->prevDate($date->sub(new DateInterval('P1D'))->setTime(18, 15, 0));
$date = $date->setTime(18, 15, 0);
if ($date->format('N') != 2)
if ($date->format('N') != 6)
return $this->prevDate($date->sub(new DateInterval('P1D')));
if ($date->format('W') % 2)
return $this->prevDate($date->sub(new DateInterval('P7D')));
return $date;
}

View File

@ -24,7 +24,7 @@ class DriftkveldEvent extends Event {
}
public function getURL() /* : string */ {
return '/drift/';
return '/driftkveld/';
}
public function getImageURL() {
@ -37,7 +37,7 @@ class DriftkveldEvent extends Event {
'Vil du være kul kis TM?',
'Kom på driftkveld!',
'',
'Vi møtes en gang i uka for å ta unna driftarbeid og drikke kaffe.',
'Vi møtes annenhver uke for å ta unna driftarbeid og drikke kaffe.',
'Alle PVVere er velkommene, enten de er erfarne driftere eller helt utenforstående!'
];
}

View File

@ -14,7 +14,7 @@ use \pvv\side\Agenda;
<meta name="theme-color" content="#024" />
<title>Drifterverkstedet</title>
<header>Sosial&shy;verk&shy;stedet</header>
<header>Drift&shy;verk&shy;stedet</header>
<main>