Luca Parisio hace 2 meses
padre
commit
066cf8c32d

+ 1 - 0
composer.json

@@ -10,6 +10,7 @@
     "require": {
         "php": "^8.2",
         "guzzlehttp/guzzle": "^7.2",
+        "laravel-notification-channels/facebook-poster": "^6.2",
         "laravel/framework": "^11.0",
         "laravel/sanctum": "^4.0",
         "laravel/tinker": "^2.9"

+ 48 - 1
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "c0e3a4659b2bbef242770055d75e17b4",
+    "content-hash": "2cc3750d4357f8a9fe1d8b5292eb9f2b",
     "packages": [
         {
             "name": "brick/math",
@@ -1054,6 +1054,53 @@
             ],
             "time": "2025-02-03T10:55:03+00:00"
         },
+        {
+            "name": "laravel-notification-channels/facebook-poster",
+            "version": "6.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/laravel-notification-channels/facebook-poster.git",
+                "reference": "c92180c0e8694b5ae8ee4c27e0bc731b48b02ed9"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/laravel-notification-channels/facebook-poster/zipball/c92180c0e8694b5ae8ee4c27e0bc731b48b02ed9",
+                "reference": "c92180c0e8694b5ae8ee4c27e0bc731b48b02ed9",
+                "shasum": ""
+            },
+            "require": {
+                "guzzlehttp/guzzle": "^7.2",
+                "illuminate/notifications": "^11.0|^12.0",
+                "illuminate/support": "^11.0|^12.0",
+                "php": "^8.2"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.3.3",
+                "phpunit/phpunit": "^11.0.0"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "NotificationChannels\\FacebookPoster\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Ahmed Ashraf",
+                    "email": "ahmed29329@gmail.com"
+                }
+            ],
+            "description": "Use notification to create posts on Facebook",
+            "support": {
+                "issues": "https://github.com/laravel-notification-channels/facebook-poster/issues",
+                "source": "https://github.com/laravel-notification-channels/facebook-poster/tree/6.2.0"
+            },
+            "time": "2025-02-25T00:03:21+00:00"
+        },
         {
             "name": "laravel/framework",
             "version": "v11.45.1",

+ 10 - 6
resources/views/layouts/admin.blade.php

@@ -142,12 +142,16 @@ desired effect
         <li><a href="/admin/breaking_news"><i class="fa fa-link"></i> <span>Gestione Breaking News</span></a></li>
         
         <li><a href="/admin/home"><i class="fa fa-link"></i> <span>Gestione primo piano</span></a></li>
+        @if(Auth::user()->level == 0)
           <li><a href="/admin/sections"><i class="fa fa-link"></i> <span>Gestione layout, news e banner</span></a></li>
+        @endif
           
         @if(Auth::user()->level == 0 || Auth::user()->level == 2)
           <li><a href="/admin/events"><i class="fa fa-link"></i> <span>Gestione pagine Eventi</span></a></li>
           <li><a href="/admin/pages"><i class="fa fa-link"></i> <span>Gestione Pagine Web</span></a></li>
-          <li><a href="/admin/home_adv"><i class="fa fa-link"></i> <span>Gestione banner home-top</span></a></li>
+          @if(Auth::user()->level == 0)
+            <li><a href="/admin/home_adv"><i class="fa fa-link"></i> <span>Gestione banner home-top</span></a></li>
+          @endif
           <li><a href="/admin/videos"><i class="fa fa-link"></i> <span>Gestione Video homepage</span></a></li>
 
           <li class="header" style="color:white; font-weight: bold;">CAMPIONATI</li>
@@ -157,13 +161,13 @@ desired effect
           <li><a href="/admin/teams"><i class="fa fa-link"></i> <span>Modifica Squadre</span></a></li>
 
           @if(Auth::user()->level == 0)
-          <li class="header" style="color:white; font-weight: bold;">MULTIMEDIA</li>
-          <li><a href="/admin/home_radio"><i class="fa fa-link"></i> <span>Gestione Webradio</span></a></li>
-          
+            <li class="header" style="color:white; font-weight: bold;">MULTIMEDIA</li>
+            <li><a href="/admin/home_radio"><i class="fa fa-link"></i> <span>Gestione Webradio</span></a></li>
+            <li class="header" style="color:white; font-weight: bold;">AMMINISTRAZIONE</li>          
+          @endif  
 
-          <li class="header" style="color:white; font-weight: bold;">AMMINISTRAZIONE</li>
           <li><a href="/admin/users"><i class="fa fa-link"></i> <span>Gestione Utenti</span></a></li>
-        @endif  
+
         @endif
       </ul>
       <!-- /.sidebar-menu -->

+ 1 - 1
resources/views/layouts/frontend.blade.php

@@ -4,7 +4,7 @@
 
 	<!-- Global site tag (gtag.js) - Google Analytics -->
 	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12619965-34"></script>
-    <script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>
+    <!--<script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>-->
 
 	<script>
 	  window.dataLayer = window.dataLayer || [];

+ 1 - 1
resources/views/layouts/home.blade.php

@@ -5,7 +5,7 @@
 
     <!-- Global site tag (gtag.js) - Google Analytics -->
     <script async src="https://www.googletagmanager.com/gtag/js?id=UA-12619965-34"></script>
-    <script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>
+    <!--<script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>-->
 
     <script>
         window.dataLayer = window.dataLayer || [];

+ 1 - 1
resources/views/layouts/home_riga.blade.php

@@ -4,7 +4,7 @@
 
 	<!-- Global site tag (gtag.js) - Google Analytics -->
 	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12619965-34"></script>
-    <script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>
+    <!--<script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>-->
 
 	<script>
 	  window.dataLayer = window.dataLayer || [];

+ 1 - 1
resources/views/layouts/page.blade.php

@@ -4,7 +4,7 @@
 
 	<!-- Global site tag (gtag.js) - Google Analytics -->
 	<script async src="https://www.googletagmanager.com/gtag/js?id=UA-12619965-34"></script>
-    <script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>
+    <!--<script src="//d3u598arehftfk.cloudfront.net/prebid_hb_14302_22192.js" async></script>-->
 
 	<script>
 	  window.dataLayer = window.dataLayer || [];

+ 1 - 1
resources/views/section.blade.php

@@ -6,7 +6,7 @@
     <div class="row archivio-news">
 
         <div class="title-section col-sm-12">
-            <h1 style="width: 90%"><span>Archivio news - {{$section->name}}</span></h1>                
+            <h1 style="width: 90%"><span>Archivio news - {{$section->name != '' ? $section->name : $section->title}}</span></h1>                
         </div>
     
         @foreach($news as $n)

+ 3 - 0
resources/views/users/index.blade.php

@@ -21,6 +21,7 @@
                     <th>Admin</th>
                     <th>Livello</th>
                   @endif
+                  <th>Livello</th>
                   <th width="200" align="right"></th>
                 </tr>
                 @foreach($users as $user)
@@ -31,6 +32,8 @@
                       <td>{{$user->is_admin ? 'Si' : 'No'}}</td>
                       <td>{{$user->level}}</td>
                     @endif
+                    <td>{{$user->level == 0 ? 'Direttore' : ($user->level == 1 ? 'Autore' : 'Amministratore')}}</td>
+                    
                     <td>
                         <form action="{{ route('users.destroy',$user->id) }}" method="POST">         
                             <a href="{{ route('users.edit', $user->id) }}" type="button" class="btn btn-w-m btn-primary"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>

+ 2 - 0
routes/web.php

@@ -3170,11 +3170,13 @@ Route::get('/{slug}/elenco', function ($slug) {
 
     }
 
+
     $page = Page::where('slug', '=', $slug)->first();
     if ($page != null)
     {
 
         $section = $page;
+
         $news = News::where('page_id', '=', $page->id)->where('online', '=', true)->where('date', '<=', date("Y-m-d H:i:s"))->orderBy('date', 'DESC')->get();
 
         return view('section', compact('home', 'news', 'sections', 'pages', 'section', 'sections_menu', 'regions', 'events', 'breaking_news', 'sections_menu', 'calendars', 'aHome'));