├── public ├── favicon.ico ├── partials │ └── modal │ │ ├── ad-placement-buy-step4.html │ │ ├── ad-placement-buy-step12.html │ │ ├── ad-placement-buy-step13.html │ │ ├── ad-placement-buy-step14.html │ │ ├── ad-placement-buy-step11.html │ │ ├── ad-placement-offer-delete.html │ │ ├── ad-placement-buy-step6.html │ │ └── ad-placement-buy-step8.html ├── robots.txt ├── img │ └── covers │ │ ├── medias │ │ ├── major-8.jpg │ │ ├── original.5240.demi.jpg │ │ └── daxueconsulting-china-fashion-magazines-.jpg │ │ └── templates │ │ ├── formats-A4-1.png │ │ ├── formats-A4-2.png │ │ ├── formats-A4-3.png │ │ ├── formats-A4-4.png │ │ ├── formats-A4-5.png │ │ ├── formats-A4-6.png │ │ ├── formats-A4-7.png │ │ ├── formats-A4-8.png │ │ ├── formats-A4-9.png │ │ ├── format-A4-italienne-1.png │ │ ├── format-A4-italienne-2.png │ │ └── format-A4-italienne-3.png └── .htaccess ├── database ├── seeds │ ├── .gitkeep │ ├── TargetSeeder.php │ ├── ThemeSeeder.php │ ├── SupportSeeder.php │ ├── CategorySeeder.php │ ├── FormatSeeder.php │ ├── SelectionSeeder.php │ ├── BroadcastingAreaSeeder.php │ ├── TemplateSeeder.php │ ├── OfferSeeder.php │ ├── AuctionSeeder.php │ ├── AdminSeeder.php │ ├── BookingSeeder.php │ ├── DatabaseSeeder.php │ ├── FrequencySeeder.php │ └── TechnicalSupportSeeder.php ├── migrations │ ├── .gitkeep │ ├── 2016_05_15_225714_create_password_resets_table.php │ ├── 2016_05_15_225906_create_frequency_table.php │ ├── 2016_05_15_225926_create_target_table.php │ ├── 2016_05_15_225927_create_support_table.php │ ├── 2016_05_15_225853_create_broadcasting_area_table.php │ ├── 2016_05_16_000835_create_template_table.php │ ├── 2016_05_16_000856_create_news_category_table.php │ ├── 2016_05_15_235319_create_technical_support_table.php │ ├── 2016_05_15_225836_create_admin_table.php │ ├── 2016_05_15_225955_create_format_table.php │ ├── 2016_05_15_225937_create_theme_table.php │ ├── 2016_05_15_235305_create_invoice_table.php │ ├── 2016_05_15_230219_create_category_table.php │ └── 2016_05_15_225819_create_user_table.php └── .gitignore ├── storage ├── .gitignore ├── app │ └── .gitignore ├── debugbar │ └── .gitignore ├── logs │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── bootstrap └── cache │ └── .gitignore ├── resources ├── views │ ├── main │ │ ├── emails │ │ │ └── signup-validation.twig │ │ ├── account │ │ │ ├── ad_placements_canceling.twig │ │ │ ├── index.twig │ │ │ ├── ad_placements_selection.twig │ │ │ ├── ad_placements_valid.twig │ │ │ └── ad_placements_pending.twig │ │ ├── modals │ │ │ ├── account_update_confirmation.twig │ │ │ ├── password_reset_success.twig │ │ │ ├── signup_confirmation.twig │ │ │ ├── password_reset.twig │ │ │ └── signup_starter.twig │ │ ├── ad_placement │ │ │ └── show.twig │ │ ├── layout │ │ │ └── layout-account.twig │ │ └── auth │ │ │ └── signup.twig │ ├── admin │ │ ├── index.twig │ │ └── auth │ │ │ └── login.twig │ ├── ad_network │ │ ├── home.twig │ │ ├── macros │ │ │ └── nav.twig │ │ └── modals │ │ │ └── signup_confirmation.twig │ ├── emails │ │ ├── ad-network-subscription-alert.twig │ │ ├── offer-canceled.twig │ │ ├── contact.twig │ │ ├── ad-network-subscription.twig │ │ ├── buyer-subscription-accepted.twig │ │ ├── buyer-subscription.twig │ │ ├── password-reset-confirmation.twig │ │ ├── password-reset-process.twig │ │ ├── ad-placement-published-confirmation.twig │ │ ├── buyer-subscription-alert.twig │ │ ├── ad-placement-share.twig │ │ └── offer-confirmed.twig │ └── errors │ │ ├── 503.twig │ │ └── 404.twig ├── assets │ ├── im │ │ ├── book.png │ │ ├── file.png │ │ ├── laptop.png │ │ ├── logo.png │ │ ├── shop.png │ │ ├── bckg-footer.png │ │ ├── emails │ │ │ ├── fb.png │ │ │ ├── button.png │ │ │ ├── footer.png │ │ │ ├── twitter.png │ │ │ ├── google-plus.png │ │ │ └── mailing-header.png │ │ ├── img-default.jpg │ │ ├── img-display.jpg │ │ ├── img-press.png │ │ ├── icons │ │ │ ├── favicon.png │ │ │ ├── appleicon.png │ │ │ └── opengraph.jpg │ │ ├── logo-invoice.png │ │ ├── mise-en-ligne.png │ │ ├── home-mediaresa.jpg │ │ ├── mediaresa-phone.jpg │ │ └── corporate-header-picture.jpg │ ├── js │ │ ├── mediaresa.js │ │ ├── app │ │ │ ├── directives │ │ │ │ └── ad-placement.js │ │ │ └── controllers │ │ │ │ ├── ad-placement-buy-modal-step3.js │ │ │ │ ├── ad-placement-buy-modal-step9.js │ │ │ │ ├── ad-placement-offer-delete-modal.js │ │ │ │ ├── contact-modal.js │ │ │ │ ├── ad-placement-buy-modal-step5.js │ │ │ │ ├── ad-placement-buy-modal-step14.js │ │ │ │ ├── ad-placement-share-modal.js │ │ │ │ └── ad-placement-buy-modal-step7.js │ │ ├── components │ │ │ ├── target_autocomplete.js │ │ │ ├── format_autocomplete.js │ │ │ ├── broadcasting_area_autocomplete.js │ │ │ ├── media_autocomplete.js │ │ │ ├── ad_network_autocomplete.js │ │ │ ├── ad_network_update_autocomplete.js │ │ │ ├── broadcasting_area_update_autocomplete.js │ │ │ ├── media_update_autocomplete.js │ │ │ ├── user_autocomplete.js │ │ │ ├── ad_network_user_autocomplete.js │ │ │ ├── format_update_autocomplete.js │ │ │ ├── theme_autocomplete.js │ │ │ ├── category_autocomplete.js │ │ │ ├── theme_update_autocomplete.js │ │ │ └── target_update_autocomplete.js │ │ └── jquery-btn-ajax.js │ ├── scss │ │ ├── _custom-variables.scss │ │ ├── _search.scss │ │ ├── _reset.scss │ │ ├── _legals.scss │ │ ├── _view-faq.scss │ │ ├── _view-home.scss │ │ ├── _colors.scss │ │ └── _shame.scss │ ├── fonts │ │ ├── mediaresa-font.eot │ │ ├── mediaresa-font.ttf │ │ └── mediaresa-font.woff │ └── less │ │ └── ranch │ │ └── less │ │ ├── navtabs.less │ │ └── login.less └── lang │ └── en │ ├── pagination.php │ └── passwords.php ├── app ├── Events │ ├── Event.php │ ├── OfferWasDone.php │ ├── AuctionWasWon.php │ ├── BookingWasDone.php │ ├── BuyerPasswordResetWasDone.php │ ├── BuyerSubscriptionWasAccepted.php │ ├── AdNetworkPasswordResetWasDone.php │ ├── AdPlacementWasPublished.php │ ├── OfferWasAccepted.php │ ├── DebitWasConfirmed.php │ ├── BuyerPasswordResetWasAsked.php │ ├── AuctionWasDone.php │ ├── BuyerSubscriptionWasDone.php │ ├── OfferWasCanceled.php │ ├── AdNetworkPasswordResetWasAsked.php │ ├── AdNetworkSubscriptionWasDone.php │ ├── AdPlacementWasShared.php │ └── ContactSend.php ├── Commands │ └── Command.php ├── Http │ ├── Requests │ │ ├── Request.php │ │ ├── Main │ │ │ ├── ShareAdPlacementRequest.php │ │ │ ├── ContactRequest.php │ │ │ ├── UpdateBuyerRequest.php │ │ │ └── ResetPasswordRequest.php │ │ ├── Admin │ │ │ ├── StoreThemeRequest.php │ │ │ ├── UpdateThemeRequest.php │ │ │ ├── StoreSupportRequest.php │ │ │ ├── StoreTargetRequest.php │ │ │ ├── UpdateTargetRequest.php │ │ │ ├── UpdateSupportRequest.php │ │ │ ├── StoreCategoryRequest.php │ │ │ ├── UpdateCategoryRequest.php │ │ │ ├── StoreBroadcastingAreaRequest.php │ │ │ ├── UpdateBroadcastingAreaRequest.php │ │ │ ├── StoreFormatRequest.php │ │ │ ├── UpdateFormatRequest.php │ │ │ ├── UpdateOfferRequest.php │ │ │ ├── MediaCoverRequest.php │ │ │ ├── UpdateTemplateRequest.php │ │ │ ├── StoreMediaRequest.php │ │ │ ├── UpdateMediaRequest.php │ │ │ ├── StoreTechnicalSupportRequest.php │ │ │ ├── UpdateTechnicalSupportRequest.php │ │ │ ├── MediaTechnicalDocRequest.php │ │ │ ├── StoreTemplateRequest.php │ │ │ ├── UpdateAdminRequest.php │ │ │ └── StoreAdminRequest.php │ │ └── AdNetwork │ │ │ ├── DestroyAdPlacementRequest.php │ │ │ ├── MediaCoverRequest.php │ │ │ ├── MediaTechnicalDocRequest.php │ │ │ └── ResetPasswordRequest.php │ ├── Controllers │ │ ├── Main │ │ │ ├── api │ │ │ │ ├── TemplateController.php │ │ │ │ ├── ThemeController.php │ │ │ │ ├── FormatController.php │ │ │ │ ├── TechnicalSupportController.php │ │ │ │ ├── CategoryController.php │ │ │ │ ├── ContactController.php │ │ │ │ └── AdPlacementController.php │ │ │ ├── NewsController.php │ │ │ ├── Account │ │ │ │ └── PaymentController.php │ │ │ ├── StyleguideController.php │ │ │ └── HomeController.php │ │ ├── Controller.php │ │ ├── Admin │ │ │ ├── HomeController.php │ │ │ ├── Api │ │ │ │ ├── SupportController.php │ │ │ │ ├── AdNetworkController.php │ │ │ │ ├── MediaController.php │ │ │ │ ├── BroadcastingAreaController.php │ │ │ │ ├── ThemeController.php │ │ │ │ ├── CategoryController.php │ │ │ │ ├── TargetController.php │ │ │ │ ├── UserController.php │ │ │ │ ├── AdNetworkUserController.php │ │ │ │ └── FormatController.php │ │ │ └── AcquisitionController.php │ │ └── AdNetwork │ │ │ ├── HomeController.php │ │ │ └── Api │ │ │ ├── SupportController.php │ │ │ ├── AdNetworkController.php │ │ │ ├── MediaController.php │ │ │ ├── BroadcastingAreaController.php │ │ │ ├── SupportTypeController.php │ │ │ ├── ThemeController.php │ │ │ ├── CategoryController.php │ │ │ ├── TargetController.php │ │ │ └── FormatController.php │ └── Middleware │ │ ├── VerifyCsrfToken.php │ │ ├── Admin │ │ ├── RedirectIfAuthenticated.php │ │ └── Authenticate.php │ │ ├── Main │ │ ├── RedirectIfAuthenticated.php │ │ └── Authenticate.php │ │ └── AdNetwork │ │ ├── RedirectIfAuthenticated.php │ │ └── Authenticate.php ├── Frequency.php ├── Providers │ ├── ConfigServiceProvider.php │ ├── CustomValidatorServiceProvider.php │ ├── BusServiceProvider.php │ └── AppServiceProvider.php ├── Console │ └── Kernel.php ├── Extensions │ ├── Pagination │ │ └── BootstrapThreeCustomPresenter.php │ └── TwigBridge │ │ ├── PublicEnv.php │ │ ├── UserAuth.php │ │ └── AdminAuth.php ├── Target.php ├── Theme.php ├── Category.php ├── BroadcastingArea.php ├── Format.php ├── TechnicalSupport.php ├── Services │ └── Registrar.php ├── Support.php └── Listeners │ ├── EmailBuyerSubscriptionConfirmation.php │ ├── EmailBuyerPasswordResetConfirmation.php │ ├── EmailBuyerSubscriptionAccepted.php │ ├── EmailAdNetworkPasswordResetConfirmation.php │ ├── EmailBuyerPasswordResetProcess.php │ ├── EmailOfferConfirmation.php │ ├── EmailAdNetworkPasswordResetProcess.php │ └── EmailAuctionWonNotification.php ├── config ├── sentry.php ├── image.php ├── snappy.php ├── services.php ├── css-inliner.php └── view.php ├── tests └── TestCase.php ├── server.php └── package.json /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /storage/.gitignore: -------------------------------------------------------------------------------- 1 | laravel.log 2 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/debugbar/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step4.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/views/main/emails/signup-validation.twig: -------------------------------------------------------------------------------- 1 | Valider mon mail 2 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | env('SENTRY_DSN'), 5 | 6 | // capture release as git sha 7 | // 'release' => trim(exec('git log --pretty="%h" -n1 HEAD')), 8 | ); 9 | -------------------------------------------------------------------------------- /public/img/covers/medias/daxueconsulting-china-fashion-magazines-.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrk-9/Website_-Laravel-framework/HEAD/public/img/covers/medias/daxueconsulting-china-fashion-magazines-.jpg -------------------------------------------------------------------------------- /app/Http/Requests/Request.php: -------------------------------------------------------------------------------- 1 | 7 |
8 |

{{ title }}

9 |
10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /resources/assets/scss/_search.scss: -------------------------------------------------------------------------------- 1 | .current-step-2 .fa-cog, 2 | .current-step-3 .fa-cog, 3 | .current-step-4 .fa-cog{ 4 | color: red 5 | } 6 | 7 | .current-step-3 .fa-check, 8 | .current-step-4 .fa-check{ 9 | color: red 10 | } 11 | 12 | .current-step-4 .fa-credit-card{ 13 | color: red 14 | } 15 | -------------------------------------------------------------------------------- /resources/views/ad_network/home.twig: -------------------------------------------------------------------------------- 1 | {% set title = "Accueil" %} 2 | {% set context="home" %} 3 | {% extends 'ad_network.layout' %} 4 | 5 | {% block content %} 6 |
7 |
8 |

{{ title }}

9 |
10 |
11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /resources/assets/less/ranch/less/navtabs.less: -------------------------------------------------------------------------------- 1 | // nav-tabs elements 2 | .nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus { 3 | color: #000000; 4 | background-color: #fff; 5 | border: 1px solid #ddd; 6 | border-bottom-color: transparent; 7 | cursor: default; 8 | } 9 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/TemplateController.php: -------------------------------------------------------------------------------- 1 | json(Template::all()); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/ThemeController.php: -------------------------------------------------------------------------------- 1 | json($support->themes); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /resources/assets/js/app/directives/ad-placement.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app').directive('adPlacement', function () { 2 | return { 3 | restrict: 'E', 4 | scope: { 5 | adPlacement: '=ngModel', 6 | price: '=?price' 7 | }, 8 | templateUrl: '/partials/directive/ad-placement.html' 9 | }; 10 | }); 11 | 12 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/FormatController.php: -------------------------------------------------------------------------------- 1 | json($support->formats); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | json(TechnicalSupport::all()); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/CategoryController.php: -------------------------------------------------------------------------------- 1 | json($support->categories); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /resources/assets/less/ranch/less/login.less: -------------------------------------------------------------------------------- 1 | // Login 2 | // ------------------------- 3 | 4 | .login { 5 | &:extend(.panel all); 6 | &:extend(.panel-primary all); 7 | .make-sm-column(6,0); 8 | .make-sm-column-offset(3); 9 | .make-md-column(4,0); 10 | .make-md-column-offset(4); 11 | .make-lg-column(4,0,16); 12 | .make-lg-column-offset(6,16); 13 | margin-top: 100px; 14 | } 15 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-buy-modal-step3.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementBuyModalStep3Ctrl', ['$scope', '$mediaresaApi', 3 | function ($scope, $mediaresaApi) { 4 | $mediaresaApi.getTechnicalSupports().then(function(response) { 5 | $scope.technicalSupports = response.data; 6 | }); 7 | }]); -------------------------------------------------------------------------------- /app/Http/Controllers/Main/NewsController.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make('Illuminate\Contracts\Console\Kernel')->bootstrap(); 15 | 16 | return $app; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/HomeController.php: -------------------------------------------------------------------------------- 1 | targets as $target) { 17 | Target::create([ 18 | 'name' => $target, 19 | ]); 20 | } 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /resources/assets/scss/_reset.scss: -------------------------------------------------------------------------------- 1 | // Reset Bootstrap 2 | // -------------------------- 3 | a:hover, 4 | a:focus { 5 | text-decoration: none; 6 | } 7 | button:focus, 8 | input:focus, 9 | select:focus, 10 | textarea:focus, 11 | a:focus, 12 | .btn:focus, 13 | .btn:active:focus, 14 | .btn.active:focus, 15 | button[type="submit"], 16 | input[type="file"]:focus, 17 | input[type="radio"]:focus, 18 | input[type="checkbox"]:focus { 19 | outline:none; 20 | } 21 | -------------------------------------------------------------------------------- /database/seeds/ThemeSeeder.php: -------------------------------------------------------------------------------- 1 | themes as $theme) { 17 | Theme::create([ 18 | 'name' => $theme, 19 | 'support_id' => 2 20 | ]); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-buy-modal-step9.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementBuyModalStep9Ctrl', ['$scope', '$mediaresaApi', 'multiStepFormInstance', 3 | function ($scope, $mediaresaApi, multiStepFormInstance) { 4 | $scope.buy = function () { 5 | $scope.order.errors = {}; 6 | return $scope.buyAction('transfer', multiStepFormInstance); 7 | }; 8 | }]); -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step12.html: -------------------------------------------------------------------------------- 1 |

L'emplacement est déjà vendu

2 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/HomeController.php: -------------------------------------------------------------------------------- 1 | offer = $offer; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeds/SupportSeeder.php: -------------------------------------------------------------------------------- 1 | supports as $support) { 18 | Support::create([ 19 | 'name' => $support, 20 | ]); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/Events/AuctionWasWon.php: -------------------------------------------------------------------------------- 1 | auction = $auction; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Events/BookingWasDone.php: -------------------------------------------------------------------------------- 1 | booking = $booking; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeds/CategorySeeder.php: -------------------------------------------------------------------------------- 1 | categories as $category) { 18 | Category::create([ 19 | 'name' => $category, 20 | 'support_id' => 2 21 | ]); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Events/BuyerPasswordResetWasDone.php: -------------------------------------------------------------------------------- 1 | referent = $referent; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/views/main/account/ad_placements_canceling.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout-account' %} 2 | {% set accountContext = 'ad_placements_canceling' %} 3 | 4 | {% import "main.partials.ad_placement_widget" as widget %} 5 | 6 | {% block accountContent %} 7 |

Mes demandes annulées

8 | {% for ad_placement in paginator %} 9 | {{ widget.widget_mini(ad_placement) }} 10 | {% else %} 11 | Vous n'avez pas de demandes annulées 12 | {% endfor %} 13 | 14 | {{ paginator.render() | raw }} 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /app/Events/BuyerSubscriptionWasAccepted.php: -------------------------------------------------------------------------------- 1 | referent = $referent; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Frequency.php: -------------------------------------------------------------------------------- 1 | 'name', 17 | 'save_to' => 'slug', 18 | ]; 19 | 20 | protected $fillable = ['name']; 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/Account/PaymentController.php: -------------------------------------------------------------------------------- 1 | get()->buyer->credit_card; 14 | return view('main.account.bank_details', compact('credit_card')); 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step13.html: -------------------------------------------------------------------------------- 1 |

L'emplacement est verrouillé, un autre utilisateur est déjà en train d'acheter cet emplacement.

2 | -------------------------------------------------------------------------------- /app/Events/AdNetworkPasswordResetWasDone.php: -------------------------------------------------------------------------------- 1 | referent = $referent; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Events/AdPlacementWasPublished.php: -------------------------------------------------------------------------------- 1 | adPlacement = $adPlacement; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Requests/Main/ShareAdPlacementRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email'], 16 | 'message' => [], 17 | ]; 18 | } 19 | 20 | public function messages() 21 | { 22 | return []; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /app/Events/OfferWasAccepted.php: -------------------------------------------------------------------------------- 1 | offer = $offer; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/SupportController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('supports')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /database/seeds/FormatSeeder.php: -------------------------------------------------------------------------------- 1 | formats as $format) { 17 | Format::create([ 18 | 'name' => $format["name"], 19 | 'support_id' => $format["support_id"] 20 | ]); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/SupportController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('supports')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /resources/views/main/modals/account_update_confirmation.twig: -------------------------------------------------------------------------------- 1 | {% embed 'main.modals.modal' %} 2 | {% set modal_id = "account_update_confirmation" %} 3 | {% set modal_name = "Votre compte a bien été mis à jour" %} 4 | {% block modal_body %} 5 | 9 | {% endblock %} 10 | {% endembed %} 11 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/AdNetworkController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('ad_networks')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /database/seeds/SelectionSeeder.php: -------------------------------------------------------------------------------- 1 | $i, 20 | 'ad_placement_id' => $ad_placement->id, 21 | ]); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /resources/assets/js/components/target_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.target_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/target", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | this.getData().done(function(request) { 14 | var targets = $.map(request.targets, function(target) { 15 | target.text = target.name; 16 | 17 | return target; 18 | }); 19 | 20 | element.select2({data: targets, multiple: true}); 21 | }); 22 | } 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/AdNetworkController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('ad_networks')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/MediaController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | $medias->load('support'); 19 | 20 | return response()->json(compact('medias')); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/StyleguideController.php: -------------------------------------------------------------------------------- 1 | boughtItem = $boughtItem; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/assets/scss/_legals.scss: -------------------------------------------------------------------------------- 1 | .legals-page { 2 | padding-bottom: 80px; 3 | .legals-title { 4 | margin-top: 40px; 5 | margin-bottom: 0; 6 | } 7 | .legals-part { 8 | padding: 20px 0 40px 0; 9 | border-top: 1px solid $pearl-gray; 10 | &:first-of-type { 11 | border-top: none; 12 | } 13 | } 14 | .legals-container { 15 | max-width: 780px; 16 | } 17 | .legals-section-title { 18 | margin: 20px 0; 19 | } 20 | ul, 21 | ol { 22 | li { 23 | font-size: 16px; 24 | line-height: 24px; 25 | margin-bottom: 5px; 26 | } 27 | } 28 | a { 29 | font-size: 16px; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /resources/views/main/ad_placement/show.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout' %} 2 | 3 | {% set title = ad_placement.media.name ~ " " ~ ad_placement.edition ~ " - " ~ ad_placement.name %} 4 | {% set context='ad_placement' %} 5 | 6 | {% block content %} 7 | 8 |
9 |
10 | 11 | {{ widget.widget_full(ad_placement) }} 12 | 13 |
14 | 15 | {% if ad_placement.user_offer is not null %} 16 | {{ modal_offer_delete.delete(ad_placement) }} 17 | {% endif %} 18 | 19 | {{ modal_share.share(ad_placement) }} 20 |
21 | 22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /app/Events/BuyerPasswordResetWasAsked.php: -------------------------------------------------------------------------------- 1 | referent = $referent; 24 | $this->reset_path = $reset_path; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/ContactController.php: -------------------------------------------------------------------------------- 1 | get('lastname'), $request->get('firstname'), $request->get('email'), $request->get('phone'), $request->get('account_type'), $request->get('note'))); 12 | return response()->json("ok"); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /config/image.php: -------------------------------------------------------------------------------- 1 | 'gd' 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /config/snappy.php: -------------------------------------------------------------------------------- 1 | array( 7 | 'enabled' => true, 8 | 'binary' => (env('APP_ENV') == "production") ? 'wkhtmltopdf' : base_path('vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64'), 9 | 'timeout' => false, 10 | 'options' => array(), 11 | 'env' => array(), 12 | ), 13 | 'image' => array( 14 | 'enabled' => true, 15 | 'binary' => '/usr/local/bin/wkhtmltoimage', 16 | 'timeout' => false, 17 | 'options' => array(), 18 | 'env' => array(), 19 | ), 20 | 21 | 22 | ); 23 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Events/AuctionWasDone.php: -------------------------------------------------------------------------------- 1 | auction = $auction; 25 | $this->last_buyer = $last_buyer; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Events/BuyerSubscriptionWasDone.php: -------------------------------------------------------------------------------- 1 | buyer = $buyer; 25 | $this->referent = $referent; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/Events/OfferWasCanceled.php: -------------------------------------------------------------------------------- 1 | adPlacement = $adPlacement; 25 | $this->buyer = $buyer; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /resources/assets/js/components/format_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.format_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/format", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | this.getData().done(function(data) { 15 | var formats = $.map(data.formats, function(format) { 16 | format.text = format.name; 17 | 18 | return format; 19 | }); 20 | 21 | element.select2({ 22 | data: formats, 23 | }); 24 | }); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/MediaController.php: -------------------------------------------------------------------------------- 1 | where('media.name', 'ILIKE', '%' . Request::get('name') . '%')->get(); 18 | $medias->load('support'); 19 | 20 | return response()->json(compact('medias')); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /database/seeds/BroadcastingAreaSeeder.php: -------------------------------------------------------------------------------- 1 | "France entière", 17 | 'slug' => "all" 18 | ]); 19 | 20 | foreach ($this->broadcasting_areas as $broadcasting_area) { 21 | BroadcastingArea::create([ 22 | 'name' => $broadcasting_area, 23 | ]); 24 | } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/BroadcastingAreaController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('broadcasting_areas')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/Events/AdNetworkPasswordResetWasAsked.php: -------------------------------------------------------------------------------- 1 | referent = $referent; 24 | $this->reset_path = $reset_path; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/BroadcastingAreaController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | return response()->json(compact('broadcasting_areas')); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /app/Providers/ConfigServiceProvider.php: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | 11 | {% endblock %} 12 | {% endembed %} 13 | -------------------------------------------------------------------------------- /database/seeds/TemplateSeeder.php: -------------------------------------------------------------------------------- 1 | templates as $template) { 17 | Template::create([ 18 | 'name' => $template['name'], 19 | 'description' => $template['description'], 20 | 'cover' => $template['cover'] 21 | ]); 22 | } 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /resources/views/main/modals/signup_confirmation.twig: -------------------------------------------------------------------------------- 1 | {% embed 'main.modals.modal' %} 2 | {% set modal_id = "signup_confirmation" %} 3 | {% set modal_name = "Votre inscription a bien été prise en compte" %} 4 | {% block modal_body %} 5 |

Votre compte doit désormais être validé par notre équipe : vous recevrez un e-mail sous peu, validant définitivement votre inscription.

6 |

7 | 8 |

9 | {% endblock %} 10 | {% endembed %} 11 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | $uri = urldecode( 10 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 11 | ); 12 | 13 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 14 | // built-in PHP web server. This provides a convenient way to test a Laravel 15 | // application without having installed a "real" web server software here. 16 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) 17 | { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/SupportTypeController.php: -------------------------------------------------------------------------------- 1 | get(); 18 | 19 | $support_types->load('support', 'category'); 20 | 21 | return response()->json(compact('support_types')); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Requests/Main/ContactRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'max:255'], 16 | 'firstname' => ['required', 'max:255'], 17 | 'phone' => ['max:255'], 18 | 'email' => ['required', 'email', 'max:255'], 19 | 'account_type' => ['max:255'], 20 | 'note' => ['required'], 21 | ]; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /resources/views/emails/ad-network-subscription-alert.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
7 |
8 |
9 | 10 |

Une régie vient de s'inscrire

11 |

12 | La régie "{{ ad_network.name }}" vient de s'inscrire avec pour référent {{ referent.name }} {{ referent.family_name }}. 13 |

14 |
15 |
16 | 17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /app/Events/AdNetworkSubscriptionWasDone.php: -------------------------------------------------------------------------------- 1 | ad_network = $ad_network; 25 | $this->referent = $referent; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /resources/views/main/account/index.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout-account' %} 2 | {% set accountContext = 'account-home' %} 3 | 4 | {% block accountContent %} 5 |
6 | {% set user = user_auth_get() %} 7 | {% include 'main.forms.buyer_account' %} 8 | 9 |
10 | 11 | {% include 'main.modals.account_update_confirmation' %} 12 | 13 | {% endblock %} 14 | -------------------------------------------------------------------------------- /resources/views/main/layout/layout-account.twig: -------------------------------------------------------------------------------- 1 | {% set title = "Mon compte" %} 2 | {% set context="account" %} 3 | 4 | {% extends 'main.layout.layout' %} 5 | 6 | {% import 'main.partials.nav' as nav %} 7 | 8 | {% block content %} 9 |
10 |
11 | 21 |
22 |
23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /database/seeds/OfferSeeder.php: -------------------------------------------------------------------------------- 1 | type == 'offer') { 19 | $offer = Offer::create([ 20 | 'user_id' => $i, 21 | 'ad_placement_id' => $i, 22 | 'amount' => $this->faker->randomFloat($nbMaxDecimals = NULL, $min = 10.23, $max = 243.58) 23 | ]); 24 | } 25 | }*/ 26 | } 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /database/seeds/AuctionSeeder.php: -------------------------------------------------------------------------------- 1 | type == 'auction') { 19 | $auction = Auction::create([ 20 | 'user_id' => $i, 21 | 'ad_placement_id' => $i, 22 | 'amount' => $this->faker->randomFloat($nbMaxDecimals = NULL, $min = 10.23, $max = 243.58) 23 | ]); 24 | } 25 | }*/ 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /database/seeds/AdminSeeder.php: -------------------------------------------------------------------------------- 1 | users); $i++) { 20 | Admin::create([ 21 | 'name' => $this->users[$i]['first_name'] . ' ' . $this->users[$i]['family_name'], 22 | 'email' => $this->users[$i]['email'], 23 | 'password' => $this->users[$i]['password'], 24 | ]); 25 | } 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-offer-delete-modal.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementOfferDeleteModalCtrl', ['$scope', '$window', '$mediaresaApi', '$uibModalInstance', 'adPlacementId', 3 | function ($scope, $window, $mediaresaApi, $uibModalInstance, adPlacementId) { 4 | 5 | $scope.delete = function () { 6 | return $mediaresaApi.deleteAdPlacementOffer(adPlacementId).then(function () { 7 | $uibModalInstance.close(); 8 | }); 9 | }; 10 | 11 | $scope.cancel = function () { 12 | $uibModalInstance.dismiss('cancel'); 13 | }; 14 | 15 | }]); -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | open_routes as $route) { 20 | if ($request->is($route)) { 21 | return $next($request); 22 | } 23 | } 24 | 25 | return parent::handle($request, $next); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /resources/views/emails/offer-canceled.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
7 |
8 |
9 | 10 |

Bonjour {{ referent.name }}, une offre a été annulée

11 |

12 | {{ buyer.name }} {{ buyer.family_name }} a annulé son offre pour 13 | l'emplacement {{ ad_placement.name }} concernant le support {{ media.name }}. 14 |

15 |
16 |
17 | 18 | 19 | {% endblock %} 20 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('auction:validate')->everyFiveMinutes(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/Extensions/Pagination/BootstrapThreeCustomPresenter.php: -------------------------------------------------------------------------------- 1 | hasPages()) 17 | { 18 | return sprintf( 19 | '', 20 | $this->getPreviousButton(''), 21 | $this->getLinks(), 22 | $this->getNextButton('') 23 | ); 24 | } 25 | 26 | return ''; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /resources/assets/js/components/broadcasting_area_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.broadcasting_area_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/broadcasting-area", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | this.getData().done(function(data) { 15 | var broadcasting_areas = $.map(data.broadcasting_areas, function(broadcasting_area) { 16 | broadcasting_area.text = broadcasting_area.name; 17 | 18 | return broadcasting_area; 19 | }); 20 | 21 | element.select2({ 22 | data: broadcasting_areas, 23 | }); 24 | }); 25 | } 26 | }; 27 | -------------------------------------------------------------------------------- /app/Providers/CustomValidatorServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->validator->resolver(function($translator, $data, $rules, $messages) 18 | { 19 | return new CustomValidator($translator, $data, $rules, $messages); 20 | }); 21 | } 22 | 23 | /** 24 | * Register any application services. 25 | * 26 | * @return void 27 | */ 28 | public function register() 29 | { 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreThemeRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du thème.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateThemeRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du thème.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreSupportRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du support.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreTargetRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la cible.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateTargetRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la cible.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Target.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name']; 22 | 23 | protected static $search_rules = [ 24 | 'target.name' => [ 25 | 'operator' => 'ILIKE', 26 | 'value' => '%{value}%', 27 | ], 28 | ]; 29 | 30 | protected static $order_by = ['name' => 'ASC']; 31 | } 32 | -------------------------------------------------------------------------------- /database/seeds/BookingSeeder.php: -------------------------------------------------------------------------------- 1 | type == 'booking') { 21 | $booking = Booking::create([ 22 | 'user_id' => $i, 23 | 'ad_placement_id' => $i 24 | ]); 25 | } 26 | }*/ 27 | } 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateSupportRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du support.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Main/UpdateBuyerRequest.php: -------------------------------------------------------------------------------- 1 | rules['password'] = ['confirmed', 'min:6', 'max:255']; 14 | $this->rules['email'] = ['required', 'email', 'unique:user,email,' . Auth::user()->get()->id, 'max:255']; 15 | $this->rules['buyer_email'] = ['required', 'email', 'unique:buyer,email,' . Auth::user()->get()->buyer->id, 'max:255']; 16 | unset($this->rules['password_confirmation']); 17 | return $this->rules; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /resources/assets/scss/_view-faq.scss: -------------------------------------------------------------------------------- 1 | .faq-page-container { 2 | margin: 0; 3 | } 4 | .faq-affix { 5 | @include make-sm-column(2, 0); 6 | position: fixed; 7 | left: 0; 8 | } 9 | .faq-content { 10 | max-width: 780px; 11 | padding: 0 0 40px 35px; 12 | .faq-title { 13 | text-align: left; 14 | padding-top: 15px; 15 | margin-top: 15px; 16 | } 17 | .faq-super-title { 18 | margin-top: 40px; 19 | } 20 | .title-toggler { 21 | cursor: pointer; 22 | @media(min-width: $screen-sm-min){ 23 | cursor: default; 24 | } 25 | } 26 | .toggler-arrow { 27 | position: relative; 28 | display: none; 29 | text-align: center; 30 | margin-top: 15px; 31 | margin-bottom: 15px; 32 | cursor: pointer; 33 | color: $ash-gray; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreCategoryRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la catégorie.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateCategoryRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la catégorie.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Theme.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name', 'support_id']; 22 | 23 | protected static $search_rules = [ 24 | 'theme.name' => [ 25 | 'operator' => 'ILIKE', 26 | 'value' => '%{value}%', 27 | ], 28 | ]; 29 | 30 | protected static $order_by = ['name' => 'ASC']; 31 | } 32 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step14.html: -------------------------------------------------------------------------------- 1 |

Quelqu'un a enchérit avant vous

2 | -------------------------------------------------------------------------------- /app/Category.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name', 'support_id']; 22 | 23 | protected static $search_rules = [ 24 | 'category.name' => [ 25 | 'operator' => 'ILIKE', 26 | 'value' => '%{value}%', 27 | ], 28 | ]; 29 | 30 | protected static $order_by = ['name' => 'ASC']; 31 | } 32 | -------------------------------------------------------------------------------- /resources/views/main/account/ad_placements_selection.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout-account' %} 2 | {% set accountContext = 'ad_placements_selection' %} 3 | 4 | {% import "main.partials.ad_placement_widget" as widget %} 5 | 6 | {% block accountContent %} 7 |

Ma sélection

8 | {% for ad_placement in paginator %} 9 | {{ widget.widget_mini(ad_placement, true) }} 10 | {% else %} 11 | Vous n'avez pas encore d'emplacements dans votre sélection : consultez les emplacements disponibles.
12 | Rechercher 13 | {% endfor %} 14 | 15 | {{ paginator.render() | raw }} 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreBroadcastingAreaRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la zone de diffusion.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateBroadcastingAreaRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom de la zone de diffusion.', 33 | ]; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /app/Providers/BusServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapUsing(function($command) 17 | { 18 | return Dispatcher::simpleMapping( 19 | $command, 'App\Commands', 'App\Handlers\Commands' 20 | ); 21 | }); 22 | } 23 | 24 | /** 25 | * Register any application services. 26 | * 27 | * @return void 28 | */ 29 | public function register() 30 | { 31 | // 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/BroadcastingArea.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name']; 22 | 23 | protected static $search_rules = [ 24 | 'broadcasting_area.name' => [ 25 | 'operator' => 'ILIKE', 26 | 'value' => '%{value}%', 27 | ], 28 | ]; 29 | 30 | protected static $order_by = ['name' => 'ASC']; 31 | } 32 | -------------------------------------------------------------------------------- /app/Events/AdPlacementWasShared.php: -------------------------------------------------------------------------------- 1 | ad_placement = $ad_placement; 27 | $this->user = $user; 28 | $this->contact_email = $contact_email; 29 | $this->message = $message; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225714_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225906_create_frequency_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name')->unique(); 18 | $table->string('slug')->unique(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('frequency'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225926_create_target_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('target'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/ThemeController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 20 | $themes = Theme::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 21 | } else if ($request->has('support_id')) { 22 | $themes = Theme::where('support_id', $request->get('support_id'))->get(); 23 | } 24 | 25 | return response()->json(compact('themes')); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225927_create_support_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('support'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/ThemeController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 20 | $themes = Theme::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 21 | } else if ($request->has('support_id')) { 22 | $themes = Theme::where('support_id', $request->get('support_id'))->get(); 23 | } 24 | 25 | return response()->json(compact('themes')); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/contact-modal.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('ContactModalCtrl', ['$scope', '$timeout', '$mediaresaApi', '$uibModalInstance', 3 | function ($scope, $timeout, $mediaresaApi, $uibModalInstance) { 4 | 5 | $scope.conctact = {}; 6 | 7 | $scope.send = function () { 8 | return $mediaresaApi.sendContact($scope.contact).then(function (response) { 9 | $scope.msgSend = true; 10 | $timeout(function() { 11 | $uibModalInstance.close(); 12 | }, 2000); 13 | }); 14 | }; 15 | 16 | $scope.cancel = function () { 17 | $uibModalInstance.dismiss('cancel'); 18 | }; 19 | 20 | }]); -------------------------------------------------------------------------------- /resources/views/emails/contact.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
7 |
8 |
9 | 10 |

Demande de contact

11 |

12 | Nom Prénom : {{ lastname }} {{ firstname }}
13 | Mail : {{ email }}
14 | Téléphone : {{ phone }}
15 | Type de compte : {{ accountType }}
16 | Message :
17 | {{ note | nl2br }} 18 |

19 |
20 |
21 | 22 | 23 | {% endblock %} -------------------------------------------------------------------------------- /resources/views/main/account/ad_placements_valid.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout-account' %} 2 | {% set accountContext = 'ad_placements_valid' %} 3 | 4 | {% import "main.partials.ad_placement_widget" as widget %} 5 | 6 | {% block accountContent %} 7 |

Mes demandes validées

8 | {% for ad_placement in paginator %} 9 | {{ widget.widget_mini(ad_placement) }} 10 | {% else %} 11 | Vous n'avez pas encore de demandes de réservation validées : consultez les emplacements disponibles.
12 |
13 | Rechercher 14 |
15 | {% endfor %} 16 | 17 | {{ paginator.render() | raw }} 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreFormatRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'unique:format,name'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du format.', 33 | 'name.unique' => 'Un format de ce nom existe déjà.' 34 | ]; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step11.html: -------------------------------------------------------------------------------- 1 |

Envoyez-nous vos éléments techniques

2 | -------------------------------------------------------------------------------- /resources/assets/js/components/media_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.media_autocomplete = { 2 | options: { 3 | ajax: { 4 | url: "/api/media", 5 | datatype: 'json', 6 | delay: 250, 7 | data: function(params) { 8 | return { 9 | name: params.term 10 | }; 11 | }, 12 | processResults: function(data, page) { 13 | return { 14 | results: data.medias, 15 | }; 16 | }, 17 | cache: true, 18 | }, 19 | minimumInputLength: 1, 20 | templateResult: function(data) { 21 | if (data.loading) return data.text; 22 | var markup = data.name; 23 | return markup; 24 | }, 25 | templateSelection: function(data) { 26 | if (data.name) return data.name; 27 | else return data.text; 28 | }, 29 | }, 30 | init: function(element) { 31 | element.select2(this.options); 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /app/Format.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name', 'support_id']; 22 | 23 | protected static $search_rules = [ 24 | 'format.name' => [ 25 | 'operator' => 'ILIKE', 26 | 'value' => '%{value}%', 27 | ], 28 | ]; 29 | 30 | protected static $order_by = ['name' => 'ASC']; 31 | 32 | } 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/CategoryController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 20 | $categories = Category::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 21 | } else if ($request->has('support_id')) { 22 | $categories = Category::where('support_id', $request->get('support_id'))->get(); 23 | } 24 | 25 | return response()->json(compact('categories')); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/AdNetwork/DestroyAdPlacementRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 8 | ]; 9 | 10 | /** 11 | * Determine if the user is authorized to make this request. 12 | * 13 | * @return bool 14 | */ 15 | public function authorize() 16 | { 17 | return true; 18 | } 19 | 20 | /** 21 | * Get the validation rules that apply to the request. 22 | * 23 | * @return array 24 | */ 25 | public function rules() 26 | { 27 | return $this->indicateurs; 28 | } 29 | 30 | public function messages() 31 | { 32 | return [ 33 | 'deletion_cause.required' => 'Veuillez saisir le motif de suppression.' 34 | ]; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /app/Events/ContactSend.php: -------------------------------------------------------------------------------- 1 | lastname = $lastname; 27 | $this->firstname = $firstname; 28 | $this->email = $email; 29 | $this->phone = $phone; 30 | $this->accountType = $accountType; 31 | $this->note = $note; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/CategoryController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 20 | $categories = Category::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 21 | } else if ($request->has('support_id')) { 22 | $categories = Category::where('support_id', $request->get('support_id'))->get(); 23 | } 24 | 25 | return response()->json(compact('categories')); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225853_create_broadcasting_area_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('broadcasting_area'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /resources/assets/js/components/ad_network_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.ad_network_autocomplete = { 2 | options: { 3 | ajax: { 4 | url: "/api/ad-network", 5 | datatype: 'json', 6 | delay: 250, 7 | data: function(params) { 8 | return { 9 | name: params.term 10 | }; 11 | }, 12 | processResults: function(data, page) { 13 | return { 14 | results: data.ad_networks, 15 | }; 16 | }, 17 | cache: true, 18 | }, 19 | minimumInputLength: 1, 20 | templateResult: function(data) { 21 | if (data.loading) return data.text; 22 | var markup = data.name; 23 | return markup; 24 | }, 25 | templateSelection: function(data) { 26 | if (data.name) return data.name; 27 | else return data.text; 28 | }, 29 | }, 30 | init: function(element) { 31 | element.select2(this.options); 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call('AdminSeeder'); 18 | $this->call('UserBuyerSeeder'); 19 | $this->call('SupportSeeder'); 20 | $this->call('AdNetworkWithAdNetworkUserSeeder'); 21 | $this->call('FrequencySeeder'); 22 | $this->call('BroadcastingAreaSeeder'); 23 | $this->call('CategorySeeder'); 24 | $this->call('ThemeSeeder'); 25 | $this->call('TargetSeeder'); 26 | $this->call('FormatSeeder'); 27 | $this->call('TechnicalSupportSeeder'); 28 | $this->call('TemplateSeeder'); 29 | $this->call('AdPlacementSeeder'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /resources/views/main/account/ad_placements_pending.twig: -------------------------------------------------------------------------------- 1 | {% extends 'main.layout.layout-account' %} 2 | {% set accountContext = 'ad_placements_pending' %} 3 | 4 | {% import "main.partials.ad_placement_widget" as widget %} 5 | 6 | {% block accountContent %} 7 |

Mes demandes en cours

8 | {% for ad_placement in paginator %} 9 | {{ widget.widget_mini(ad_placement) }} 10 | {% else %} 11 | Vous n'avez pas de demandes en attente de validation ou toutes vos demandes ont été traitées : consultez les autres emplacements disponibles.
12 |
13 | Rechercher 14 |
15 | {% endfor %} 16 | 17 | {{ paginator.render() | raw }} 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/TargetController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 21 | $targets = Target::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 22 | } else if ($request->has('media_id')) { 23 | $media = Media::find($request->get('media_id')); 24 | $targets = $media->targets->pluck('id'); 25 | } 26 | 27 | return response()->json(compact('targets')); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /resources/assets/js/components/ad_network_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.ad_network_update_autocomplete = { 2 | options: { 3 | ajax: { 4 | url: "/api/ad-network", 5 | datatype: 'json', 6 | delay: 250, 7 | data: function(params) { 8 | return { 9 | name: params.term 10 | }; 11 | }, 12 | processResults: function(data, page) { 13 | return { 14 | results: data.ad_networks, 15 | }; 16 | }, 17 | cache: true, 18 | }, 19 | minimumInputLength: 1, 20 | templateResult: function(data) { 21 | if (data.loading) return data.text; 22 | var markup = data.name; 23 | return markup; 24 | }, 25 | templateSelection: function(data) { 26 | if (data.name) return data.name; 27 | else return data.text; 28 | }, 29 | }, 30 | init: function(element) { 31 | element.select2(this.options); 32 | }, 33 | }; 34 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/TargetController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 21 | $targets = Target::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 22 | } else if ($request->has('media_id')) { 23 | $media = Media::find($request->get('media_id')); 24 | $targets = $media->targets->pluck('id'); 25 | } 26 | 27 | return response()->json(compact('targets')); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | "Passwords must be at least six characters and match the confirmation.", 17 | "user" => "We can't find a user with that e-mail address.", 18 | "token" => "This password reset token is invalid.", 19 | "sent" => "We have e-mailed your password reset link!", 20 | "reset" => "Your password has been reset!", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateFormatRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'unique:format,name,' . $this->route()->parameter('format')->id], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'name.required' => 'Veuillez saisir le nom du format.', 33 | 'name.unique' => 'Un format de ce nom existe déjà.' 34 | ]; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /resources/assets/js/components/broadcasting_area_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.broadcasting_area_update_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/broadcasting-area", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | var broadcasting_area_id = element.attr('data-broadcasting-area-id'); 15 | 16 | this.getData().done(function(data) { 17 | var broadcasting_areas = $.map(data.broadcasting_areas, function(broadcasting_area) { 18 | broadcasting_area.text = broadcasting_area.name; 19 | 20 | return broadcasting_area; 21 | }); 22 | 23 | element.select2({ 24 | data: broadcasting_areas, 25 | }).val(broadcasting_area_id).trigger('change'); 26 | }); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-offer-delete.html: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /resources/views/ad_network/macros/nav.twig: -------------------------------------------------------------------------------- 1 | {% macro nav(context) %} 2 |
  • 3 | Catalogue Support 4 |
  • 5 |
  • 6 | Offres 7 |
  • 8 |
  • 9 | Réservations 10 |
  • 11 |
  • 12 | Utilisateurs 13 |
  • 14 |
  • 15 | Paramètres du compte 16 |
  • 17 | {% endmacro %} 18 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/UserController.php: -------------------------------------------------------------------------------- 1 | where('name', 'ILIKE', Request::get('name') . '%') 19 | ->orWhere('family_name', 'ILIKE', Request::get('name') . '%') 20 | ->orWhere('email', 'ILIKE', Request::get('name') . '%'); 21 | }); 22 | 23 | if (Request::has('buyer_id')) { 24 | $users = $users->where('buyer_id', Request::get('buyer_id')); 25 | } 26 | 27 | $users = $users->get(); 28 | 29 | return response()->json(compact('users')); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /resources/views/errors/503.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 |
    36 |
    37 |
    Be right back.
    38 |
    39 |
    40 | 41 | 42 | -------------------------------------------------------------------------------- /database/migrations/2016_05_16_000835_create_template_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->text('description'); 21 | $table->string('cover'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('template'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2016_05_16_000856_create_news_category_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->timestamps(); 18 | $table->softDeletes(); 19 | 20 | $table->string('slug')->unique(); 21 | $table->string('name'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('news_category'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /resources/views/errors/404.twig: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 |
    36 |
    37 |
    Cette page n'existe pas.
    38 |
    39 |
    40 | 41 | 42 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-buy-modal-step5.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementBuyModalStep5Ctrl', ['$scope', '$mediaresaApi', 3 | function ($scope, $mediaresaApi) { 4 | 5 | $scope.templates = []; 6 | $mediaresaApi.getTemplates().then(function(response) { 7 | $scope.templates = response.data; 8 | $scope.setPage(); 9 | }); 10 | 11 | $scope.templatesPerPage = 3; 12 | $scope.currentPage = 1; 13 | 14 | $scope.setPage = function(){ 15 | $scope.page = $scope.templates.filter(function(obj, i) { 16 | return i >= ($scope.currentPage - 1) * $scope.templatesPerPage && i < ((($scope.currentPage - 1) * $scope.templatesPerPage) + $scope.templatesPerPage); 17 | }); 18 | } 19 | 20 | }]); -------------------------------------------------------------------------------- /resources/assets/js/components/media_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.media_update_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/media", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | var _this = this; 15 | var media_id = element.attr('data-media-id'); 16 | 17 | this.getData().done(function(data) { 18 | var medias = $.map(data.medias, function(media) { 19 | media.text = media.name; 20 | 21 | return media; 22 | }); 23 | 24 | element.select2({ 25 | data: medias, 26 | }).val(media_id).trigger('change'); 27 | 28 | _this.initDataMediaId(element); 29 | }); 30 | }, 31 | initDataMediaId: function(element) { 32 | $('select[data-media-id]').attr('data-media-id', $(element).val()); 33 | } 34 | }; 35 | -------------------------------------------------------------------------------- /resources/views/emails/ad-network-subscription.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    {{ referent.name }}, bienvenue sur MediaResa

    11 |

    12 | Vous avez formulé une demande d'inscription sur notre plate-forme pour {{ ad_network.name }} 13 | ({{ ad_network.corporate_name }}). 14 |

    15 |

    16 | Votre demande est en cours de validation, un e-mail vous sera envoyé pour confirmer votre inscription. 17 |

    18 |
    19 |
    20 | 21 | 22 | {% endblock %} -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind( 29 | 'Illuminate\Contracts\Auth\Registrar', 30 | 'App\Services\Registrar' 31 | ); 32 | 33 | \Stripe\Stripe::setApiKey(env('STRIPE_SECRET_KEY')); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /resources/views/ad_network/modals/signup_confirmation.twig: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /app/Http/Middleware/Admin/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = Auth::admin(); 25 | } 26 | 27 | /** 28 | * Handle an incoming request. 29 | * 30 | * @param \Illuminate\Http\Request $request 31 | * @param \Closure $next 32 | * @return mixed 33 | */ 34 | public function handle($request, Closure $next) 35 | { 36 | if ($this->auth->check()) 37 | { 38 | return new RedirectResponse(url('/')); 39 | } 40 | 41 | return $next($request); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/Main/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = Auth::user(); 25 | } 26 | 27 | /** 28 | * Handle an incoming request. 29 | * 30 | * @param \Illuminate\Http\Request $request 31 | * @param \Closure $next 32 | * @return mixed 33 | */ 34 | public function handle($request, Closure $next) 35 | { 36 | if ($this->auth->check()) 37 | { 38 | return new RedirectResponse(url('/')); 39 | } 40 | 41 | return $next($request); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateOfferRequest.php: -------------------------------------------------------------------------------- 1 | ['mimes:jpeg,bmp,png,pdf'] 27 | ]; 28 | } 29 | 30 | /** 31 | * Defines form messages 32 | * 33 | * @return array 34 | */ 35 | public function messages() 36 | { 37 | return [ 38 | 'order_file.mimes' => 'Le fichier à envoyer doit être dans l\'un de ces formats : png, jpeg, bmp, pdf', 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => '', 19 | 'secret' => '', 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => env('MANDRILL_KEY'), 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => '', 28 | 'secret' => '', 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => 'App\User', 34 | 'secret' => '', 35 | ], 36 | 37 | ]; 38 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_235319_create_technical_support_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->text('description'); 21 | $table->decimal('price'); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('technical_support'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-buy-modal-step14.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementBuyModalStep14Ctrl', ['$scope', '$mediaresaApi', 'multiStepFormInstance', 3 | function ($scope, $mediaresaApi, multiStepFormInstance) { 4 | $mediaresaApi.getAdPlacement($scope.adPlacement.id).then(function (response) { 5 | $scope.adPlacement = response.data; 6 | $scope.currentPrice = $scope.adPlacement.price; 7 | }); 8 | 9 | $scope.changePrice = function() { 10 | $scope.order = {}; 11 | $scope.order.buyType = 'auction'; 12 | $scope.order.errors = {}; 13 | $scope.order.price = $scope.adPlacement.user_min_price; 14 | multiStepFormInstance.cleanHistory(); 15 | multiStepFormInstance.setActiveIndex(1); 16 | } 17 | }]); -------------------------------------------------------------------------------- /resources/views/emails/buyer-subscription-accepted.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Bonjour {{ referent.name }} {{ referent.family_name }}

    11 |

    12 | Un administrateur vient d'accepter votre inscription. Vous pouvez dès à présent vous connecter. 13 |

    14 |
    15 |
    16 | 17 | 18 | 19 | 20 |
    21 | Retour au site 22 |
    23 | 24 | 25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /config/css-inliner.php: -------------------------------------------------------------------------------- 1 | false, 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Remove classes 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Settings this to false disables the removal of class attributes from 26 | | your html elements (do not enable this if you use media queries) 27 | | 28 | */ 29 | 30 | 'strip-classes' => true, 31 | 32 | ]; 33 | -------------------------------------------------------------------------------- /app/Http/Middleware/AdNetwork/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = Auth::ad_network(); 25 | } 26 | 27 | /** 28 | * Handle an incoming request. 29 | * 30 | * @param \Illuminate\Http\Request $request 31 | * @param \Closure $next 32 | * @return mixed 33 | */ 34 | public function handle($request, Closure $next) 35 | { 36 | if ($this->auth->check()) 37 | { 38 | return new RedirectResponse(url('/')); 39 | } 40 | 41 | return $next($request); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/HomeController.php: -------------------------------------------------------------------------------- 1 | where('ending_at', '>', Carbon::now()); 23 | $query->where('starting_at', '<=', Carbon::now()); 24 | $ad_placements = $query->orderBy('created_at', 'DESC') 25 | ->take(6) 26 | ->get(); 27 | 28 | return view('main.index', compact('ad_placements')); 29 | } 30 | 31 | } 32 | 33 | -------------------------------------------------------------------------------- /resources/views/main/modals/password_reset.twig: -------------------------------------------------------------------------------- 1 | {% embed 'main.modals.modal' %} 2 | {% set modal_id = "password_reset" %} 3 | {% set modal_name = "Réinitialisez votre mot de passe" %} 4 | {% block modal_body %} 5 | 18 | {% endblock %} 19 | {% endembed %} 20 | -------------------------------------------------------------------------------- /resources/views/emails/buyer-subscription.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    {{ referent.name }}, bienvenue sur MediaResa

    11 |

    12 | Merci de vous être inscrit sur MediaResa. Vous pouvez désormais accéder à l'ensemble des 13 | informations concernant nos offres. 14 |

    15 |
    16 |
    17 | 18 | 19 | 20 | 21 |
    22 | Retour au site 23 |
    24 | 25 | 26 | {% endblock %} -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225836_create_admin_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->timestamps(); 19 | $table->softDeletes(); 20 | 21 | $table->string('name'); 22 | $table->string('email')->unique(); 23 | $table->string('password', 60); 24 | $table->rememberToken(); 25 | }); 26 | } 27 | 28 | /** 29 | * Reverse the migrations. 30 | * 31 | * @return void 32 | */ 33 | public function down() 34 | { 35 | Schema::drop('admin'); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /resources/assets/js/components/user_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.user_autocomplete = { 2 | options: { 3 | ajax: { 4 | url: "/api/user", 5 | datatype: 'json', 6 | delay: 250, 7 | data: function(params) { 8 | return { 9 | name: params.term, 10 | buyer_id: $('#UpdateBuyerUser').attr('data-buyer-id') 11 | }; 12 | }, 13 | processResults: function(data, page) { 14 | return { 15 | results: data.users, 16 | }; 17 | }, 18 | cache: true, 19 | }, 20 | minimumInputLength: 3, 21 | templateResult: function(data) { 22 | if (data.loading) return data.text; 23 | var markup = data.name + ' ' + data.family_name + ' - ' + data.email; 24 | return markup; 25 | }, 26 | templateSelection: function(data) { 27 | if (data.name) return data.name + ' ' + data.family_name + ' - ' + data.email; 28 | else return data.text; 29 | }, 30 | }, 31 | init: function(element) { 32 | element.select2(this.options); 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /resources/views/admin/auth/login.twig: -------------------------------------------------------------------------------- 1 | {% extends "admin.layout" %} 2 | {% set title = "Connexion" %} 3 | 4 | {% block content %} 5 |
    6 |
    Admin - Authentification
    7 |
    8 |
    9 | 10 | 11 |
    12 | 13 | 14 |
    15 | 16 |
    17 | 18 | 19 |
    20 | 21 | 22 |
    23 |
    24 |
    25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /resources/views/emails/password-reset-confirmation.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Confirmation de la réinitialisation de votre mot de passe

    11 |

    12 | Votre mot de passe vient d’être modifié sur notre site. 13 |

    14 |

    15 | Si vous n’êtes pas à l’origine de ce changement, merci de nous en informer par e-mail à 16 | l'adresse suivante : {{ public_env('MAIL_PUBLIC') }} . 18 |

    19 |
    20 |
    21 | 22 | 23 | {% endblock %} -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/AdNetworkUserController.php: -------------------------------------------------------------------------------- 1 | where('name', 'ILIKE', Request::get('name') . '%') 19 | ->orWhere('family_name', 'ILIKE', Request::get('name') . '%') 20 | ->orWhere('email', 'ILIKE', Request::get('name') . '%'); 21 | }); 22 | 23 | if (Request::has('ad_network')) { 24 | $ad_network_users = $ad_network_users->where('ad_network_id', Request::get('ad_network')); 25 | } 26 | 27 | $ad_network_users = $ad_network_users->get(); 28 | 29 | return response()->json(compact('ad_network_users')); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/Main/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = Auth::user(); 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) 36 | { 37 | if ($request->ajax()) 38 | { 39 | return response('Unauthorized.', 401); 40 | } 41 | else 42 | { 43 | return redirect()->guest('/#login'); 44 | } 45 | } 46 | 47 | return $next($request); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/Http/Middleware/Admin/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = Auth::admin(); 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) 36 | { 37 | if ($request->ajax()) 38 | { 39 | return response('Unauthorized.', 401); 40 | } 41 | else 42 | { 43 | return redirect()->guest('auth/login'); 44 | } 45 | } 46 | 47 | return $next($request); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-share-modal.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementShareModalCtrl', ['$scope', '$timeout', '$mediaresaApi', '$uibModalInstance', 'adPlacementId', 3 | function ($scope, $timeout, $mediaresaApi, $uibModalInstance, adPlacementId) { 4 | 5 | $mediaresaApi.getAdPlacement(adPlacementId).then(function (response) { 6 | $scope.adPlacement = response.data; 7 | }); 8 | 9 | $scope.send = function () { 10 | return $mediaresaApi.shareAdPlacement(adPlacementId, $scope.contact).then(function () { 11 | $scope.msgSend = true; 12 | $timeout(function() { 13 | $uibModalInstance.close(); 14 | }, 2000); 15 | }); 16 | }; 17 | 18 | $scope.cancel = function () { 19 | $uibModalInstance.dismiss('cancel'); 20 | }; 21 | 22 | }]); -------------------------------------------------------------------------------- /resources/views/emails/password-reset-process.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Mot de passe égaré?

    11 |

    12 | Vous avez indiqué sur notre site que vous avez oublié votre mot de passe.
    Pour le 13 | réinitialiser, merci de cliquer sur le bouton ci-dessous : 14 |

    15 |
    16 |
    17 | 18 | 19 | 20 | 21 |
    22 | Réinitialiser 23 | mot de passe 24 |
    25 | 26 | 27 | {% endblock %} -------------------------------------------------------------------------------- /app/Http/Middleware/AdNetwork/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = Auth::ad_network(); 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) 36 | { 37 | if ($request->ajax()) 38 | { 39 | return response('Unauthorized.', 401); 40 | } 41 | else 42 | { 43 | return redirect()->guest(route('ad-network.auth.login')); 44 | } 45 | } 46 | 47 | return $next($request); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/TechnicalSupport.php: -------------------------------------------------------------------------------- 1 | 'name', 18 | 'save_to' => 'slug', 19 | ]; 20 | 21 | protected $fillable = ['name', 'description', 'price']; 22 | 23 | protected $casts = [ 24 | 'price' => 'float', 25 | ]; 26 | 27 | protected static $search_rules = [ 28 | 'technical_support.name' => [ 29 | 'operator' => 'ILIKE', 30 | 'value' => '%{value}%', 31 | ], 32 | 'technical_support.description' => [ 33 | 'operator' => 'ILIKE', 34 | 'value' => '%{value}%', 35 | ], 36 | ]; 37 | 38 | protected static $order_by = ['name' => 'ASC']; 39 | } 40 | -------------------------------------------------------------------------------- /database/seeds/FrequencySeeder.php: -------------------------------------------------------------------------------- 1 | 'Quotidien' 19 | ]); 20 | 21 | Frequency::create([ 22 | 'name' => 'Hebdomadaire' 23 | ]); 24 | 25 | Frequency::create([ 26 | 'name' => 'Bimensuel' 27 | ]); 28 | 29 | Frequency::create([ 30 | 'name' => 'Mensuel' 31 | ]); 32 | 33 | Frequency::create([ 34 | 'name' => 'Bimestriel' 35 | ]); 36 | 37 | Frequency::create([ 38 | 'name' => 'Trimestriel' 39 | ]); 40 | 41 | Frequency::create([ 42 | 'name' => 'Semestriel' 43 | ]); 44 | 45 | Frequency::create([ 46 | 'name' => 'Annuel' 47 | ]); 48 | 49 | Frequency::create([ 50 | 'name' => 'Autre' 51 | ]); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /app/Services/Registrar.php: -------------------------------------------------------------------------------- 1 | 'required|max:255', 19 | 'email' => 'required|email|max:255|unique:users', 20 | 'password' => 'required|confirmed|min:6', 21 | ]); 22 | } 23 | 24 | /** 25 | * Create a new user instance after a valid registration. 26 | * 27 | * @param array $data 28 | * @return User 29 | */ 30 | public function create(array $data) 31 | { 32 | return User::create([ 33 | 'name' => $data['name'], 34 | 'email' => $data['email'], 35 | 'password' => bcrypt($data['password']), 36 | ]); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /resources/assets/js/app/controllers/ad-placement-buy-modal-step7.js: -------------------------------------------------------------------------------- 1 | angular.module('mediaresa-app') 2 | .controller('AdPlacementBuyModalStep7Ctrl', ['$scope', 3 | function ($scope) { 4 | $scope.$watch('order.price', function() { 5 | $scope.order.depositPrice = Math.round($scope.order.price * ($scope.adPlacement.deposit_percent / 100) * 100) / 100; 6 | if ($scope.order.technicalSupport === undefined) { 7 | $scope.order.total = $scope.order.depositPrice; 8 | } else { 9 | $scope.order.total = $scope.order.depositPrice + $scope.order.technicalSupport.price; 10 | } 11 | $scope.order.rate = Math.round((($scope.adPlacement.vat_rate / 100) * $scope.order.total) * 100) / 100; 12 | $scope.order.totalWithRate = $scope.order.total + $scope.order.rate; 13 | $scope.order.adNetworkPrice = $scope.order.price - $scope.order.depositPrice; 14 | }); 15 | }]); -------------------------------------------------------------------------------- /resources/assets/js/components/ad_network_user_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.ad_network_user_autocomplete = { 2 | options: { 3 | ajax: { 4 | url: "/api/ad-network-user", 5 | datatype: 'json', 6 | delay: 250, 7 | data: function(params) { 8 | return { 9 | name: params.term, 10 | ad_network: $('#UpdateAdNetworkUser').attr('data-ad-network-id'), 11 | }; 12 | }, 13 | processResults: function(data, page) { 14 | return { 15 | results: data.ad_network_users, 16 | }; 17 | }, 18 | cache: true, 19 | }, 20 | minimumInputLength: 0, 21 | templateResult: function(data) { 22 | if (data.loading) return data.text; 23 | var markup = data.name + ' ' + data.family_name + ' - ' + data.email; 24 | return markup; 25 | }, 26 | templateSelection: function(data) { 27 | if (data.name) return data.name + ' ' + data.family_name + ' - ' + data.email; 28 | else return data.text; 29 | }, 30 | }, 31 | init: function(element) { 32 | element.select2(this.options); 33 | }, 34 | }; 35 | -------------------------------------------------------------------------------- /app/Extensions/TwigBridge/PublicEnv.php: -------------------------------------------------------------------------------- 1 | publicEnv as $var) { 30 | if ($var == $name) { 31 | return env($name); 32 | } 33 | } 34 | }) 35 | ]; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/Api/FormatController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 22 | $formats = Format::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 23 | } else if ($request->has('media_id')) { 24 | $media = Media::find($request->get('media_id')); 25 | $media->load('support'); 26 | $formats = Format::where('support_id', $media->support->id)->get(); 27 | } else if ($request->has('support_id')) { 28 | $formats = Format::where('support_id', $request->get('support_id'))->get(); 29 | } 30 | 31 | return response()->json(compact('formats')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Support.php: -------------------------------------------------------------------------------- 1 | 'name', 17 | 'save_to' => 'slug', 18 | ]; 19 | 20 | protected $fillable = ['name']; 21 | 22 | protected static $search_rules = [ 23 | 'support.name' => [ 24 | 'operator' => 'ILIKE', 25 | 'value' => '%{value}%', 26 | ], 27 | ]; 28 | 29 | protected static $order_by = ['name' => 'ASC']; 30 | 31 | public function themes() 32 | { 33 | return $this->hasMany('App\Theme')->orderBy('name'); 34 | } 35 | 36 | public function formats() 37 | { 38 | return $this->hasMany('App\Format')->orderBy('name'); 39 | } 40 | 41 | public function categories() 42 | { 43 | return $this->hasMany('App\Category')->orderBy('name'); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Controllers/AdNetwork/Api/FormatController.php: -------------------------------------------------------------------------------- 1 | has('name')) { 22 | $formats = Format::where('name', 'ILIKE', '%' . $request->get('name') . '%')->get(); 23 | } else if ($request->has('media_id')) { 24 | $media = Media::find($request->get('media_id')); 25 | $media->load('support'); 26 | $formats = Format::where('support_id', $media->support->id)->get(); 27 | } else if ($request->has('support_id')) { 28 | $formats = Format::where('support_id', $request->get('support_id'))->get(); 29 | } 30 | 31 | return response()->json(compact('formats')); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /database/seeds/TechnicalSupportSeeder.php: -------------------------------------------------------------------------------- 1 | technical_supports as $technical_support) { 17 | $technical_support = TechnicalSupport::create([ 18 | 'name' => $technical_support["name"], 19 | 'description' => $technical_support["description"], 20 | 'price' => $technical_support["price"], 21 | ]); 22 | 23 | // We need to set a special slug to avoid bugs 24 | // with our search engine 25 | if ($technical_support->id === 1) { 26 | $technical_support->slug = "template"; 27 | $technical_support->save(); 28 | } 29 | } 30 | } 31 | 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Requests/AdNetwork/MediaCoverRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'mimes:jpeg,png', 'max:1000'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'cover.required' => 'Veuillez sélectionner L\'image de couverture.', 33 | 'cover.mimes' => 'L\'image de couverture doit être de format jpeg ou png.', 34 | 'cover.max' => 'L\'image de couverture doit être inférieure à 1 MB.' 35 | ]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/MediaCoverRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'mimes:jpeg,png', 'max:1000'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'cover.required' => 'Veuillez sélectionner L\'image de couverture.', 33 | 'cover.mimes' => 'L\'image de couverture doit être de format jpeg ou png.', 34 | 'cover.max' => 'L\'image de couverture doit être inférieure à 1 MB.' 35 | ]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225955_create_format_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->integer('support_id')->unsigned(); 21 | 22 | $table->foreign('support_id') 23 | ->references('id') 24 | ->on('support') 25 | ->onUpdate('CASCADE') 26 | ->onDelete('CASCADE'); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('format'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateTemplateRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'description' => ['required'], 27 | 'cover' => ['mimes:jpeg,png', 'max:1000'] 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'name.required' => 'Veuillez saisir le nom du gabarit.', 35 | 'description.required' => 'Veuillez saisir la description du gabarit.', 36 | 'cover.mimes' => 'Le visuel de couverture doit être au format jpeg ou png.', 37 | 'cover.max' => 'L\'image de couverture doit être inférieure à 1 MB.' 38 | ]; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225937_create_theme_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->integer('support_id')->unsigned(); 21 | 22 | $table->foreign('support_id') 23 | ->references('id') 24 | ->on('support') 25 | ->onUpdate('CASCADE') 26 | ->onDelete('CASCADE'); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('theme'); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_235305_create_invoice_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->softDeletes(); 18 | $table->timestamps(); 19 | 20 | $table->string('name')->unique(); 21 | $table->string('buyer_name'); 22 | $table->string('buyer_address'); 23 | $table->string('buyer_zipcode'); 24 | $table->string('buyer_city'); 25 | $table->decimal('amount'); 26 | }); 27 | } 28 | 29 | /** 30 | * Reverse the migrations. 31 | * 32 | * @return void 33 | */ 34 | public function down() 35 | { 36 | Schema::drop('invoice'); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_230219_create_category_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('slug')->unique(); 20 | $table->integer('support_id')->unsigned(); 21 | 22 | $table->foreign('support_id') 23 | ->references('id') 24 | ->on('support') 25 | ->onUpdate('CASCADE') 26 | ->onDelete('CASCADE'); 27 | }); 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('category'); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreMediaRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'frequency_id' => ['required'], 27 | 'datas' => ['max:250'], 28 | 'ad_network_id' => ['required'] 29 | ]; 30 | } 31 | 32 | public function messages() 33 | { 34 | return [ 35 | 'name.required' => 'Veuillez saisir le nom du support.', 36 | 'frequency_id.required' => 'Veuillez saisir la périodicité du média.', 37 | 'datas.max' => 'Le champ des indicateurs est limité à 250 caractères.', 38 | 'ad_network_id.required' => 'Veuillez saisir la régie associée au média.' 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateMediaRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'frequency_id' => ['required'], 27 | 'datas' => ['max:250'], 28 | 'ad_network_id' => ['required'] 29 | ]; 30 | } 31 | 32 | public function messages() 33 | { 34 | return [ 35 | 'name.required' => 'Veuillez saisir le nom du support.', 36 | 'frequency_id.required' => 'Veuillez saisir la périodicité du média.', 37 | 'datas.max' => 'Le champ des indicateurs est limité à 250 caractères.', 38 | 'ad_network_id.required' => 'Veuillez saisir la régie associée au média.' 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MediaResa", 3 | "version": "1.0.0", 4 | "description": "MediaResa, site d'innovation dans le secteur de la Régie Publicitaire ", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git" 11 | }, 12 | "bugs": { 13 | "url": "http://gitlab.escaledigitale.com/mediaresa/mediaresa-app/issues" 14 | }, 15 | "homepage": "http://gitlab.escaledigitale.com/mediaresa/mediaresa-app", 16 | "devDependencies": { 17 | "grunt": "0.4.5", 18 | "grunt-autoprefixer": "3.0.3", 19 | "grunt-contrib-concat": "0.5.1", 20 | "grunt-contrib-connect": "0.11.2", 21 | "grunt-contrib-copy": "0.8.1", 22 | "grunt-contrib-imagemin": "1.0.0", 23 | "grunt-contrib-jshint": "0.12.0", 24 | "grunt-contrib-less": "1.1.0", 25 | "grunt-contrib-uglify": "0.11.1", 26 | "grunt-contrib-watch": "0.6.1", 27 | "grunt-criticalcss": "1.0.2", 28 | "grunt-css-count": "0.3.1", 29 | "grunt-csso": "0.8.1", 30 | "grunt-sass": "1.1.0" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /resources/assets/js/jquery-btn-ajax.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | $('.btn.btn-ajax').on('click', function() { 3 | var btn = $(this); 4 | var selected = btn.find('.btn-ajax-selected').first(); 5 | var notSelected = btn.find("[data-btn-ajax-type]:not(.btn-ajax-selected)"); 6 | var selectedUrl = selected.attr("data-btn-ajax-url"); 7 | var selectedType = selected.attr("data-btn-ajax-type"); 8 | btn.attr("disabled", true); 9 | $.ajax({ 10 | url: selectedUrl, 11 | type: selectedType, 12 | success: function (result) { 13 | if(notSelected.length == 1) { 14 | notSelected.first().addClass('btn-ajax-selected'); 15 | selected.removeClass('btn-ajax-selected'); 16 | } 17 | if(selected.attr("data-btn-ajax-success") == "reload") { 18 | location.reload(); 19 | } 20 | } 21 | }).done(function() { 22 | btn.attr("disabled", false); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')) 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path().'/framework/views'), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /resources/views/main/modals/signup_starter.twig: -------------------------------------------------------------------------------- 1 | {% embed 'main.modals.modal' %} 2 | {% set modal_id = "signup" %} 3 | {% import "main.partials.form_layout" as form %} 4 | {% import "main.partials.select" as select %} 5 | {% set modal_name = "Créez gratuitement votre compte" %} 6 | {% block modal_body %} 7 | 20 | {% endblock %} 21 | {% endembed %} 22 | -------------------------------------------------------------------------------- /resources/assets/js/components/format_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.format_update_autocomplete = { 2 | getData: function(query) { 3 | var request = $.ajax({ 4 | url: "/api/format" + query, 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element, media_id) { 13 | element.select2().empty(); 14 | var format_id = element.attr('data-format-id'); 15 | var query = "?media_id=" + media_id; 16 | 17 | this.getData(query).done(function(request) { 18 | var formats = $.map(request.formats, function(format) { 19 | format.text = format.name; 20 | 21 | return format; 22 | }); 23 | 24 | if (formats.length === 0) { 25 | element.parent().hide(); 26 | element.prop('disabled', true); 27 | } else { 28 | // clear existing options and update them with new options 29 | element.select2().empty(); 30 | element.select2({data: formats}).val(format_id).trigger('change'); 31 | 32 | element.prop('disabled', false); 33 | element.parent().show(); 34 | } 35 | }); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreTechnicalSupportRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'description' => ['required'], 27 | 'price' => ['required', 'regex:/^[1-9]\d*((\.|,)\d+)?$/'], 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'name.required' => 'Veuillez saisir le nom du support technique.', 35 | 'description.required' => 'Veuillez saisir la description du support technique.', 36 | 'price.required' => 'Veuillez saisir le prix du support technique.', 37 | 'price.regex' => 'Le prix doit avoir un format monétaire.', 38 | ]; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateTechnicalSupportRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'description' => ['required'], 27 | 'price' => ['required', 'regex:/^[1-9]\d*((\.|,)\d+)?$/'], 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'name.required' => 'Veuillez saisir le nom du support technique.', 35 | 'description.required' => 'Veuillez saisir la description du support technique.', 36 | 'price.required' => 'Veuillez saisir le prix du support technique.', 37 | 'price.regex' => 'Le prix doit avoir un format monétaire.', 38 | ]; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /resources/assets/js/components/theme_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.theme_autocomplete = { 2 | getData: function(query) { 3 | var request = $.ajax({ 4 | url: "/api/theme" + query, 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | var support_id = element.attr('data-support-id'); 15 | var query = (typeof support_id !== 'undefined') ? "?support_id=" + support_id : ""; 16 | 17 | this.getData(query).done(function(request) { 18 | var themes = $.map(request.themes, function(theme) { 19 | theme.text = theme.name; 20 | 21 | return theme; 22 | }); 23 | 24 | if (themes.length === 0) { 25 | element.parent().hide(); 26 | element.prop('disabled', true); 27 | } else { 28 | // clear existing options and update them with new options 29 | element.select2().empty(); 30 | element.select2({data: themes}); 31 | 32 | // show element 33 | element.prop('disabled', false); 34 | element.parent().show(); 35 | } 36 | }); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /resources/views/emails/ad-placement-published-confirmation.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Bonjour {{ referent.name }}, votre emplacement a été publié

    11 |

    12 | Votre emplacement {{ ad_placement.name }} concernant le support {{ media.name }} vient d'être 13 | publié. Vous pouvez le consulter en cliquant sur le bouton ci-dessous. 14 |

    15 |
    16 |
    17 | 18 | 19 | 20 | 21 |
    22 | Consulter emplacement 24 |
    25 | 26 | 27 | {% endblock %} -------------------------------------------------------------------------------- /app/Http/Requests/Admin/MediaTechnicalDocRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'mimes:pdf', 'max:5000'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'technical_doc.required' => 'Veuillez sélectionner la documentation technique.', 33 | 'technical_doc.mimes' => 'La documentation technique doit être un PDF.', 34 | 'technical_doc.max' => 'La taille de la documentation technique doit être inférieure à 5 MB.' 35 | ]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /resources/assets/js/components/category_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.category_autocomplete = { 2 | getData: function(query) { 3 | var request = $.ajax({ 4 | url: "/api/category" + query, 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | element.select2().empty(); 14 | var support_id = element.attr('data-support-id'); 15 | var query = (typeof support_id !== 'undefined') ? "?support_id=" + support_id : ""; 16 | 17 | this.getData(query).done(function(request) { 18 | var categories = $.map(request.categories, function(category) { 19 | category.text = category.name; 20 | 21 | return category; 22 | }); 23 | 24 | if (categories.length === 0) { 25 | element.parent().hide(); 26 | element.prop('disabled', true); 27 | } else { 28 | // clear existing options and update them with new options 29 | element.select2().empty(); 30 | element.select2({data: categories}); 31 | 32 | element.prop('disabled', false); 33 | element.parent().show(); 34 | } 35 | }); 36 | } 37 | }; 38 | -------------------------------------------------------------------------------- /app/Http/Requests/AdNetwork/MediaTechnicalDocRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'mimes:pdf', 'max:5000'], 26 | ]; 27 | } 28 | 29 | public function messages() 30 | { 31 | return [ 32 | 'technical_doc.required' => 'Veuillez sélectionner la documentation technique.', 33 | 'technical_doc.mimes' => 'La documentation technique doit être un PDF.', 34 | 'technical_doc.max' => 'La taille de la documentation technique doit être inférieure à 5 MB.' 35 | ]; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /resources/assets/scss/_view-home.scss: -------------------------------------------------------------------------------- 1 | .home { 2 | .how-it-works { 3 | padding: 40px 0; 4 | .how-it-works-container { 5 | @include make-row(0); 6 | margin-top: 30px; 7 | .how-it-works-part { 8 | @include make-sm-column(3); 9 | margin-bottom: 30px; 10 | @media (min-width: $screen-sm-min) { 11 | margin-bottom: 0; 12 | } 13 | .how-it-works-redirection { 14 | border-radius: 50%; 15 | height: 120px; 16 | display: inline-block; 17 | width: 120px; 18 | } 19 | .how-it-works-picto-part { 20 | text-align: center; 21 | margin-bottom: 10px; 22 | } 23 | .how-it-works-text { 24 | text-align: center; 25 | } 26 | } 27 | } 28 | } 29 | .last-offers { 30 | @include make-row(); 31 | margin: 0; 32 | background-color: lighten($pearl-gray, 4%); 33 | border-top: 1px solid $pearl-gray; 34 | padding: 50px 30px; 35 | .panel-offer { 36 | @include make-md-column(6); 37 | padding: 0; 38 | &:nth-child(even) { 39 | clear: left; 40 | } 41 | .panel-placement { 42 | margin: 10px; 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /resources/views/emails/buyer-subscription-alert.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Une inscription est en attente de validation

    11 |

    12 | L'{{ buyer.type_fr }} {{ buyer.name }} vient de s'inscrire avec pour référent {{ referent.name }} {{ referent.family_name }}. 13 | Si aucun administrateur n'a validé cette inscription, vous pouvez le faire en cliquant sur le bouton ci-dessous. 14 |

    15 |
    16 |
    17 | 18 | 19 | 20 | 21 |
    22 | Valider l'inscription 23 |
    24 | 25 | 26 | {% endblock %} 27 | -------------------------------------------------------------------------------- /app/Http/Controllers/Admin/AcquisitionController.php: -------------------------------------------------------------------------------- 1 | ajax()) { 19 | $acquisitions = Acquisition::search($request->all(), ['adPlacement.media', 'invoice', 'user']); 20 | 21 | return response()->json($acquisitions); 22 | } 23 | } 24 | 25 | /** 26 | * Display specific resource 27 | * 28 | * @return Response 29 | */ 30 | public function show(Acquisition $acquisition) { 31 | $acquisition->load( 32 | 'adPlacement.media.supportType.category', 33 | 'adPlacement.media.supportType.support', 34 | 'adPlacement.media.target', 35 | 'adPlacement.media.theme', 36 | 'adPlacement.media.broadcastingArea' 37 | ); 38 | 39 | return view('admin.acquisition.show', compact('acquisition')); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step6.html: -------------------------------------------------------------------------------- 1 |

    Décrivez votre besoin et uploadez vos fichiers

    2 | -------------------------------------------------------------------------------- /public/partials/modal/ad-placement-buy-step8.html: -------------------------------------------------------------------------------- 1 |

    Choisissez votre mode de paiement

    2 |

    3 | Pour enregistrer votre offre, merci de choisir votre mode de paiement : une empreinte bancaire sera enregistrée, cependant le prélèvement ne sera effectuée que si la régie accepte votre offre 4 |

    5 |

    Un réglement par carte bleue vous permettera de réserver instantanément un emplacement.

    6 |
    7 | 10 | 13 |
    14 |
    15 | 18 |
    19 | -------------------------------------------------------------------------------- /app/Listeners/EmailBuyerSubscriptionConfirmation.php: -------------------------------------------------------------------------------- 1 | referent; 31 | 32 | Mail::send('emails.buyer-subscription', compact('referent'), function($message) use ($referent) { 33 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 34 | $message->to($referent->email); 35 | $message->subject('Confirmation d\'inscription à MediaResa'); 36 | }); 37 | 38 | return true; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resources/assets/scss/_colors.scss: -------------------------------------------------------------------------------- 1 | // Colors 2 | // ------------------------ 3 | $light-green: #A9BB3C; 4 | $dark-green: #869430; 5 | $duck-blue: #005075; 6 | $dark-duck-blue: #003c57; 7 | $light-blue: #eaf0f3; 8 | $black: #000; 9 | $carbon-gray: #444444; 10 | $dark-gray: #777777; 11 | $rock-gray: #888888; 12 | $ash-gray: #aeaeae; 13 | $light-gray: #cccccc; 14 | $pearl-gray: #eaeaea; 15 | $bkg-gray: lighten($pearl-gray, 4%); 16 | $white: #fff; 17 | 18 | $brand-primary: $light-green; 19 | $dark-brand-primary: $dark-green; 20 | 21 | $text-color: $carbon-gray; 22 | $body-bg: #fff; 23 | 24 | // Social Colors 25 | // ------------------------ 26 | 27 | $facebook-color: #3b5998; 28 | $twitter-color: #00aced; 29 | $google-plus-color: #dd4b39; 30 | $youtube-color: #bb0000; 31 | $linkedin-color: #007bb6; 32 | $instagram-color: #517fa4; 33 | $pinterest-color: #cb2027; 34 | $quora-color: #a82400; 35 | $flickr-color: #ff0084; 36 | $tumblr-color: #32506d; 37 | $vimeo-color: #aad450; 38 | $foursquare-color: #0072b1; 39 | 40 | .dark { 41 | color: $carbon-gray !important; 42 | } 43 | 44 | .green { 45 | color: $brand-primary !important; 46 | } 47 | -------------------------------------------------------------------------------- /app/Listeners/EmailBuyerPasswordResetConfirmation.php: -------------------------------------------------------------------------------- 1 | referent; 31 | 32 | Mail::send('emails.password-reset-confirmation', compact('referent'), function($message) use ($referent) { 33 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 34 | $message->to($referent->email); 35 | $message->subject('Confirmation de réinitialisation de votre mot de passe'); 36 | }); 37 | 38 | return true; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreTemplateRequest.php: -------------------------------------------------------------------------------- 1 | ['required'], 26 | 'description' => ['required'], 27 | 'cover' => ['required', 'mimes:jpeg,png', 'max:1000'], 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'name.required' => 'Veuillez saisir le nom du gabarit.', 35 | 'description.required' => 'Veuillez saisir la description du gabarit.', 36 | 'cover.required' => 'Veuillez sélectionner la couverture du gabarit.', 37 | 'cover.mimes' => 'Le visuel de couverture doit être au format jpeg ou png.', 38 | 'cover.max' => 'L\'image de couverture doit être inférieure à 1 MB.' 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/UpdateAdminRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email', 'unique:admin,email,' . $this->route()->parameter('admin')->id], 26 | 'name' => ['required'], 27 | 'password' => ['sometimes', 'min:8'], 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'email.required' => 'Veuillez renseigner l\'adresse email.', 35 | 'email.email' => 'Votre adresse email n\'est pas au bon format.', 36 | 'email.unique' => 'L\'adresse email doit être unique.', 37 | 'name.required' => 'Veuillez renseigner le nom.', 38 | 'password.min' => 'Votre mot de passe doit faire plus de 8 caractères.', 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Listeners/EmailBuyerSubscriptionAccepted.php: -------------------------------------------------------------------------------- 1 | referent; 31 | 32 | Mail::send('emails.buyer-subscription-accepted', compact('referent'), function($message) use ($referent) { 33 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 34 | $message->to($referent->email); 35 | $message->subject('Votre inscription a été acceptée'); 36 | }); 37 | 38 | return true; 39 | } 40 | } 41 | 42 | 43 | -------------------------------------------------------------------------------- /resources/assets/js/components/theme_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.theme_update_autocomplete = { 2 | getData: function(query) { 3 | var request = $.ajax({ 4 | url: "/api/theme" + query, 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | init: function(element) { 13 | var support_id = element.attr('data-support-id'); 14 | var theme_id = element.attr('data-theme-id'); 15 | var query = (typeof support_id !== 'undefined') ? "?support_id=" + support_id : ""; 16 | 17 | this.getData(query).done(function(request) { 18 | var themes = $.map(request.themes, function(theme) { 19 | theme.text = theme.name; 20 | 21 | return theme; 22 | }); 23 | 24 | if (themes.length === 0) { 25 | element.parent().hide(); 26 | element.prop('disabled', true); 27 | } else { 28 | // clear existing options and update them with new options 29 | element.select2().empty(); 30 | element.select2({data: themes}).val(theme_id).trigger('change'); 31 | 32 | // show element 33 | element.prop('disabled', false); 34 | element.parent().show(); 35 | } 36 | }); 37 | } 38 | }; 39 | -------------------------------------------------------------------------------- /app/Listeners/EmailAdNetworkPasswordResetConfirmation.php: -------------------------------------------------------------------------------- 1 | referent; 31 | 32 | Mail::send('emails.password-reset-confirmation', compact('referent'), function($message) use ($referent) { 33 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 34 | $message->to($referent->email); 35 | $message->subject('Confirmation de réinitialisation de votre mot de passe'); 36 | }); 37 | 38 | return true; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /resources/assets/scss/_shame.scss: -------------------------------------------------------------------------------- 1 | // --- 2 | // Shameful Styles 3 | // --- 4 | 5 | // Put all of the styles you are ashamed of in here. 6 | // Courtesy Harry Roberts: http://csswizardry.com/2013/04/shame-css/ 7 | 8 | //The rules 9 | 10 | //Obviously you need some kind of rules and criteria: 11 | 12 | //1. If it’s a hack, it goes in shame.css. 13 | //2. Document all hacks fully: 14 | //What part of the codebase does it relate to? 15 | //Why was this needed? 16 | //How does this fix it? 17 | //How might you fix it properly, given more time? 18 | //3. Do not blame the developer; if they explained why they had to do it then their reasons are probably (hopefully) valid. 19 | //4. Try and clean shame.css up when you have some down time. 20 | //Even better, get a tech-debt story in which you can dedicate actual sprint time to it. 21 | 22 | /** 23 | * Example : Nav specificity fix. 24 | * 25 | * Someone used an ID in the header code (`#header a {}`) which trumps the 26 | * nav selectors (`.site-nav a {}`). Use !important to override it until I 27 | * have time to refactor the header stuff. 28 | 29 | .site-nav a { 30 | color: #BADA55 !important; 31 | } 32 | */ 33 | -------------------------------------------------------------------------------- /app/Extensions/TwigBridge/UserAuth.php: -------------------------------------------------------------------------------- 1 | auth = Auth::user(); 25 | } 26 | 27 | /** 28 | * {@inheritDoc} 29 | */ 30 | public function getName() 31 | { 32 | return 'App_Extensions_Twigbridge_UserAuth'; 33 | } 34 | 35 | /** 36 | * {@inheritDoc} 37 | */ 38 | public function getFunctions() 39 | { 40 | return [ 41 | new Twig_SimpleFunction('user_auth_check', [$this->auth, 'check']), 42 | new Twig_SimpleFunction('user_auth_guest', [$this->auth, 'guest']), 43 | new Twig_SimpleFunction('user_auth_get', [$this->auth, 'get']), 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /resources/views/main/auth/signup.twig: -------------------------------------------------------------------------------- 1 | {% extends "main.layout.layout" %} 2 | 3 | {% set title = "Inscription" %} 4 | 5 | {% block content %} 6 |
    7 | 8 |

    Inscription sur la plateforme

    9 |
    10 |
    11 |
    12 | {% include "main.forms.buyer_account" %} 13 | 15 | 16 | 17 |
    18 | 19 |
    20 |
    21 |
    22 |
    23 |
    24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /resources/assets/js/components/target_update_autocomplete.js: -------------------------------------------------------------------------------- 1 | mediaresa.target_update_autocomplete = { 2 | getData: function() { 3 | var request = $.ajax({ 4 | url: "/api/target", 5 | datatype: 'json', 6 | delay: 250, 7 | cache: true, 8 | }); 9 | 10 | return request; 11 | }, 12 | getDataDefaultTargets: function(media_id) { 13 | var request = $.ajax({ 14 | url: "/api/target?media_id=" + media_id, 15 | datatype: 'json', 16 | cache: true, 17 | }); 18 | 19 | return request; 20 | }, 21 | init: function(element) { 22 | element.select2().empty(); 23 | var media_id = element.attr('data-media-id'); 24 | 25 | this.getData().done(function(request) { 26 | var targets = $.map(request.targets, function(target) { 27 | target.text = target.name; 28 | 29 | return target; 30 | }); 31 | 32 | element.select2({data: targets, multiple: true}); 33 | }); 34 | 35 | if (typeof media_id !== 'undefined' && media_id !== '') { 36 | this.getDataDefaultTargets(media_id).done(function(request) { 37 | var default_targets = request.targets; 38 | element.select2().val(default_targets).trigger('change'); 39 | }); 40 | } 41 | } 42 | }; 43 | 44 | -------------------------------------------------------------------------------- /app/Extensions/TwigBridge/AdminAuth.php: -------------------------------------------------------------------------------- 1 | auth = Auth::admin(); 25 | } 26 | 27 | /** 28 | * {@inheritDoc} 29 | */ 30 | public function getName() 31 | { 32 | return 'App_Extensions_Twigbridge_AdminAuth'; 33 | } 34 | 35 | /** 36 | * {@inheritDoc} 37 | */ 38 | public function getFunctions() 39 | { 40 | return [ 41 | new Twig_SimpleFunction('admin_auth_check', [$this->auth, 'check']), 42 | new Twig_SimpleFunction('admin_auth_guest', [$this->auth, 'guest']), 43 | new Twig_SimpleFunction('admin_auth_get', [$this->auth, 'get']), 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/Http/Requests/Admin/StoreAdminRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email', 'unique:admin,email'], 26 | 'name' => ['required'], 27 | 'password' => ['required', 'min:8'], 28 | ]; 29 | } 30 | 31 | public function messages() 32 | { 33 | return [ 34 | 'email.required' => 'Veuillez renseigner l\'adresse email.', 35 | 'email.email' => 'Votre adresse email n\'est pas au bon format.', 36 | 'email.unique' => 'L\'adresse email doit être unique.', 37 | 'name.required' => 'Veuillez renseigner le nom.', 38 | 'password.required' => 'Veuillez renseigner le mot de passe.', 39 | 'password.min' => 'Votre mot de passe doit faire plus de 8 caractères.', 40 | ]; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Requests/Main/ResetPasswordRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email', 'exists:user,email'], 26 | 'password' => ['sometimes', 'required', 'min:8', 'confirmed'], 27 | ]; 28 | } 29 | 30 | public function messages() 31 | { 32 | return [ 33 | 'email.email' => 'L\'email est invalide.', 34 | 'email.required' => 'Veuillez saisir votre email.', 35 | 'email.exists' => 'Aucun utilisateur existant pour l\'email donné.', 36 | 'password.required' => 'Veuillez saisir votre mot de passe.', 37 | 'password.min' => 'Votre mot de passe doit contenir au minimum 8 caractères.', 38 | 'password.confirmed' => 'Les mots de passe ne sont pas identiques.', 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Listeners/EmailBuyerPasswordResetProcess.php: -------------------------------------------------------------------------------- 1 | referent; 31 | $reset_path = $event->reset_path; 32 | 33 | Mail::send('emails.password-reset-process', compact('referent', 'reset_path'), function($message) use ($referent) { 34 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 35 | $message->to($referent->email); 36 | $message->subject('Votre demande de réinitialisation de mot de passe'); 37 | }); 38 | 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /resources/views/emails/ad-placement-share.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | {% if user is not null %} 10 |

    Bonjour, {{ user.name }} vient de vous partager une offre

    11 | {% else %} 12 |

    Bonjour, on vient de vous partager une offre

    13 | {% endif %} 14 |

    15 | {% autoescape %} 16 | {{ contact_message }} 17 | {% endautoescape %} 18 |

    19 |
    20 |
    21 | 22 | 23 | 24 | 25 |
    26 | Consulter l'offre 28 |
    29 | 30 | 31 | {% endblock %} -------------------------------------------------------------------------------- /app/Http/Requests/AdNetwork/ResetPasswordRequest.php: -------------------------------------------------------------------------------- 1 | ['required', 'email', 'exists:ad_network_user,email'], 26 | 'password' => ['sometimes', 'required', 'min:8', 'confirmed'], 27 | ]; 28 | } 29 | 30 | public function messages() 31 | { 32 | return [ 33 | 'email.email' => 'L\'email est invalide.', 34 | 'email.required' => 'Veuillez saisir votre email.', 35 | 'email.exists' => 'Aucun utilisateur existant pour l\'email donné.', 36 | 'password.required' => 'Veuillez saisir votre mot de passe.', 37 | 'password.min' => 'Votre mot de passe doit contenir au minimum 8 caractères.', 38 | 'password.confirmed' => 'Les mots de passe ne sont pas identiques.', 39 | ]; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Listeners/EmailOfferConfirmation.php: -------------------------------------------------------------------------------- 1 | offer; 31 | $ad_placement = $offer->adPlacement; 32 | $media = $ad_placement->media; 33 | $buyer = $offer->user; 34 | 35 | Mail::send('emails.offer-confirmed', compact('offer', 'buyer', 'ad_placement', 'media'), function($message) use ($buyer) { 36 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 37 | $message->to($buyer->email); 38 | $message->subject('Votre offre a été acceptée'); 39 | }); 40 | 41 | return true; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /database/migrations/2016_05_15_225819_create_user_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->timestamps(); 19 | $table->softDeletes(); 20 | 21 | $table->string('name'); 22 | $table->string('family_name'); 23 | $table->string('title'); 24 | $table->string('function'); 25 | $table->string('email')->unique(); 26 | $table->string('phone'); 27 | $table->string('password', 60)->nullable(); 28 | $table->rememberToken(); 29 | $table->integer('buyer_id')->unsigned(); 30 | }); 31 | } 32 | 33 | /** 34 | * Reverse the migrations. 35 | * 36 | * @return void 37 | */ 38 | public function down() 39 | { 40 | Schema::drop('user'); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /resources/views/emails/offer-confirmed.twig: -------------------------------------------------------------------------------- 1 | {% extends 'emails.layout' %} 2 | 3 | {% block content %} 4 | 5 | 6 |
    7 |
    8 |
    9 | 10 |

    Bonjour {{ buyer.name }}, votre offre a été acceptée

    11 |

    12 | Votre offre de {{ offer.amount }} € HT concernant l'emplacement {{ ad_placement.name }} du 13 | support {{ media.name }} a été acceptée. 14 |

    15 |

    16 | Vous pouvez consulter vos demandes validées en cliquant sur le bouton ci-dessous. 17 |

    18 |
    19 |
    20 | 21 | 22 | 23 | 24 |
    25 | Demandes validées 27 |
    28 | 29 | 30 | {% endblock %} -------------------------------------------------------------------------------- /app/Listeners/EmailAdNetworkPasswordResetProcess.php: -------------------------------------------------------------------------------- 1 | referent; 31 | $reset_path = $event->reset_path; 32 | 33 | Mail::send('emails.password-reset-process', compact('referent', 'reset_path'), function($message) use ($referent) { 34 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 35 | $message->to($referent->email); 36 | $message->subject('Votre demande de réinitialisation de mot de passe'); 37 | }); 38 | 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/Listeners/EmailAuctionWonNotification.php: -------------------------------------------------------------------------------- 1 | auction; 31 | $ad_placement = $auction->adPlacement; 32 | $media = $ad_placement->media; 33 | $user = $auction->user; 34 | 35 | Mail::send('emails.auction-won', compact('auction', 'ad_placement', 'media', 'user'), function($message) use ($user) { 36 | $message->from(env('MAIL_CONTACT'), env('MAIL_NAME')); 37 | $message->to($user->email); 38 | $message->subject('Notification enchère gagnante'); 39 | }); 40 | 41 | return true; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /app/Http/Controllers/Main/api/AdPlacementController.php: -------------------------------------------------------------------------------- 1 | load('media.support', 14 | 'media.category', 15 | 'media.targets', 16 | 'media.theme', 17 | 'media.broadcastingArea', 18 | 'media.frequency', 19 | 'format'); 20 | 21 | if(!Auth::user()->check()) { 22 | $adPlacement->minimum_price = null; 23 | $adPlacement->price = null; 24 | } 25 | 26 | return response()->json($adPlacement); 27 | } 28 | 29 | public function share(AdPlacement $adPlacement, ShareAdPlacementRequest $request) 30 | { 31 | event(new AdPlacementWasShared($adPlacement, Auth::user()->get(), $request->get('email'), $request->get('message'))); 32 | return response()->json("ok"); 33 | } 34 | 35 | } 36 | --------------------------------------------------------------------------------