-
Notifications
You must be signed in to change notification settings - Fork 2
/
routes.php
184 lines (148 loc) · 5.68 KB
/
routes.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?php
// var_dump('Hola decima web');
/**
* @file
* Application Routes.
*
* All ECSL2018 code is copyright by the original authors and released under the GNU Aferro General Public License version 3 (AGPLv3) or later.
* See COPYRIGHT and LICENSE.
*/
/*
|--------------------------------------------------------------------------
| Package Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
//https://laravel.com/docs/5.1/controllers
// var_dump(Request::getHost());
$ecslsv = function ()
{
Route::get('/ecsltest', function()
{
// return Redirect::to('cms/dashboard')->with('ecsl2018login', true);
// return Redirect::to('cms/dashboard')->with('ecsl2018registro', true);
return Redirect::to('cms/dashboard')
->with('ecsl2018pago', true)
->with('token', Request::get('token', ''))
->with('ern', Request::get('ern', ''));
});
Route::get('/cms/logistica', function()
{
return View::make('ecsl-2018::logistica');
});
//Rutas para el desarrollador
// Route::get('/cms/cierre', function()
// {
// return View::make('ecsl-2018::inicio-cierre');
// });
//
// Route::get('/cms/inicio-cierre', function()
// {
// $app = $this->app;
// $OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
//
// return View::make('ecsl-2018::inicio-cierre')
// ->with('usersData', $OpenCmsManagerService->getUsersRegistrationData())
// ->with('participants', $OpenCmsManagerService->getParticipantsInformation(false));
// });
Route::get('/cms/ejes-tematicos', function()
{
return View::make('ecsl-2018::ejes-tematicos');
});
Route::get('/cms/becas', function()
{
return View::make('ecsl-2018::becas');
});
Route::get('/cms/faq', function()
{
return View::make('ecsl-2018::faq');
});
// Route::get('/cms/ecsl/eventos-anteriores', function()
Route::get('/cms/eventos-anteriores', function()
{
return View::make('ecsl-2018::eventos-anteriores');
});
Route::get('/cms/carta-invitacion', function()
{
return View::make('ecsl-2018::carta-invitacion-pdf');
});
Route::get('/cms/fotografias', function()
{
return View::make('ecsl-2018::fotografias');
});
Route::get('/cms/ponencias', function()
{
return View::make('ecsl-2018::ponencias');
});
Route::get('/cms/estadisticas', function()
{
$app = $this->app;
$OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
return View::make('ecsl-2018::estadisticas')
->with('charts', true)
->with('genderStats', $OpenCmsManagerService->getGenderStats())
->with('countriesStats', $OpenCmsManagerService->getCountriesStats())
->with('institutionsStats', $OpenCmsManagerService->getInstitutionsStats());
});
Route::get('/cms/agenda/{id}', function($id)
{
return Redirect::to('cms/agenda')->with('presentationId', $id);
});
Route::get('/cms/agenda', function()
{
$app = $this->app;
$presentationId = Session::get('presentationId', '');
$PresentationManagerService = $app->make('Mgallegos\DecimaOpenCms\OpenCms\Services\PresentationManagement\PresentationManagementInterface');
$OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
$presentationTitle = $presentationDescription = '';
if(!empty($presentationId))
{
$Presentation = $PresentationManagerService->getPresentation($presentationId, 'ecsl2018');
$presentationTitle = $Presentation->name;
$presentationDescription = $Presentation->description;
}
// var_dump($PresentationManagerService->getPresentationsWithSpeaker(1, 15, true, 'ecsl2018', false));
// var_dump($PresentationManagerService->getPresentationsWithSpeakerAndSchedule(1, 15, true, 'ecsl2018', false));
return View::make('ecsl-2018::agenda')
->with('presentationId', $presentationId)
->with('ogTitle', $presentationTitle)
->with('ogDescription', $presentationDescription)
->with('presentationId', $presentationId)
->with('usersData', $OpenCmsManagerService->getUsersRegistrationData())
// ->with('presentations', $PresentationManagerService->getPresentationsWithSpeaker(1, 15, true, 'ecsl2018', false))
->with('presentationsBySchedule', $PresentationManagerService->getPresentationsWithSpeakerAndSchedule(1, 15, true, 'ecsl2018', false));
});
Route::post('/cms/presentaciones', function()
{
$app = $this->app;
return GridEncoder::encodeRequestedData(new \Mgallegos\ECSL2018\Repositories\Presentation\EloquentPresentationGridRepository($app['db']), Request::all());
});
AdvancedRoute::controller('/cms/dashboard', 'Mgallegos\ECSL2018\Controllers\OpenCmsManager');
AdvancedRoute::controller('/cms/inicio', 'Mgallegos\ECSL2018\Controllers\InicioManager');
Route::post('/cms/get-users', function()
{
$app = $this->app;
$OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
return $OpenCmsManagerService->saoh01(Request::json()->all());
});
Route::post('/cms/post-card-touch', function()
{
$app = $this->app;
$OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
return $OpenCmsManagerService->saoh02(Request::json()->all());
});
Route::post('/cms/post-share-info', function()
{
$app = $this->app;
$OpenCmsManagerService = $app->make('Ecsl2018OpenCmsManagementInterface');
return $OpenCmsManagerService->saoh03(Request::json()->all());
});
// AdvancedRoute::controller('/cms/ecsl-2018', 'Mgallegos\ECSL2018\Controllers\GestorCms');
};
// Route::group(['domain' => 'localhost'], $ecslsv);
// Route::group(['domain' => 'app.decimaerp.com'], $ecslsv);
Route::group(['domain' => 'ecsl2018.softwarelibre.ca'], $ecslsv);