diff --git a/config/services.php b/config/services.php index b6dc748..12ee866 100644 --- a/config/services.php +++ b/config/services.php @@ -14,6 +14,8 @@ return [ | */ + 'voting' => env('ENABLE_VOTING', false), + 'relay' => env('NOSTR_RELAY'), 'nostr' => env('NOSTR_P'), diff --git a/resources/views/pages/association/election/[Election:year].blade.php b/resources/views/pages/association/election/[Election:year].blade.php index f8e3282..940d43e 100644 --- a/resources/views/pages/association/election/[Election:year].blade.php +++ b/resources/views/pages/association/election/[Election:year].blade.php @@ -44,7 +44,7 @@ mount(function () { ->get() ->toArray(); $this->loadEvents(); - if ($this->election->end_time->isPast()) { + if ($this->election->end_time->isPast() || !config('services.voting')) { $this->isNotClosed = false; } }); diff --git a/resources/views/pages/association/election/admin/[Election:year].blade.php b/resources/views/pages/association/election/admin/[Election:year].blade.php index 3208498..a4ad6fa 100644 --- a/resources/views/pages/association/election/admin/[Election:year].blade.php +++ b/resources/views/pages/association/election/admin/[Election:year].blade.php @@ -191,22 +191,21 @@ $loadEvents = function () {
- - @foreach($positions as $key => $position) -
-
-

{{ $position['title'] }} -

-
-
- - + @foreach($positions as $key => $position) +
+
+

{{ $position['title'] }} +

+
+
+ + +
-
- @endforeach + @endforeach