mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 11:22:42 +01:00
Spread the Word option in Settings
This commit is contained in:
parent
6d15eb512d
commit
b016f2ebf1
@ -93,6 +93,7 @@ class SettingsController extends Controller
|
||||
'company_name' => Option::get('company_name', \Config::get('app.name')),
|
||||
'next_ticket' => Option::get('next_ticket'),
|
||||
'user_permissions' => Option::get('user_permissions', []),
|
||||
'email_branding' => Option::get('email_branding'),
|
||||
'open_tracking' => Option::get('open_tracking'),
|
||||
'enrich_customer_data' => Option::get('enrich_customer_data'),
|
||||
'time_format' => Option::get('time_format', User::TIME_FORMAT_24),
|
||||
|
@ -8,6 +8,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Option extends Model
|
||||
{
|
||||
// todo: cache in file (see WordPress)
|
||||
public static $cache = [];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
@ -62,18 +65,28 @@ class Option extends Model
|
||||
* @param string $name
|
||||
* @return string
|
||||
*/
|
||||
public static function get($name, $default = false, $decode = true)
|
||||
public static function get($name, $default = false, $decode = true, $cache = false)
|
||||
{
|
||||
if ($cache && isset(self::$cache[$name])) {
|
||||
return self::$cache[$name];
|
||||
}
|
||||
|
||||
$option = Option::where('name', (string)$name)->first();
|
||||
if ($option) {
|
||||
if ($decode) {
|
||||
return self::maybeUnserialize($option->value);
|
||||
$value = self::maybeUnserialize($option->value);
|
||||
} else {
|
||||
return $option->value;
|
||||
$value = $option->value;
|
||||
}
|
||||
} else {
|
||||
return $default;
|
||||
$value = $default;
|
||||
}
|
||||
|
||||
if ($cache) {
|
||||
self::$cache[$name] = $value;
|
||||
}
|
||||
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function remove($name)
|
||||
|
@ -39,7 +39,7 @@
|
||||
<span>{{ __("Conversation") }}</span>
|
||||
</th>
|
||||
@if ($folder->type == App\Folder::TYPE_ASSIGNED || $folder->type == App\Folder::TYPE_CLOSED)
|
||||
<th class="conv-owner dropdown" data-toggle="tooltip" title="{{ __("Filter by Assigned To") }}">
|
||||
<th class="conv-owner dropdown">
|
||||
<span {{--data-target="#"--}} class="dropdown-toggle" data-toggle="dropdown">{{ __("Assigned To") }}</span>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="filter-owner" data-id="1" href="#"><span class="option-title">{{ __("Anyone") }}</span></a></li>
|
||||
|
@ -7,6 +7,11 @@
|
||||
<div style="font-family:sans-serif;">
|
||||
{!! $auto_reply_message !!}
|
||||
</div>
|
||||
@if (\App\Option::get('email_branding'))
|
||||
<div style="font-size:12px; line-height:18px; font-family:Arial,'Helvetica Neue',Helvetica,Tahoma,sans-serif; color: #aaaaaa; border-top: 1px solid #eeeeee; margin: 10px 0 14px 0; padding-top: 10px;">
|
||||
{!! __('Support powered by :app_name — Free open source help desk & shared mailbox', ['app_name' => '<a href="'.Config::get('app.freescout_url').'">'.\Config::get('app.name').'</a>']) !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
{{--<span height="0" style="font-size: 0px; height:0px; line-height: 0px; color:#ffffff;">{#FS:123-123#}</span>--}}
|
||||
</body>
|
||||
|
@ -1,3 +1,8 @@
|
||||
{{ App\Mail\Mail::REPLY_SEPARATOR_TEXT }}
|
||||
|
||||
{{ (new Html2Text\Html2Text($auto_reply_message))->getText() }}
|
||||
@if (\App\Option::get('email_branding'))
|
||||
|
||||
-----------------------------------------------------------
|
||||
{!! __('Support powered by :app_name — Free open source help desk & shared mailbox', ['app_name' => \Config::get('app.name')]) !!}
|
||||
@endif
|
@ -45,7 +45,7 @@
|
||||
{{--<br><br>How would you rate my reply?<br><a href="" style="color:#50bc1c;">Great</a> <a href="" style="color:#555555;">Okay</a> <a href="" style="color:#f10000;">Not Good</a>
|
||||
--}}
|
||||
@if ($thread->source_via == App\Thread::PERSON_USER)
|
||||
{!! $conversation->getSignatureProcessed() !!}
|
||||
<br>{!! $conversation->getSignatureProcessed() !!}
|
||||
<br><br>
|
||||
@endif
|
||||
</div>
|
||||
@ -62,6 +62,13 @@
|
||||
<td height="20"></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (\App\Option::get('email_branding'))
|
||||
<tr>
|
||||
<td height="0" style="font-size:12px; line-height:18px; font-family:Arial,'Helvetica Neue',Helvetica,Tahoma,sans-serif; color: #aaaaaa;">
|
||||
{!! __('Support powered by :app_name — Free open source help desk & shared mailbox', ['app_name' => '<a href="'.Config::get('app.freescout_url').'">'.\Config::get('app.name').'</a>']) !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td height="0" style="font-size: 0px; line-height: 0px; color:#ffffff;">
|
||||
{{-- todo: view tracking --}}
|
||||
|
@ -8,3 +8,7 @@
|
||||
{{-- Html2Text\Html2Text::convert($conversation->mailbox->signature) --}}{{ (new Html2Text\Html2Text($conversation->getSignatureProcessed()))->getText() }}
|
||||
@endif
|
||||
@endforeach
|
||||
@if (\App\Option::get('email_branding'))
|
||||
-----------------------------------------------------------
|
||||
{!! __('Support powered by :app_name — Free open source help desk & shared mailbox', ['app_name' => \Config::get('app.name')]) !!}
|
||||
@endif
|
@ -35,6 +35,25 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('settings[email_branding]') ? ' has-error' : '' }}">
|
||||
<label for="email_branding" class="col-sm-2 control-label">{{ __('Spread the Word', ['app_name' => \Config::get('app.name')]) }}</label>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="controls">
|
||||
<div class="onoffswitch-wrap">
|
||||
<div class="onoffswitch">
|
||||
<input type="checkbox" name="settings[email_branding]" value="{{ App\Mailbox::TEMPLATE_FANCY }}" id="email_branding" class="onoffswitch-checkbox" @if (old('settings[email_branding]', $settings['email_branding']))checked="checked"@endif >
|
||||
<label class="onoffswitch-label" for="email_branding"></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="help-block">
|
||||
{{ __('Add "Powered by :app_name" footer to the outgoing emails to invite more developers to the project and make application better.', ['app_name' => \Config::get('app.name')]) }}
|
||||
</p>
|
||||
@include('partials/field_error', ['field'=>'settings[open_tracking]'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group{{ $errors->has('settings[open_tracking]') ? ' has-error' : '' }}">
|
||||
<label for="open_tracking" class="col-sm-2 control-label">{{ __('Open Tracking') }} (todo)</label>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user