Skip to content

Commit

Permalink
Merge pull request #3423 from AntonioKL/patching-manage-subscribtion
Browse files Browse the repository at this point in the history
Patching manage subscription
  • Loading branch information
jbrooksuk committed Jul 11, 2019
2 parents fabd18d + 4747014 commit 163f78f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 14 deletions.
4 changes: 0 additions & 4 deletions app/Http/Middleware/SubscribersConfigured.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ public function __construct(Repository $config)
*/
public function handle(Request $request, Closure $next)
{
if (!$this->config->get('setting.enable_subscribers')) {
return cachet_redirect('status-page');
}

return $next($request);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function toSlack($notifiable)

return (new SlackMessage())
->$status()
->content(trans('notifications.component.status_update.slack.subject'))
->content(trans('notifications.component.status_update.slack.title'))
->attachment(function ($attachment) use ($content, $notifiable) {
$attachment->title($content, cachet_route('status-page'))
->fields(array_filter([
Expand Down
3 changes: 1 addition & 2 deletions app/Notifications/Incident/NewIncidentNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ public function toSlack($notifiable)
->fields(array_filter([
'ID' => "#{$this->incident->id}",
'Link' => $this->incident->permalink,
]))
->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
]));
});
}
}
3 changes: 1 addition & 2 deletions app/Notifications/Schedule/NewScheduleNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ public function toSlack($notifiable)
->fields(array_filter([
'ID' => "#{$this->schedule->id}",
'Status' => $this->schedule->human_status,
]))
->footer(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
]));
});
}
}
7 changes: 2 additions & 5 deletions resources/views/dashboard/subscribers/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span class="uppercase">
<i class="ion ion-ios-email-outline"></i> {{ trans('dashboard.subscribers.subscribers') }}
</span>
@if($currentUser->isAdmin && $enableSubscribers)
@if($currentUser->isAdmin)
<a class="btn btn-md btn-success pull-right" href="{{ cachet_route('dashboard.subscribers.create') }}">
{{ trans('dashboard.subscribers.add.title') }}
</a>
Expand All @@ -19,11 +19,7 @@
<div class="row">
<div class="col-sm-12">
<p class="lead">
@if($enableSubscribers)
{{ trans('dashboard.subscribers.description') }}
@else
{{ trans('dashboard.subscribers.description_disabled') }}
@endif
</p>

<div class="striped-list">
Expand Down Expand Up @@ -51,6 +47,7 @@
@endif
</div>
<div class="col-xs-3 text-right">
<a href="{{ cachet_route('subscribe.manage', $subscriber->verify_code) }}" target="_blank" class="btn btn-success">{{ trans('forms.edit') }}</a>
<a href="{{ cachet_route('dashboard.subscribers.delete', [$subscriber->id], 'delete') }}" class="btn btn-danger confirm-action" data-method='DELETE'>{{ trans('forms.delete') }}</a>
</div>
</div>
Expand Down

0 comments on commit 163f78f

Please sign in to comment.