diff --git a/.env.example b/.env.example
index 2b9ca45e..7b16e765 100644
--- a/.env.example
+++ b/.env.example
@@ -40,4 +40,7 @@ SERVER_PRODUCTION_KEYPHRASE=dummy
SERVER_PRODUCTION_ROOT=dummy
# BUGSNAG
-BUGSNAG_API_KEY=dummy
\ No newline at end of file
+BUGSNAG_API_KEY=dummy
+
+# HELPSCOUT
+HELPSCOUT_CONTACT_FORM=dummy
diff --git a/.gitignore b/.gitignore
index a3f28976..e10fa7ed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,4 +16,5 @@ tests/integration/IntegrationTester.php
tests/search/SearchTester.php
tests/unit/UnitTester.php
Thumbs.db
-vendor
\ No newline at end of file
+updateEnv.sh
+vendor
diff --git a/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php b/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php
index d6353202..e832a003 100644
--- a/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php
+++ b/app/TeenQuotes/AdminPanel/AdminPanelServiceProvider.php
@@ -12,6 +12,7 @@
namespace TeenQuotes\AdminPanel;
use Illuminate\Support\ServiceProvider;
+use TeenQuotes\AdminPanel\Helpers\Moderation;
class AdminPanelServiceProvider extends ServiceProvider
{
@@ -33,13 +34,15 @@ public function register()
private function registerRoutes()
{
- $this->app['router']->pattern('decision', 'approve|unapprove|alert');
+ $this->app['router']->pattern('decision', Moderation::presentAvailableTypes());
- $this->app['router']->group($this->getRouteGroupParams(), function () {
- $this->app['router']->get('/', ['uses' => $this->getController().'@index', 'as' => 'admin.quotes.index']);
- $this->app['router']->get('edit/{quote_id}', ['uses' => $this->getController().'@edit', 'as' => 'admin.quotes.edit']);
- $this->app['router']->put('update/{quote_id}', ['uses' => $this->getController().'@update', 'as' => 'admin.quotes.update']);
- $this->app['router']->post('moderate/{quote_id}/{decision}', ['uses' => $this->getController().'@postModerate', 'as' => 'admin.quotes.moderate']);
+ $controller = $this->getController();
+
+ $this->app['router']->group($this->getRouteGroupParams(), function () use ($controller) {
+ $this->app['router']->get('/', ['uses' => $controller.'@index', 'as' => 'admin.quotes.index']);
+ $this->app['router']->get('edit/{quote_id}', ['uses' => $controller.'@edit', 'as' => 'admin.quotes.edit']);
+ $this->app['router']->put('update/{quote_id}', ['uses' => $controller.'@update', 'as' => 'admin.quotes.update']);
+ $this->app['router']->post('moderate/{quote_id}/{decision}', ['uses' => $controller.'@postModerate', 'as' => 'admin.quotes.moderate']);
});
}
diff --git a/app/TeenQuotes/AdminPanel/Helpers/Moderation.php b/app/TeenQuotes/AdminPanel/Helpers/Moderation.php
index a78bd4e6..538ebf9e 100644
--- a/app/TeenQuotes/AdminPanel/Helpers/Moderation.php
+++ b/app/TeenQuotes/AdminPanel/Helpers/Moderation.php
@@ -69,7 +69,7 @@ public static function getAvailableTypes()
*
* @return string
*/
- private function presentAvailableTypes()
+ public static function presentAvailableTypes()
{
return implode('|', self::getAvailableTypes());
}
diff --git a/app/TeenQuotes/Pages/Controllers/ContactController.php b/app/TeenQuotes/Pages/Controllers/ContactController.php
index ab0ae87e..59fc5358 100644
--- a/app/TeenQuotes/Pages/Controllers/ContactController.php
+++ b/app/TeenQuotes/Pages/Controllers/ContactController.php
@@ -11,6 +11,7 @@
namespace TeenQuotes\Pages\Controllers;
+use Auth;
use BaseController;
use Lang;
use LaraSetting;
@@ -21,16 +22,17 @@ class ContactController extends BaseController
public function index()
{
$data = [
- 'chooseYourWeapon' => Lang::get('contact.chooseYourWeapon'),
- 'contactTitle' => Lang::get('contact.contactTitle'),
- 'emailAddress' => Lang::get('contact.emailAddress'),
- 'pageDescription' => Lang::get('contact.pageDescription'),
- 'pageTitle' => Lang::get('contact.pageTitle'),
- 'stayInTouchContent' => Lang::get('contact.stayInTouchContent'),
- 'stayInTouchTitle' => Lang::get('contact.stayInTouchTitle'),
- 'teamMembers' => LaraSetting::get('team'),
- 'teamTitle' => Lang::get('contact.teamTitle'),
- 'twitterAccount' => Lang::get('layout.twitterUsername'),
+ 'chooseYourWeapon' => Lang::get('contact.chooseYourWeapon'),
+ 'contactTitle' => Lang::get('contact.contactTitle'),
+ 'emailAddress' => Lang::get('contact.emailAddress'),
+ 'pageDescription' => Lang::get('contact.pageDescription'),
+ 'pageTitle' => Lang::get('contact.pageTitle'),
+ 'stayInTouchContent' => Lang::get('contact.stayInTouchContent'),
+ 'stayInTouchTitle' => Lang::get('contact.stayInTouchTitle'),
+ 'teamMembers' => LaraSetting::get('team'),
+ 'teamTitle' => Lang::get('contact.teamTitle'),
+ 'twitterAccount' => Lang::get('layout.twitterUsername'),
+ 'user' => Auth::user(),
];
// Add description for each team member
diff --git a/app/config/app.php b/app/config/app.php
index ae19cff1..5940693b 100644
--- a/app/config/app.php
+++ b/app/config/app.php
@@ -262,7 +262,7 @@
'comments.nbCommentsPerPage' => 10,
- 'quotes.nbQuotesToPublishPerDay' => 5,
+ 'quotes.nbQuotesToPublishPerDay' => 3,
'quotes.nbQuotesPerPage' => 10,
@@ -275,7 +275,7 @@
'newsletters.nbQuotesToSendDaily' => 2,
- 'users.avatar.default' => 'http://teen-quotes.com/assets/images/chat.png',
+ 'users.avatar.default' => 'https://account.teen-quotes.com/assets/images/chat.png',
'users.avatarPath' => 'uploads/avatar',
'users.avatarWidth' => 200,
'users.avatarHeight' => 200,
diff --git a/app/config/services.php b/app/config/services.php
index d4a76e20..4892742d 100644
--- a/app/config/services.php
+++ b/app/config/services.php
@@ -51,4 +51,8 @@
'apiKey' => getenv('PUSHBULLET_APIKEY'),
'deviceIden' => getenv('PUSHBULLET_DEVICE_IDEN'),
],
+
+ 'helpscout' => [
+ 'form_id' => getenv('HELPSCOUT_CONTACT_FORM'),
+ ],
];
diff --git a/app/lang/en/contact.php b/app/lang/en/contact.php
index b7b6e64e..8bad7f7f 100644
--- a/app/lang/en/contact.php
+++ b/app/lang/en/contact.php
@@ -10,17 +10,18 @@
*/
return [
- 'pageTitle' => 'Contact | '.Lang::get('layout.nameWebsite'),
- 'pageDescription' => 'Contact the team. Say hi, report a bug or propose a feature!',
+ 'chooseYourWeapon' => 'Choose your weapon',
'contactTitle' => 'Contact us',
- 'teamTitle' => 'Our team',
- 'stayInTouchTitle' => 'Stay in touch',
- 'stayInTouchContent' => 'We are very concerned by you, our visitors. You are our top priority and this is the reason why we will be very happy to hear from you!
You have an idea? A suggestion? Something seems to be broken on the website? You want to show us your love? You want to drink a beer with us?
We will be very happy to answer to your message. Here are a few informations if you wish to contact us, by hook or by crook (but we do not accept carrier pigeons).',
'emailAddress' => 'support@'.Config::get('app.domain'),
- 'chooseYourWeapon' => 'Choose your weapon',
- 'teamDescriptionClara' => 'Clara is in charge of the Twitter account. She loves life. Since 2009 she tweets everyday to inspire us! Thanks to her we have build the '.Lang::get('layout.nameWebsite').' web suite.',
+ 'helpscoutInfo' => 'We will get back to you shortly!',
+ 'pageDescription' => 'Contact the team. Say hi, report a bug or propose a feature!',
+ 'pageTitle' => 'Contact | '.Lang::get('layout.nameWebsite'),
+ 'stayInTouchContent' => 'We are very concerned by you, our visitors. You are our top priority and this is the reason why we will be very happy to hear from you!
You have an idea? A suggestion? Something seems to be broken on the website? You want to show us your love? You want to drink a beer with us?
We will be very happy to answer to your message. Here are a few informations if you wish to contact us, by hook or by crook (but we do not accept carrier pigeons).',
+ 'stayInTouchTitle' => 'Stay in touch',
'teamDescriptionAntoine' => 'Antoine is the lead developer. He likes when servers respond fast and when everything work as expected. He is always happy to have an impact on your life. He works hard to make things easy for you.',
- 'teamDescriptionMaxime' => 'Maxime is the iOS developer. Thanks to him you have '.Lang::get('layout.nameWebsite').' in your pocket, one tap away! He hates Antoine because he designs difficult-to-understand systems.',
+ 'teamDescriptionClara' => 'Clara is in charge of the Twitter account. She loves life. Since 2009 she tweets everyday to inspire us! Thanks to her we have build the '.Lang::get('layout.nameWebsite').' web suite.',
'teamDescriptionJonathan' => 'Jonathan is the designer. Usually, Antoine designs something ugly and Jonathan makes it pretty. If you like the design then you will love Jonathan. And everybody loves Jonathan!',
+ 'teamDescriptionMaxime' => 'Maxime is the iOS developer. Thanks to him you have '.Lang::get('layout.nameWebsite').' in your pocket, one tap away! He hates Antoine because he designs difficult-to-understand systems.',
'teamDescriptionMichel' => 'Michel is the tester. If something is not working or could be improved, he will find it for sure. A lot of software work thanks to him!',
+ 'teamTitle' => 'Our team',
];
diff --git a/ressources/views/contact/show.blade.php b/ressources/views/contact/show.blade.php
index 1a8b28ea..6f8dd049 100644
--- a/ressources/views/contact/show.blade.php
+++ b/ressources/views/contact/show.blade.php
@@ -4,15 +4,15 @@