diff --git a/app/Http/Controllers/SubscribeController.php b/app/Http/Controllers/SubscribeController.php index 953f7757..f8926c3c 100644 --- a/app/Http/Controllers/SubscribeController.php +++ b/app/Http/Controllers/SubscribeController.php @@ -69,12 +69,12 @@ class SubscribeController extends Controller ->withErrors($e->getMessageBag()); } - $message = $subscription->is_verified ? - trans('cachet.subscriber.email.already-subscribed', ['email' => $email]) : - trans('cachet.subscriber.email.subscribed'); + if ($subscription->is_verified) { + return Redirect::route('status-page')->withSuccess(trans('cachet.subscriber.email.already-subscribed', ['email' => $email])); + } return Redirect::route('subscribe.manage', $subscription->verify_code) - ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), $message)); + ->withSuccess(sprintf('%s %s', trans('dashboard.notifications.awesome'), trans('cachet.subscriber.email.subscribed'))); } /** diff --git a/resources/views/subscribe/manage.blade.php b/resources/views/subscribe/manage.blade.php index 3bcade12..31c569cc 100644 --- a/resources/views/subscribe/manage.blade.php +++ b/resources/views/subscribe/manage.blade.php @@ -20,18 +20,44 @@
-
-
- {{ trans('cachet.subscriber.manage.my_subscriptions') }} -
-
- @if(!$component_groups->isEmpty() || !$ungrouped_components->isEmpty()) - @include('partials.components_form') - @else -

{{ trans('cachet.subscriber.manage.no_subscriptions') }}

- @endif -
+ @if(!$component_groups->isEmpty() || !$ungrouped_components->isEmpty()) + @if($component_groups->count() > 0) + @foreach($component_groups as $componentGroup) +
+ @if($componentGroup->enabled_components->count() > 0) +
+ + {{ $componentGroup->name }} +
+ Select All +  |  + Deselect All +
+
+
+ @foreach($componentGroup->enabled_components()->orderBy('order')->get() as $component) + @include('partials.component_input', compact($component)) + @endforeach +
+ @endif
+ @endforeach + @endif + + @if($ungrouped_components->count() > 0) + + @endif + @else +

{{ trans('cachet.subscriber.manage.no_subscriptions') }}

+ @endif +