Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tourinsoft
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
Tourinsoft
Commits
992fda3d
Commit
992fda3d
authored
May 11, 2018
by
Frédéric
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sync controller
parent
1770d5d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
207 deletions
+30
-207
FluxController.php
src/Controller/Backend/FluxController.php
+12
-9
list.html.twig
templates/Backend/flux/list.html.twig
+18
-198
No files found.
src/Controller/Backend/FluxController.php
View file @
992fda3d
...
@@ -64,7 +64,7 @@ class FluxController extends BackendBase
...
@@ -64,7 +64,7 @@ class FluxController extends BackendBase
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
* @throws \Exception
* @throws \Exception
*/
*/
public
function
add
(
Request
$request
)
{
public
function
add
(
Request
$request
)
{
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
findAll
();
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
findAll
();
$form
=
$this
->
createForm
(
'Bolt\Extension\Appolo\Tourinsoft\Form\FluxType'
,
new
Flux
());
$form
=
$this
->
createForm
(
'Bolt\Extension\Appolo\Tourinsoft\Form\FluxType'
,
new
Flux
());
...
@@ -88,6 +88,8 @@ class FluxController extends BackendBase
...
@@ -88,6 +88,8 @@ class FluxController extends BackendBase
/**
/**
* Edit ('/edit/:id')
* Edit ('/edit/:id')
* @param Request $request
* @return \Bolt\Response\TemplateResponse|\Bolt\Response\TemplateView|\Symfony\Component\HttpFoundation\RedirectResponse
*/
*/
public
function
edit
(
Request
$request
)
{
public
function
edit
(
Request
$request
)
{
...
@@ -116,16 +118,17 @@ class FluxController extends BackendBase
...
@@ -116,16 +118,17 @@ class FluxController extends BackendBase
/**
/**
* Synchornisation ('/sync/:id')
* Synchornisation ('/sync/:id')
*/
*/
public
function
sync
(
$id
)
{
public
function
sync
(
Request
$request
)
{
$flux
=
new
Flux
();
$flux
=
$this
->
getRepository
(
Flux
::
class
)
->
find
(
$request
->
get
(
'id'
));
$flux
->
setTitle
(
'Mon Titre'
);
if
(
!
$flux
){
$flux
->
setContentType
(
'test2'
);
$this
->
app
[
'session'
]
->
getFlashBag
()
->
add
(
'error'
,
'Modification impossible: Flux inexistant'
);
$flux
->
setEnabled
(
true
);
}
else
{
$flux
->
setKey
(
'2184659e-c7b0-4e8c-8f08-0813bbda30a6'
);
$sync
=
new
Synchronisation
(
$this
->
config
,
$this
->
application
,
$flux
);
$sync
->
sync
();
}
$sync
=
new
Synchronisation
(
$this
->
config
,
$this
->
application
,
$flux
);
return
$this
->
redirectToRoute
(
'tourinsoft_admin_flux_index'
);
$sync
->
sync
();
}
}
/**
/**
...
...
templates/Backend/flux/list.html.twig
View file @
992fda3d
...
@@ -25,52 +25,49 @@
...
@@ -25,52 +25,49 @@
<th><span
class=
"hidden-xs"
>
{{
__
(
'general.phrase.action-plural'
)
}}
</span></th>
<th><span
class=
"hidden-xs"
>
{{
__
(
'general.phrase.action-plural'
)
}}
</span></th>
</tr>
</tr>
{# tri des flux par dates décroissantes #}
{# tri des flux par dates décroissantes #}
{%
for
f
in
flux
|
reverse
%}
{%
for
item
in
flux
|
reverse
%}
<tr
class=
"dim"
id=
"item_1"
>
<tr
class=
"dim"
id=
"item_1"
>
<td
class=
"id hidden-xs"
>
{{
f
.id
}}
</td>
<td
class=
"id hidden-xs"
>
{{
item
.id
}}
</td>
<td>
<td>
<span>
<span>
<strong>
<strong>
<a
href=
""
target=
"_blank"
>
{{
f.title
}}
</a>
{{
item.title
}}
</strong>
</strong>
</span>
</span>
</td>
</td>
<td>
{{
f
.code
}}
</td>
<td>
{{
item
.code
}}
</td>
<td>
{{
f
.key
}}
</td>
<td>
{{
item
.key
}}
</td>
<td>
{{
f
.contentType
}}
</td>
<td>
{{
item
.contentType
}}
</td>
<td
class=
"actions"
>
<td
class=
"actions"
>
<div
class=
"btn-group"
>
<div
class=
"btn-group"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle btn-xs"
<button
type=
"button"
class=
"btn btn-default dropdown-toggle btn-xs"
data-toggle=
"dropdown"
>
data-toggle=
"dropdown"
>
Sélectionner une action
Sélectionner une action
<i
cla
ss=
"fa fa-info-sign"
></i>
<span
class=
"caret"
></span>
<i
cla
ss=
"fa fa-info-sign"
></i>
<span
class=
"caret"
></span>
</button>
</button>
<ul
class=
"dropdown-menu pull-right"
>
<ul
class=
"dropdown-menu pull-right"
>
<li>
<li>
<a
href=
"
{{
path
(
'tourinsoft_admin_flux_edit'
,
{
'id'
:
f.id
}
)
}}
"
>
<a
href=
"
{{
path
(
'tourinsoft_admin_flux_sync'
,
{
'id'
:
item.id
}
)
}}
"
>
<i
class=
"fa fa-refresh"
></i>
Synchroniser
</a>
</li>
<li>
<a
href=
"
{{
path
(
'tourinsoft_admin_flux_edit'
,
{
'id'
:
item.id
}
)
}}
"
>
<i
class=
"fa fa-edit"
></i>
<i
class=
"fa fa-edit"
></i>
{{
__
(
'field.slug.button.edit'
)
}}
{{
__
(
'field.slug.button.edit'
)
}}
</a>
</a>
</li>
</li>
<li>
<li>
<a
onclick=
"return confirm('Êtes-vous sûr de vouloir supprimer ce flux?');"
href=
"
{{
path
(
'tourinsoft_admin_flux_delete'
,
{
'id'
:
f
.id
}
)
}}
"
>
<a
onclick=
"return confirm('Êtes-vous sûr de vouloir supprimer ce flux?');"
href=
"
{{
path
(
'tourinsoft_admin_flux_delete'
,
{
'id'
:
item
.id
}
)
}}
"
>
<i
class=
"fa fa-trash"
></i>
<i
class=
"fa fa-trash"
></i>
{{
__
(
'general.phrase.delete'
)
}}
{{
__
(
'general.phrase.delete'
)
}}
</a>
</a>
</li>
</li>
<li
class=
"divider"
></li>
<li
class=
"divider"
></li>
<li>
<li>
<a
class=
"nolink"
>
{{
__
(
'general.phrase.author'
)
}}
:
<strong><i
class=
"fa fa-user"
></i>
{{
user.username
}}
</strong>
</a>
</li>
<li>
<a
class=
"nolink"
>
{{
__
(
'general.phrase.created-on-colon'
)
}}
:
<a
class=
"nolink"
>
{{
__
(
'general.phrase.created-on-colon'
)
}}
:
<i
class=
"fa fa-asterisk"
></i>
{{
f
.createdAt
|
date
(
'd/m/Y'
)
}}
<i
class=
"fa fa-asterisk"
></i>
{{
item
.createdAt
|
date
(
'd/m/Y'
)
}}
</a>
</a>
</li>
</li>
</ul>
</ul>
...
@@ -94,187 +91,9 @@
...
@@ -94,187 +91,9 @@
<a
class=
"btn btn-primary"
href=
"
{{
path
(
'tourinsoft_admin_flux_add'
)
}}
"
>
<a
class=
"btn btn-primary"
href=
"
{{
path
(
'tourinsoft_admin_flux_add'
)
}}
"
>
<i
class=
"fa fa-plus"
></i>
{{
__
(
'Nouveau Flux'
)
}}
<i
class=
"fa fa-plus"
></i>
{{
__
(
'Nouveau Flux'
)
}}
</a>
</a>
{#<div class="form-group">
<h4 class="tertiary" style="margin-top: 1em;"><i class="fa fa-filter"></i>
{{
__('general.phrase.filter') }}</h4>
<table>
<tbody>
<tr>
<td class="actions">
<div class="btn-group">
<!-- Selected Filter Name Appear-->
{
% set type = app.request.query.get('type') %}
{
% if type == null %}
<a class="btn btn-default btn-xs hidden-xs">
<i class="fa fa-filter"
aria-hidden="true"></i>
{{
__('general.phrase.select') }}
</a>
{
% endif %}
{
% if type == 'all' %}
<a class="btn btn-default btn-xs hidden-xs"
href="
{{
path('overview_newsletter',
{
type: 'all'}) }}">
<i class="fa fa-newspaper-o"
aria-hidden="true"></i>
{{
__('All') }}
</a>
{
% endif %}
{
% if type =='done' %}
<a class="btn btn-default btn-xs hidden-xs"
href="
{{
path('overview_newsletter',
{
type: 'done'}) }}">
<i class="fa fa-check-square-o"
aria-hidden="true"></i>
{{
__('Envoyée(s)') }}
</a>
{
% endif %}
{
% if type == 'undone' %}
<a class="btn btn-default btn-xs hidden-xs"
href="
{{
path('overview_newsletter',
{
type: 'undone'}) }}">
<i class="fa fa-paper-plane"
aria-hidden="true"></i>
{{
__('A envoyer') }}
</a>
{
% endif %}
<!-- End Selected Filter Name Appear-->
<button type="button" class="btn btn-default dropdown-toggle btn-xs"
data-toggle="dropdown">
<i class="fa fa-info-sign"></i> <span class="caret"></span>
</button>
<!-- Item selection-->
<ul class="dropdown-menu pull-right">
<li>
<a class="
{
% if type == 'all' %}active
{
% endif %}"
href="">
<i class="fa fa-newspaper-o" aria-hidden="true"></i>
{{
__('All') }}
</a>
</li>
<li>
<a class="
{
% if type == 'all' %}active
{
% endif %} "
href="">
<i class="fa fa-check-square-o" aria-hidden="true"></i>
{{
__('Envoyée(s)') }}
</a>
</li>
<li>
<a href="">
<i class="fa fa-paper-plane" aria-hidden="true"></i>
{{
__('A envoyer') }}
</a>
</li>
</ul>
<!-- End Item selection-->
</div>
</td>
</tr>
</tbody>
</table>
</div>#}
</div>
</div>
</div>
</div>
</aside>
</aside>
<!-- / sidebar -->
<!-- / sidebar -->
</div>
</div>
{%
endblock
page_main
%}
{%
endblock
page_main
%}
\ No newline at end of file
{#
<div id="navpage-content" class="container-fluid">
<div class="row">
<div class="col-xs-12">
<h1 class="page-header">
<strong>Vue d'ensemble »</strong>
<i style="font-style: normal;"> Pages
</i>
</h1>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="row">
</div>
<noscript>
<div class="alert alert-danger">
<p>Javascript est désactivé. BIen que la majeure partie des fonctionnalités de Bolt soient utilisables sans Javascript, nous vous recommandons de l'activer pour en tirer la quintessence.</p>
</div>
</noscript>
<div class="buic-listing" data-contenttype="pages" data-contenttype-name="Page" data-bolt_csrf_token="oS9uE34-4C11Cy19d83lum6TyauOXaUhl9l8Aj3z4qg">
<p>
Aucun(e) Pages disponible
</p><p class="btn-group">
<a class="btn btn-primary" href="/bolt/editcontent/pages">
<i class="fa fa-plus"></i> Nouveau Page
</a>
</p><table class=" dashboardlisting listing">
</table>
</div>
</div>
<aside class="col-md-4">
<div class="panel panel-default panel-news">
<div class="panel-heading">
<i class="fa fa-fw fa-cog"></i>
Actions pour les Pages </div>
<div class="panel-body">
<a class="btn btn-primary" href="/bolt/editcontent/pages">
<i class="fa fa-plus"></i> Nouveau Page
</a>
<p style="margin-top: 15px;"><strong>Filtrer</strong></p>
<form class="form-inline">
<div class="form-group">
<select name="taxonomy-groups" class="form-control">
<option value="">
(Groups)
</option>
<option value="main">
The main group
</option>
<option value="meta">
Meta group
</option>
<option value="other">
The other stuff
</option>
</select>
ou
<input type="text" class="form-control" value="" name="filter" style="width: 110px;" placeholder="Mot-clef …">
</div>
<div class="form-group" style="display: block; margin-top: 12px;">
<button type="submit" class="btn btn-tertiary"><i class="fa fa-filter"></i> Filtrer</button>
</div>
</form>
<div class="description">
</div>
<p><strong>Détails</strong></p>
<ul>
<li>Statut par défaut: draft</li>
<li>Modèle des listes: <code>listing.twig</code></li>
<li>Modèle du détail: <code>record.twig</code></li>
<li>Taxonomies: groups</li>
</ul>
</div>
</div>
<div class="panel panel-default panel-lastmodified">
<div class="panel-heading">
<i class="fa fa-fw fa-clock-o"></i>
Derniers Pages modifiés
</div>
<div class="panel-body">
<ul>
<li><em>Pas de Pages récent.</em></li>
</ul>
</div>
</div>
</aside>
</div>
</div>#}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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