From 627e8ac48090b0a0bc1f93c68d743ae6a4f23ba6 Mon Sep 17 00:00:00 2001 From: FreeScout Date: Fri, 10 Aug 2018 07:28:35 -0700 Subject: [PATCH] Default redirect --- app/Conversation.php | 57 +++++- app/ConversationFolder.php | 11 + .../Controllers/ConversationsController.php | 192 +++++++++--------- app/Http/Controllers/MailboxesController.php | 3 +- app/Http/Controllers/UsersController.php | 2 + app/Mailbox.php | 82 +++++--- app/MailboxUser.php | 8 +- app/Observers/MailboxObserver.php | 8 +- app/Observers/UserObserver.php | 5 +- app/Policies/ConversationPolicy.php | 2 +- app/Policies/MailboxPolicy.php | 4 +- app/User.php | 15 +- config/app.php | 2 +- ...06_29_041002_create_mailbox_user_table.php | 3 + public/css/bootstrap.css | 1 + public/css/style.css | 26 ++- public/img/loader-grey.gif | Bin 0 -> 2608 bytes public/js/main.js | 147 +++++++++++++- public/js/vars.js | 6 +- resources/views/auth/banner.blade.php | 2 +- .../views/auth/passwords/reset.blade.php | 3 + .../editor_bottom_toolbar.blade.php | 52 ++++- resources/views/js/vars.blade.php | 6 +- resources/views/layouts/app.blade.php | 30 +-- .../mailboxes/sidebar_menu_view.blade.php | 2 +- resources/views/mailboxes/view.blade.php | 12 +- resources/views/users/sidebar_menu.blade.php | 7 +- resources/views/users/users.blade.php | 2 +- routes/web.php | 3 + 29 files changed, 500 insertions(+), 193 deletions(-) create mode 100644 app/ConversationFolder.php create mode 100644 public/img/loader-grey.gif diff --git a/app/Conversation.php b/app/Conversation.php index 0d26f13e..43fffec5 100644 --- a/app/Conversation.php +++ b/app/Conversation.php @@ -3,6 +3,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\Facades\Input; class Conversation extends Model { @@ -543,9 +544,15 @@ class Conversation extends Model * * @return string */ - public function url() + public function url($folder_id = null) { - return route('conversations.view', ['id' => $this->id]); + $params = ['id' => $this->id]; + if (!$folder_id) { + $folder_id = self::getCurrentFolder(); + } + $params['folder_id'] = $folder_id; + + return route('conversations.view', $params); } /** @@ -557,4 +564,50 @@ class Conversation extends Model { return self::$status_colors[$this->status]; } + + /** + * Get folder ID from request or use the default one. + */ + public function getCurrentFolder($default_folder_id = null) + { + $folder_id = self::getFolderParam(); + if ($folder_id) { + return $folder_id; + } + if ($this->folder_id) { + return $this->folder_id; + } else { + return $default_folder_id; + } + } + + public static function getFolderParam() + { + if (!empty(request()->folder_id)) { + return request()->folder_id; + } elseif (!empty(Input::get('folder_id'))) { + return Input::get('folder_id'); + } + return ''; + } + + /** + * Check if conversation can be in the folder. + */ + public function isInFolderAllowed($folder) + { + if (in_array($folder->type, Folder::$public_types)) { + return ($folder->id == $this->folder_id); + } elseif ($folder->type == Folder::TYPE_MINE) { + $user = auth()->user(); + if ($user && $user->id == $folder->user_id && $this->user_id == $user->id) { + return true; + } else { + return false; + } + } else { + // todo: check ConversationFolder here + } + return false; + } } diff --git a/app/ConversationFolder.php b/app/ConversationFolder.php new file mode 100644 index 00000000..d4bcf774 --- /dev/null +++ b/app/ConversationFolder.php @@ -0,0 +1,11 @@ +authorize('view', $conversation); + $user = auth()->user(); + // Detect folder - if ($conversation->user_id == auth()->user()->id) { - $folder = $conversation->mailbox->folders()->where('type', Folder::TYPE_MINE)->first(); - } else { - $folder = $conversation->folder; + $folder = null; + if (Conversation::getFolderParam()) { + $folder = $conversation->mailbox->folders()->where('folders.id', Conversation::getFolderParam())->first(); + + // Check if conversation can be located in the passed folder_id + if (!$conversation->isInFolderAllowed($folder)) { + $request->session()->reflash(); + return redirect()->away($conversation->url($conversation->folder_id)); + } } + if (!$folder) { + if ($conversation->user_id == $user->id) { + $folder = $conversation->mailbox->folders()->where('type', Folder::TYPE_MINE)->first(); + } else { + $folder = $conversation->folder; + } + + return redirect()->away($conversation->url($folder->id)); + } + + $after_send = $conversation->mailbox->getUserSettings($user->id)->after_send; + return view('conversations/view', [ 'conversation' => $conversation, 'mailbox' => $conversation->mailbox, @@ -48,6 +69,7 @@ class ConversationsController extends Controller 'threads' => $conversation->threads()->orderBy('created_at', 'desc')->get(), 'folder' => $folder, 'folders' => $conversation->mailbox->getAssesibleFolders(), + 'after_send' => $after_send, ]); } @@ -64,11 +86,14 @@ class ConversationsController extends Controller $folder = $mailbox->folders()->where('type', Folder::TYPE_DRAFTS)->first(); + $after_send = $mailbox->getUserSettings(auth()->user()->id)->after_send; + return view('conversations/create', [ 'conversation' => $conversation, 'mailbox' => $mailbox, 'folder' => $folder, 'folders' => $mailbox->getAssesibleFolders(), + 'after_send' => $after_send, ]); } @@ -89,89 +114,6 @@ class ConversationsController extends Controller ]); } - /** - * Save new conversation. - */ - /*public function createSave($mailbox_id, Request $request) - { - $mailbox = Mailbox::findOrFail($mailbox_id); - $this->authorize('view', $mailbox); - - $validator = Validator::make($request->all(), [ - 'to' => 'required|string', - 'subject' => 'required|string|max:998', - 'body' => 'required|string', - 'cc' => 'nullable|string', - 'bcc' => 'nullable|string', - ]); - - if ($validator->fails()) { - return redirect()->route('conversations.create', ['mailbox_id' => $mailbox_id]) - ->withErrors($validator) - ->withInput(); - } - - $to_array = Conversation::sanitizeEmails($request->to); - - // Check if there are any emails - if (!$to_array) { - return redirect()->route('conversations.create', ['mailbox_id' => $mailbox_id]) - ->withErrors(['to' => __('Incorrect recipients')]) - ->withInput(); - } - - $now = date('Y-m-d H:i:s'); - $customer = Customer::create($to_array[0]); - - $conversation = new Conversation(); - $conversation->type = Conversation::TYPE_EMAIL; - $conversation->status = $request->status; - $conversation->state = Conversation::STATE_PUBLISHED; - $conversation->subject = $request->subject; - $conversation->setCc($request->cc); - $conversation->setBcc($request->bcc); - $conversation->setPreview($request->body); - // todo: attachments - //$conversation->has_attachments = ; - // Set folder id - $conversation->mailbox_id = $mailbox_id; - if ((int)$request->user_id != -1) { - // Check if user has access to the current mailbox - if ($mailbox->userHasAccess($request->user_id)) { - $conversation->user_id = $request->user_id; - } - } - - $conversation->customer_id = $customer->id; - $conversation->created_by_user_id = auth()->user()->id; - $conversation->source_via = Conversation::PERSON_USER; - $conversation->source_type = Conversation::SOURCE_TYPE_WEB; - $conversation->user_updated_at = $now; - $conversation->last_reply_at = $now; - $conversation->last_reply_from = Conversation::PERSON_USER; - $conversation->updateFolder(); - $conversation->save(); - - // Create thread - $thread = new Thread(); - $thread->conversation_id = $conversation->id; - $thread->user_id = auth()->user()->id; - $thread->type = Thread::TYPE_MESSAGE; - $thread->status = $request->status; - $thread->state = Thread::STATE_PUBLISHED; - $thread->body = $request->body; - $thread->setTo($request->to); - $thread->setCc($request->cc); - $thread->setBcc($request->bcc); - $thread->source_via = Thread::PERSON_USER; - $thread->source_type = Thread::SOURCE_TYPE_WEB; - $thread->customer_id = $customer->id; - $thread->created_by_user_id = auth()->user()->id; - $thread->save(); - - return redirect()->route('conversations.view', ['id' => $conversation->id]); - }*/ - /** * Conversations ajax controller. */ @@ -179,7 +121,7 @@ class ConversationsController extends Controller { $response = [ 'status' => 'error', - 'msg' => '', + 'msg' => '', // this is error message ]; $user = auth()->user(); @@ -233,10 +175,10 @@ class ConversationsController extends Controller // Flash $flash_message = __('Assignee updated'); if ($new_user_id != $user->id) { - $flash_message .= ' '.__('View').''; + $flash_message .= ' '.__('View').''; if ($next_conversation) { - $response['redirect_url'] = route('conversations.view', ['id' => $next_conversation->id]); + $response['redirect_url'] = $next_conversation->url(); } else { // Show conversations list $response['redirect_url'] = route('mailboxes.view.folder', ['id' => $conversation->mailbox_id, 'folder_id' => $conversation->folder_id]); @@ -295,10 +237,10 @@ class ConversationsController extends Controller // Flash $flash_message = __('Status updated'); if ($new_status != Conversation::STATUS_ACTIVE) { - $flash_message .= ' '.__('View').''; + $flash_message .= ' '.__('View').''; if ($next_conversation) { - $response['redirect_url'] = route('conversations.view', ['id' => $next_conversation->id]); + $response['redirect_url'] = $next_conversation->url(); } else { // Show conversations list $response['redirect_url'] = route('mailboxes.view.folder', ['id' => $conversation->mailbox_id, 'folder_id' => $conversation->folder_id]); @@ -446,16 +388,70 @@ class ConversationsController extends Controller } $response['status'] = 'success'; - $response['redirect_url'] = route('conversations.view', ['id' => $conversation->id]); - $flash_message = __( - ':%tag_start%Email Sent:%tag_end% :%view_start%View:%a_end% or :%undo_start%Undo:%a_end%', - ['%tag_start%' => '', '%tag_end%' => '', '%view_start%' => ' ', '%a_end%' => ' ', '%undo_start%' => ' '] - ); + // Determine redirect + if (!empty($request->after_send)) { + switch ($request->after_send) { + case MailboxUser::AFTER_SEND_STAY: + default: + $response['redirect_url'] = $conversation->url(); + break; + case MailboxUser::AFTER_SEND_FOLDER: + $response['redirect_url'] = route('mailboxes.view.folder', ['id' => $conversation->mailbox_id, 'folder_id' => $conversation->folder_id]); + break; + case MailboxUser::AFTER_SEND_NEXT: + $next_conversation = $conversation->getNearby(); + if ($next_conversation) { + $response['redirect_url'] = $next_conversation->url(); + } else { + // Show folder + $response['redirect_url'] = route('mailboxes.view.folder', ['id' => $conversation->mailbox_id, 'folder_id' => Conversation::getCurrentFolder($conversation->folder_id)]); + } + break; + } + } else { + // If something went wrong and after_send not set, just show the reply + $response['redirect_url'] = $conversation->url(); + } + + if (!empty($request->after_send) && $request->after_send == MailboxUser::AFTER_SEND_STAY) { + // Message without View link + $flash_message = __( + ':%tag_start%Email Sent:%tag_end% :%undo_start%Undo:%a_end%', + ['%tag_start%' => '', '%tag_end%' => '', '%view_start%' => ' ', '%a_end%' => ' ', '%undo_start%' => ' '] + ); + } else { + $flash_message = __( + ':%tag_start%Email Sent:%tag_end% :%view_start%View:%a_end% or :%undo_start%Undo:%a_end%', + ['%tag_start%' => '', '%tag_end%' => '', '%view_start%' => ' ', '%a_end%' => ' ', '%undo_start%' => ' '] + ); + } \Session::flash('flash_success_floating', $flash_message); } break; + + // Save default redirect + case 'save_after_send': + $mailbox = Mailbox::find($request->mailbox_id); + if (!$mailbox) { + $response['msg'] .= __('Mailbox not found'); + } elseif (!$mailbox->userHasAccess($user->id)) { + $response['msg'] .= __('Action not authorized'); + } + if (!$response['msg']) { + $mailbox_user = $user->mailboxes()->where('mailbox_id', $request->mailbox_id)->first(); + if (!$mailbox_user) { + $mailbox_user = new MailboxUser(); + $mailbox_user->mailbox_id = $mailbox->id; + $mailbox_user->user_id = $user->id; + } + $mailbox_user->settings->after_send = $request->value; + $mailbox_user->settings->save(); + + $response['status'] = 'success'; + } + break; default: $response['msg'] = 'Unknown action'; break; diff --git a/app/Http/Controllers/MailboxesController.php b/app/Http/Controllers/MailboxesController.php index 170b0358..5c413e7c 100644 --- a/app/Http/Controllers/MailboxesController.php +++ b/app/Http/Controllers/MailboxesController.php @@ -277,7 +277,8 @@ class MailboxesController extends Controller if ($folder->type == Folder::TYPE_MINE) { // Get conversations from personal folder - $query_conversations = Conversation::where('user_id', $user->id); + $query_conversations = Conversation::where('user_id', $user->id) + ->whereIn('status', [Conversation::STATUS_ACTIVE, Conversation::STATUS_PENDING]); } elseif ($folder->type == Folder::TYPE_ASSIGNED) { // Assigned - do not show my conversations $query_conversations = $folder->conversations()->where('user_id', '<>', $user->id); diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 1375d0fe..57a3a4a3 100644 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -6,6 +6,7 @@ use App\Mailbox; use App\Subscription; use App\User; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Hash; use Illuminate\Validation\Rule; use Validator; @@ -75,6 +76,7 @@ class UsersController extends Controller if (!empty($request->send_invite)) { $password = $user->generatePassword(); } + $user->password = Hash::make($user->password); $user->save(); diff --git a/app/Mailbox.php b/app/Mailbox.php index d402013d..cce99012 100644 --- a/app/Mailbox.php +++ b/app/Mailbox.php @@ -2,6 +2,7 @@ namespace App; +use App\MailboxUser; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\Hash; @@ -107,7 +108,7 @@ class Mailbox extends Model */ public function users() { - return $this->belongsToMany('App\User'); + return $this->belongsToMany('App\User')->as('settings')->withPivot('after_send');; } /** @@ -131,36 +132,40 @@ class Mailbox extends Model * * @param mixed $users */ - public function syncPersonalFolders($users) + public function syncPersonalFolders($users = null) { - if (is_array($users)) { + if (!empty($users) && is_array($users)) { $user_ids = $users; } else { - $user_ids = $this->users()->pluck('id')->toArray(); + $user_ids = $this->users()->pluck('users.id')->toArray(); } // Add admins $admin_user_ids = User::where('role', User::ROLE_ADMIN)->pluck('id')->toArray(); $user_ids = array_merge($user_ids, $admin_user_ids); + self::createUsersFolders($user_ids, $this->id, Folder::$personal_types); + } + + /** + * Created folders of specific type for passed users. + */ + public static function createUsersFolders($user_ids, $mailbox_id, $folder_types) + { $cur_users = Folder::select('user_id') - ->where('mailbox_id', $this->id) + ->where('mailbox_id', $mailbox_id) ->whereIn('user_id', $user_ids) ->groupBy('user_id') ->pluck('user_id') ->toArray(); - // $new_users = Mailbox::whereDoesntHave('folders', function ($query) { - // $query->where('mailbox_id', $this->id); - // $query->whereNotIn('user_id', $user_ids); - // })->get(); foreach ($user_ids as $user_id) { if (in_array($user_id, $cur_users)) { continue; } - foreach (Folder::$personal_types as $type) { + foreach ($folder_types as $type) { $folder = new Folder(); - $folder->mailbox_id = $this->id; + $folder->mailbox_id = $mailbox_id; $folder->user_id = $user_id; $folder->type = $type; $folder->save(); @@ -168,28 +173,30 @@ class Mailbox extends Model } } + public function createPublicFolders() + { + foreach (Folder::$public_types as $type) { + $folder = new Folder(); + $folder->mailbox_id = $this->id; + $folder->type = $type; + $folder->save(); + } + } + public function createAdminPersonalFolders() { $user_ids = User::where('role', User::ROLE_ADMIN)->pluck('id')->toArray(); + self::createUsersFolders($user_ids, $this->id, Folder::$personal_types); + } - $cur_users = Folder::select('user_id') - ->where('mailbox_id', $this->id) - ->whereIn('user_id', $user_ids) - ->groupBy('user_id') - ->pluck('user_id') - ->toArray(); - - foreach ($user_ids as $user_id) { - if (in_array($user_id, $cur_users)) { - continue; - } - foreach (Folder::$personal_types as $type) { - $folder = new Folder(); - $folder->mailbox_id = $this->id; - $folder->user_id = $user_id; - $folder->type = $type; - $folder->save(); - } + public static function createAdminPersonalFoldersAllMailboxes($user_ids = null) + { + if (empty($user_ids)) { + $user_ids = User::where('role', User::ROLE_ADMIN)->pluck('id')->toArray(); + } + $mailbox_ids = Mailbox::pluck('id'); + foreach ($mailbox_ids as $mailbox_id) { + self::createUsersFolders($user_ids, $mailbox_id, Folder::$personal_types); } } @@ -407,4 +414,21 @@ class Mailbox extends Model { return self::$in_protocols[$this->in_protocol]; } + + /** + * Get pivot table parameters for the user. + */ + public function getUserSettings($user_id) + { + $mailbox_user = $this->users()->where('users.id', $user_id)->first(); + if ($mailbox_user) { + return $mailbox_user->settings; + } else { + // Admin may have no record in mailbox_user table + // Create dummy object with default parameters + $settings = new \StdClass(); + $settings->after_send = MailboxUser::AFTER_SEND_NEXT; + return $settings; + } + } } diff --git a/app/MailboxUser.php b/app/MailboxUser.php index 7ee9fe8b..9c560ced 100644 --- a/app/MailboxUser.php +++ b/app/MailboxUser.php @@ -6,5 +6,11 @@ use Illuminate\Database\Eloquent\Model; class MailboxUser extends Model { - protected $table = 'mailbox_user'; + // Action after sending a message + const AFTER_SEND_STAY = 1; + const AFTER_SEND_NEXT = 2; + const AFTER_SEND_FOLDER = 3; + + protected $table = 'mailbox_user'; + public $timestamps = false; } diff --git a/app/Observers/MailboxObserver.php b/app/Observers/MailboxObserver.php index 6d4627cf..cac5da33 100644 --- a/app/Observers/MailboxObserver.php +++ b/app/Observers/MailboxObserver.php @@ -17,12 +17,8 @@ class MailboxObserver public function created(Mailbox $mailbox) { // Create folders - foreach (Folder::$public_types as $type) { - $folder = new Folder(); - $folder->mailbox_id = $mailbox->id; - $folder->type = $type; - $folder->save(); - } + $mailbox->createPublicFolders(); + $mailbox->syncPersonalFolders(); $mailbox->createAdminPersonalFolders(); } diff --git a/app/Observers/UserObserver.php b/app/Observers/UserObserver.php index 0c47a721..1a16697d 100644 --- a/app/Observers/UserObserver.php +++ b/app/Observers/UserObserver.php @@ -2,6 +2,7 @@ namespace App\Observers; +use App\Mailbox; use App\Subscription; use App\User; @@ -14,7 +15,9 @@ class UserObserver */ public function created(User $user) { - // We can not create user folders here, as user is not connected to mailboxes yet + // We can not create folders for regular users here, as user is not connected to mailboxes yet + // But we can create admin personal folders + Mailbox::createAdminPersonalFoldersAllMailboxes(); // Add default subscriptions Subscription::addDefaultSubscriptions($user->id); diff --git a/app/Policies/ConversationPolicy.php b/app/Policies/ConversationPolicy.php index 099069b8..4eaeda75 100644 --- a/app/Policies/ConversationPolicy.php +++ b/app/Policies/ConversationPolicy.php @@ -23,7 +23,7 @@ class ConversationPolicy if ($user->isAdmin()) { return true; } else { - if ($conversation->mailbox()->users->contains($user)) { + if ($conversation->mailbox->users->contains($user)) { return true; } else { return false; diff --git a/app/Policies/MailboxPolicy.php b/app/Policies/MailboxPolicy.php index 5cdf2d2b..fc42d1f8 100644 --- a/app/Policies/MailboxPolicy.php +++ b/app/Policies/MailboxPolicy.php @@ -33,12 +33,12 @@ class MailboxPolicy * * @return mixed */ - public function view(User $user) + public function view(User $user, Mailbox $mailbox) { if ($user->isAdmin()) { return true; } else { - if ($mailbox()->users->contains($user)) { + if ($mailbox->users->contains($user)) { return true; } else { return false; diff --git a/app/User.php b/app/User.php index 471f2b25..77b91150 100644 --- a/app/User.php +++ b/app/User.php @@ -86,7 +86,7 @@ class User extends Authenticatable */ public function mailboxes() { - return $this->belongsToMany('App\Mailbox'); + return $this->belongsToMany('App\Mailbox')->as('settings')->withPivot('after_send'); } /** @@ -166,7 +166,7 @@ class User extends Authenticatable if ($this->isAdmin()) { return Mailbox::all(); } else { - $this->mailboxes; + return $this->mailboxes; } } @@ -202,10 +202,15 @@ class User extends Authenticatable */ public function syncPersonalFolders($mailboxes) { - if (is_array($mailboxes)) { - $mailbox_ids = $mailboxes; + if ($this->isAdmin()) { + // For admin we get all mailboxes + $mailbox_ids = Mailbox::pluck('mailboxes.id'); } else { - $mailbox_ids = $this->mailboxes()->pluck('mailboxes.id'); + if (is_array($mailboxes)) { + $mailbox_ids = $mailboxes; + } else { + $mailbox_ids = $this->mailboxes()->pluck('mailboxes.id'); + } } $cur_mailboxes = Folder::select('mailbox_id') diff --git a/config/app.php b/config/app.php index cedd01da..0f5a022a 100644 --- a/config/app.php +++ b/config/app.php @@ -166,7 +166,7 @@ return [ | PHP extensions required by the app |------------------------------------------------------------------------- */ - 'required_extensions' => ['mysql / mysqli', 'mbstring', 'xml', 'imap', 'mcrypt'/*, 'openssl', 'dom', 'xmlwriter', 'tokenizer', 'json', 'libxml', 'phar'*/], + 'required_extensions' => ['mysql / mysqli', 'mbstring', 'xml', 'imap', 'mcrypt', 'json', 'openssl', 'tokenizer'/*, 'dom', 'xmlwriter', 'tokenizer', 'libxml', 'phar'*/], /* |-------------------------------------------------------------------------- diff --git a/database/migrations/2018_06_29_041002_create_mailbox_user_table.php b/database/migrations/2018_06_29_041002_create_mailbox_user_table.php index a19c2948..a7eb778c 100644 --- a/database/migrations/2018_06_29_041002_create_mailbox_user_table.php +++ b/database/migrations/2018_06_29_041002_create_mailbox_user_table.php @@ -1,5 +1,6 @@ increments('id'); $table->integer('mailbox_id'); $table->integer('user_id'); + + $table->unsignedTinyInteger('after_send')->default(MailboxUser::AFTER_SEND_NEXT); }); } diff --git a/public/css/bootstrap.css b/public/css/bootstrap.css index b9f0e67e..7a2b5c0a 100644 --- a/public/css/bootstrap.css +++ b/public/css/bootstrap.css @@ -5960,6 +5960,7 @@ button.close { .modal-title { margin: 0; line-height: 1.42857143; + font-weight: normal; } .modal-body { position: relative; diff --git a/public/css/style.css b/public/css/style.css index 8b3b228c..35a6c6c2 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1406,6 +1406,7 @@ table.table-conversations td.conv-attachment { } .conv-new-form { padding-top: 15px; + padding-bottom: 150px; } .conv-new-form .form-group { margin-bottom: 10px; @@ -1742,6 +1743,27 @@ table.table-conversations td.conv-attachment { font-size: 14px; } +/** + * Modal + */ +.modal-header { + cursor: default; +} +.modal .close { + opacity: 0.7; +} +.modal-body { + min-height: 150px; +} +.modal-loader img { + position: absolute; + top: 50%; + height: 31px; + margin-top: -15px; +} +.modal-body p.help-block { + font-size: 11.4px; +} /** * Misc @@ -2005,8 +2027,8 @@ a.help-icon:hover { width: 100%; height: 100%; z-index: 9999; - background: url('../img/loader-main.gif') 50% 50% no-repeat transparent; - opacity: 0.85; + background: url('../img/loader-main.gif') 50% 50% no-repeat #fff; + opacity: 0.55; filter: alpha(opacity=85); /* For IE8 and earlier */ } a.text-danger, diff --git a/public/img/loader-grey.gif b/public/img/loader-grey.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c12c21fcb05ccbc90eb90202c96fb4578f8066d GIT binary patch literal 2608 zcmdVcdr(tX9tZGCZgP`cV{Tp-NWvpvKt|wv@-B&^pMYg=krz)&_+_N{pyjc|;8*19IJuz|8@Xac3z#I4;0G5`P005Yqn;RP&>+S9B=;&x_YO>jE27{r#zTR%P zTdh{TUf`T5Ma4#l}?>0I+(4~ic~qOyf^o%GJ~@BX!Zg=&&UAm z+}USoRYG)1G8QS14h;$cU7SlBmJhUy06}sZEy`A?|oBLVej0 z{z`KDk;1@TJv%DaZru@bU9(YON(Ti`4DSo!U;&V?$SOb&u1bRU(u)*K1ZDvwH@-l7 zk^x6$7Sq`rl@RhQQIk{hfrbOS@~M(kHJf_?`)brZ5q+td(cY#P4vfnwNl>m$%KJ){OneHJ4@0=g9!DrUy~?1lPl zRal?ki+4uXzL6}p=jbT6S+UU~ z7G>+Qo12-ER3)3M!@N8{Mm+$M=FF!U)Po`*{-*&9(M|^9|hccTp|4A zL~jpoW@1WtZ-RwyyX%1Q_*)JHPq^x+QYL;r!O_SwRHtj-l(YrX5?b}O<_b5T`YGKa z4`#XemQ1B5nTFWnw*~xk?ih8%y}DX3d^&^5lx--mbnc_aFb7MkZH;BA4*MxakR#7C zuDj(L_vJ|EeR_VcNdFt4{clD6yN{ZYjs2)|TtQALs?EvPybk;z!#$&|W^2rD-HY;kGHTWf>dB6Btm4D(K*=2tW zO-GMV81(Y?pWYeyS8r70)$t+jG^%NpP(k76x<#FzrBXs!A8VZXGVT9qWrRr zcUDZb#GhC$`Efo%VP!A%;sLa^{& z5xwRf3cQfX$s_swIkA2BZmBBGGM6Mi>>C)J*7=Yb9lDwp*9AUw)cz*NYB{>*YN|W; zrQp%nbG~h7qjyUy1623LwmQ*@6ZL0KzZZwN!Yj>|vapX>r`RAeI((Vq?bPbPy_a_$ z@!gtP=xqP`u5?iH#LzoQ3tr4m%POD)tM^C2j2(blz;}}`x0^PLu?r*Dp`MUX#bF=Q zk}+xl;B^4lRgezQa@pLECEOORGrzOO~DVbTvNx%H!PE(OYE zjY?R#(DbNHJ2gF{-FC-5p^eWSnI6wJYlo(9>`d$*9n5VUmL#uN1a0mGTB;uCZ?E6n z1%%@@B2q|F3*;BRDT;k1i0KvZB&>bRFX(jB-$sWjS
+ + @include('auth/banner') +
Reset Password
diff --git a/resources/views/conversations/editor_bottom_toolbar.blade.php b/resources/views/conversations/editor_bottom_toolbar.blade.php index f14413c4..dafd5859 100644 --- a/resources/views/conversations/editor_bottom_toolbar.blade.php +++ b/resources/views/conversations/editor_bottom_toolbar.blade.php @@ -1,3 +1,5 @@ +@section('body_attrs')@parent data-mailbox_id="{{ $mailbox->id }}"@endsection +
diff --git a/resources/views/js/vars.blade.php b/resources/views/js/vars.blade.php index 102e68eb..a21903c2 100644 --- a/resources/views/js/vars.blade.php +++ b/resources/views/js/vars.blade.php @@ -9,7 +9,7 @@ */ {{-- Global vars for JS. Set in /app/Console/Commands/GenerateJs.php --}} var Vars = { - + public_url: '{{ url('/') }}' }; {{-- @@ -27,7 +27,9 @@ var lang_messages = { "upload_attachments": "{{ __("Upload Attachments") }}", "saved_replies": "{{ __("Saved Replies") }}", "save_draft": "{{ __("Save Draft") }}", - "discard": "{{ __("Discard") }}" + "discard": "{{ __("Discard") }}", + "close": "{{ __("Close") }}", + "settings_saved": "{{ __("Settings saved") }}" }@if (!$loop->last),@endif @endforeach }; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index fafcc968..9b580f74 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -17,7 +17,7 @@
- @if (!in_array(Route::currentRouteName(), array('login', 'register'))) + @if (Auth::user())
diff --git a/routes/web.php b/routes/web.php index a80d593e..dcaa93e7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -15,6 +15,9 @@ Auth::routes(); +// Redirects +Route::redirect('/home', '/', 301); + // Public routes // General routes for logged in users