Merge pull request #2 from HackspaceJena/master

update
This commit is contained in:
Andi 2014-07-31 20:55:16 +02:00
commit 8a8087b8a3
14 changed files with 93 additions and 42 deletions

View file

@ -15,8 +15,9 @@ Diese Anleitung geht davon aus das du SSH-Zugriff auf deinen Server hast. Wenn d
3. Abhängigkeiten installieren
1. composer herunterladen ```curl -sS https://getcomposer.org/installer | php```
2. Installation ausführen: ```php composer.phar install```
- für PostgreSQL wähl pdo_pgsql als Datenbanktreiber
- für MySQL wähle pdo_mysql als Datenbanktreiber
- für SQLite ist pdo_sqlite zu nutzen, dabei ist der Pfad anzugeben. Der Standardpfad legt die Datei ffcal.sqlite3 im Verzeichnis app an.
- für SQLite ist pdo_sqlite zu nutzen, dabei ist der Pfad anzugeben. Der Standardpfad legt die Datei calcifer.sqlite3 im Verzeichnis app an.
5. Dann die Tabellen erstellen: ```php app/console doctrine:schema:update --force```
6. Cache löschen ```php app/console cache:clear --env=prod --no-debug```
7. Assets dumpen ```php app/console assetic:dump --env=prod --no-debug```

2
app/config/parameters.yml.dist Normal file → Executable file
View file

@ -5,7 +5,7 @@ parameters:
database_name: symfony
database_user: root
database_password: ~
database_path: "%kernel.root_dir%/ffcal.sqlite3"
database_path: "%kernel.root_dir%/calcifer.sqlite3"
mailer_transport: smtp
mailer_host: 127.0.0.1

View file

@ -33,7 +33,7 @@
"incenteev/composer-parameter-handler": "~2.0",
"jquery/jquery": "1.10.*",
"knplabs/knp-markdown-bundle": "~1.3",
"jsvrcek/ics": "dev-master",
"enko/ics": "~0.1",
"doctrine/migrations": "dev-master",
"doctrine/doctrine-migrations-bundle": "dev-master",
"jbroadway/urlify" : "~1.0"

View file

@ -24,7 +24,7 @@ use Jsvrcek\ICS\Model\Relationship\Organizer;
use Jsvrcek\ICS\Utility\Formatter;
use Jsvrcek\ICS\CalendarStream;
use Jsvrcek\ICS\CalendarExport;
use Symfony\Component\Validator\Constraints\DateTime;
use Jsvrcek\ICS\Model\Description\Geo;
/**
* Location controller.
@ -82,6 +82,18 @@ class LocationController extends Controller
if ($entity->enddate instanceof \DateTime)
$event->setEnd($entity->enddate);
$event->setSummary($entity->summary);
$event->setUrl($entity->url);
if ($entity->location instanceof Location) {
$location = new \Jsvrcek\ICS\Model\Description\Location();
$location->setName($entity->location->name);
$event->setLocations([$location]);
if (\is_float($entity->location->lon) && \is_float($entity->location->lat)) {
$geo = new Geo();
$geo->setLatitude($entity->location->lat);
$geo->setLongitude($entity->location->lon);
$event->setGeo($geo);
}
}
$event->setDescription($entity->description);
$location = new \Jsvrcek\ICS\Model\Description\Location();
$location->setName($entity->getLocation()->name);

View file

@ -7,6 +7,7 @@ use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
use Hackspace\Bundle\CalciferBundle\Entity\Location;
use Hackspace\Bundle\CalciferBundle\Entity\Tag;
use Jsvrcek\ICS\Model\Description\Geo;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
@ -79,9 +80,18 @@ class TagController extends Controller
$event->setEnd($entity->enddate);
$event->setSummary($entity->summary);
$event->setDescription($entity->description);
$location = new \Jsvrcek\ICS\Model\Description\Location();
$location->setName($entity->location->name);
$event->setLocations([$location]);
$event->setUrl($entity->url);
if ($entity->location instanceof Location) {
$location = new \Jsvrcek\ICS\Model\Description\Location();
$location->setName($entity->location->name);
$event->setLocations([$location]);
if (\is_float($entity->location->lon) && \is_float($entity->location->lat)) {
$geo = new Geo();
$geo->setLatitude($entity->location->lat);
$geo->setLongitude($entity->location->lon);
$event->setGeo($geo);
}
}
$calendar->addEvent($event);
}

View file

@ -7,6 +7,10 @@ use Doctrine\ORM\Mapping as ORM;
/**
* Location
*
* @property string $name
* @property float $lon
* @property float $lat
*
* @ORM\Table(name="locations")
* @ORM\Entity
*/

View file

@ -0,0 +1,37 @@
body {
margin: 0;
font-family: 'Roboto', sans-serif;
}
header {
top: 0;
}
header .ui.grid > .column, .title.ui.grid > .column {
margin-top: 0;
margin-bottom: 0;
}
.box h2 {
font-size: 1rem !important;
}
a .icon {
text-decoration: none;
}
a, a:hover, a:visited {
color: #000000;
}
a:hover {
text-decoration: none;
}
#mission-statement {
overflow: hidden;
img {
margin-bottom: 0;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

View file

@ -5,9 +5,14 @@
<title>{% block title %}Terminverwaltung Calcifer{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="{{ asset('css/semantic.css') }}" rel="stylesheet" media="screen">
<link href='//fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<link href="{{ asset('css/custom.css') }}" rel="stylesheet" media="screen">
{% stylesheets filter="compass"
"@CalciferBundle/Resources/assets/css/main.scss"
"css/semantic.scss"
"css/custom.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" media="screen" />
{% endstylesheets %}
{% block css %}
{% endblock %}
@ -17,6 +22,21 @@
<body>
{% include "CalciferBundle::navigation.html.twig" %}
<div class="ui one column page grid">
<div class="column">
<div id="mission-statement" class="ui message green">
{% image '@CalciferBundle/Resources/assets/images/logo.png' %}
<img
title="Eine Zeichnung von Calcifer. Gezeichnet von simply-Sylvan (http://simply-sylvan.deviantart.com/art/Calcifer-Purple-176746086)"
alt="Eine Zeichnung von Calcifer. Gezeichnet von simply-Sylvan (http://simply-sylvan.deviantart.com/art/Calcifer-Purple-176746086)"
src="{{ asset_url }}"
class="ui image small floated left" />
{% endimage %}
<p>Calcifer ist ein Daemon aus dem Anime <a href="http://anidb.net/perl-bin/animedb.pl?show=anime&amp;aid=1218">„Das wandelnde Schloss“</a>, der sich darum kümmert das sich Howls Schloss weiter bewegt. Diese Terminverwaltung soll dafür sorgen das sich der <a href="https://www.krautspace.de/">Hackspace Jena</a> auch weiter bewegt und viele tolle Termine statfinden.</p>
</div>
</div>
</div>
<div id="main" class="segment">
{% block body %}{% endblock %}
</div>

View file

@ -1,33 +0,0 @@
body {
margin: 0;
font-family: 'Roboto', sans-serif;
}
header {
top: 0;
}
header .ui.grid > .column, .title.ui.grid > .column {
margin-top: 0;
margin-bottom: 0;
}
.box h2 {
font-size: 1rem !important;
}
#main {
margin-top: 4rem;
}
a .icon {
text-decoration: none;
}
a, a:hover, a:visited {
color: #000000;
}
a:hover {
text-decoration: none;
}

0
web/css/custom.scss Normal file
View file

0
web/css/semantic.css → web/css/semantic.scss Executable file → Normal file
View file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
web/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B