Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Add display multi-stages per day #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions src/Event/EventBundle/Entity/Stage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?php

namespace Event\EventBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\Validator\Constraints as Assert;
use Event\EventBundle\Entity\Translation\Translation;

/**
* Stage
*
* @ORM\Table(name="ev_stage")
* @ORM\Entity
*/

class Stage
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;

/**
* @var string
*
* @Assert\NotNull()
* @ORM\Column(name="title", type="string", length=255, nullable=true)
*/
private $title;

/**
* @var boolean
*
* @ORM\Column(name="is_active", type="boolean")
*/
private $isActive = true;


public function __construct()
{
}

/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}

/**
* Set title
*
* @param string $title
* @return WshSchedule
*/
public function setTitle($title)
{
$this->title = $title;

return $this;
}

/**
* Get title
*
* @return string
*/
public function getTitle()
{
return $this->title;
}

/**
* Get isActive
*
* @return boolean
*/
public function getIsActive()
{
return $this->isActive;
}

/**
* Set isActive
*
* @param boolean $isActive
* @return Workshop
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;

return $this;
}

}
7 changes: 1 addition & 6 deletions src/Event/EventBundle/Entity/WshSchedule.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
<?php
/**
* Created by PhpStorm.
* User: angeluss
* Date: 14.08.18
* Time: 18:09
*/

namespace Event\EventBundle\Entity;

Expand Down Expand Up @@ -164,6 +158,7 @@ public function getIsActive()
public function setIsActive($isActive)
{
$this->isActive = $isActive;

return $this;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{% extends 'EventEventBundle:Backend:layout.html.twig' %}

{% block data_tables_css %}
<link href="{{ asset('bundles/eventevent/css/libs/DataTables/css/jquery.dataTables.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('bundles/eventevent/css/speech/speech.css') }}" rel="stylesheet" type="text/css">
{% endblock %}

{% block content %}
<section>
<div class="page-header">
<h3>Event speeches</h3>
<div class="row">
<div class="span3">
<a href="{{ path('backend_speech_add') }}" class="btn btn-small btn-success">Add stage</a>
</div>
{% include 'EventEventBundle:Backend:_events_select.html.twig' %}
</div>
</div>

<table class="table table-striped table-bordered" id="speeches">
<thead>
<tr>
<th>id</th>
<th>Title</th>
<th width="10%">Actions</th>
</tr>
</thead>
</table>
</section>
{% include 'EventEventBundle:Backend:_confirm_modal.html.twig'
with {'title': 'Confirm action', 'body': 'Do you really want to delete this stage?'} %}
{% endblock %}

{% block data_tables_js %}
<script src="{{ asset('bundles/eventevent/js/libs/DataTables/jquery.dataTables.min.js') }}"></script>
<script src="{{ asset('bundles/eventevent/js/confirm.js') }}"></script>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{% extends 'EventEventBundle:Backend:layout.html.twig' %}

{% block content %}
<section>
<div class="page-header">
<h3>{{ speech.id ? 'Edit' : 'Add' }} speech</h3>
<a href="{{ path('backend_speech') }}" class="btn btn-small">&larr; Back to the list</a>
</div>

{{ render(controller('EventEventBundle:Backend/Dashboard:localeTabs', {'translations' : speech.translations})) }}

{{ form_start(form, {'method': 'POST', 'action': path('backend_speech_edit', {'id': speech.id})}) }}
<div class="tab-content">
<div class="tab-pane active" id="{{ app.request.locale }}">
{{ form_row(form.speaker) }}
<div class="well">
{{ form_row(form.event) }}
</div>
{{ form_row(form.title) }}
{{ form_row(form.language) }}
{{ form_row(form.description) }}
{{ form_row(form.slide) }}
{{ form_row(form.video) }}
</div>

{% for translation in form.translations %}
<div class="tab-pane fade" id="{{ configLocales[translation.vars.value.locale] }}">
{{ form_widget(translation) }}
</div>
{% endfor %}

{{ form_rest(form) }}

<input type="submit" value="{{ speech.id ? 'Update' : 'Add' }}" class="btn btn-success" />
</div>
{{ form_end(form) }}

</section>
{% endblock %}