Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
voting.typo3.org
extensions
election
Commits
4cb65357
Commit
4cb65357
authored
Dec 23, 2015
by
Oliver Eglseder
Browse files
[WIP][TASK] List people that did not receive an invitation yet
parent
098b00b9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/BeElectionCircularController.php
View file @
4cb65357
...
...
@@ -35,6 +35,7 @@ class BeElectionCircularController extends AbstractProtectedBeController
const
ACTION_PREVIEW
=
'preview'
;
const
ACTION_TEST_SEND
=
'testSend'
;
const
ACTION_SEND
=
'send'
;
const
ACTION_SEND_PREVIEW
=
'sendPreview'
;
/**
* @var \TYPO3\Election\Domain\Repository\ElectionCircularRepository
...
...
@@ -135,6 +136,14 @@ class BeElectionCircularController extends AbstractProtectedBeController
);
}
/**
* @param ElectionCircular $electionCircular
*/
public
function
sendPreviewAction
(
ElectionCircular
$electionCircular
)
{
$this
->
view
->
assign
(
'electionCircular'
,
$electionCircular
);
}
/**
* @param ElectionCircular $electionCircular
*/
...
...
@@ -175,6 +184,7 @@ class BeElectionCircularController extends AbstractProtectedBeController
self
::
ACTION_PREVIEW
,
self
::
ACTION_TEST_SEND
,
self
::
ACTION_SEND
,
self
::
ACTION_SEND_PREVIEW
,
]
);
}
...
...
Classes/Domain/Model/ElectionCircular.php
View file @
4cb65357
...
...
@@ -132,4 +132,13 @@ class ElectionCircular extends AbstractEntity
{
return
'sakdjfhlkasdjhf'
;
}
/**
* @return Elector[]
*/
public
function
getRemainingReceivers
()
{
// TODO: return only those who did not receive an invitation yet
return
$this
->
getElection
()
->
getElectorate
()
->
getElectors
();
}
}
Resources/Private/Language/locallang.xlf
View file @
4cb65357
...
...
@@ -363,6 +363,12 @@
<trans-unit
id=
"view.be.election_circular.preview.send_invitations"
>
<source>
Send invitations
</source>
</trans-unit>
<trans-unit
id=
"view.be.election_circular.send_preview.welcome"
>
<source>
Send invitations
</source>
</trans-unit>
<trans-unit
id=
"view.be.election_circular.send_preview.remaining_receivers"
>
<source>
Remaining receivers
</source>
</trans-unit>
<!-- MODEL ELECTION CIRCULARS -->
...
...
Resources/Private/Partials/Model/ElectionCircular/SendPreview.html
0 → 100644
View file @
4cb65357
<div>
<h2>
<f:translate
key=
"view.be.election_circular.send_preview.remaining_receivers"
>
Remaining receivers
</f:translate>
</h2>
<table
class=
"table"
>
<thead>
<tr>
<th>
<f:translate
key=
"model.abstract_person.field.full_name"
>
Name
</f:translate>
</th>
<th>
<f:translate
key=
"model.abstract_person.field.email"
>
email
</f:translate>
</th>
</tr>
</thead>
<tbody>
<f:for
each=
"{electionCircular.remainingReceivers}"
as=
"elector"
>
<tr>
<td>
{elector.fullName}
</td>
<td>
{elector.email}
</td>
</tr>
</f:for>
</tbody>
</table>
</div>
Resources/Private/Templates/BeElectionCircular/Preview.html
View file @
4cb65357
...
...
@@ -9,7 +9,7 @@
</f:link.action>
<f:if
condition=
"{isPluginInstalled}"
>
<f:then>
<f:link.action
class=
"btn btn-default"
action=
"send"
controller=
"BeElectionCircular"
<f:link.action
class=
"btn btn-default"
action=
"send
Preview
"
controller=
"BeElectionCircular"
arguments=
"{electionCircular:electionCircular}"
>
<core:icon
identifier=
"actions-system-list-open"
/>
<f:translate
key=
"view.be.election_circular.preview.send_invitations"
>
Send invitations
</f:translate>
...
...
Resources/Private/Templates/BeElectionCircular/SendPreview.html
0 → 100644
View file @
4cb65357
{namespace core=TYPO3\CMS\Core\ViewHelpers}
<f:layout
name=
"Backend"
/>
<f:section
name=
"LeftToolBar"
>
</f:section>
<f:section
name=
"RightToolBar"
>
</f:section>
<f:section
name=
"Welcome"
>
<h1>
<f:translate
key=
"view.be.election_circular.send_preview.welcome"
>
Send invitations
</f:translate>
</h1>
</f:section>
<f:section
name=
"Main"
>
<f:render
partial=
"Model/ElectionCircular/SendPreview"
arguments=
"{electionCircular:electionCircular}"
/>
</f:section>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment