Advertisement
nathanjell

minimal.blade.php

Mar 26th, 2016
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 11.54 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="utf-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  6.     <title>EPL Business Plan</title>
  7.  
  8.     <!-- Bootstrap -->
  9.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  10.     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" integrity="sha384-fLW2N01lMqjakBkx3l/M9EahuwpSfeNvV63J5ezn3uZzapT0u7EYsXMjQV+0En5r" crossorigin="anonymous">
  11.  
  12.     <!-- Fonts -->
  13.     <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel='stylesheet' type='text/css'>
  14.     <link href="https://fonts.googleapis.com/css?family=Lato:100,300,400,700" rel='stylesheet' type='text/css'>
  15.  
  16.     <!-- Local style -->
  17.     <link rel="stylesheet" href="/css/minimal.css">
  18. </head>
  19. <body>
  20.  
  21. <div class="head">
  22. <div class="page-header">
  23.     <?php
  24.    use Carbon\Carbon;
  25.    $start_year = Carbon::createFromFormat("Y-m-d", $plan->startdate)->format("Y");
  26.     $end_year = Carbon::createFromFormat("Y-m-d", $plan->enddate)->format("Y");
  27.     ?>
  28.     <h1>Business Plan <small>{{ $start_year }}-{{ $end_year }}</small></h1>
  29. </div>
  30. </div>
  31.  
  32. <div class="business-plan">
  33.     @if(count($plan->goals->all()) > 0)
  34.     @foreach($plan->goals as $goal)
  35.         <div class="panel panel-primary">
  36.             <div class="panel-heading" style="background: #009FD7;">
  37.                 <span class="badge" id="bp-count">{{ count($goal->objectives->all()) }} Objectives</span>
  38.                 <h4 class="panel-title">{{ $goal->body }}</h4>
  39.             </div>
  40.             <div class="panel-body">
  41.  
  42.                 @if(count($goal->objectives->all()) > 0)
  43.                 @foreach($goal->objectives as $objective)
  44.                     <div class="panel panel-success">
  45.                         <div class="panel-heading" style="background: #73C146;">
  46.                             <span class="badge" id="bp-count">{{ count($objective->actions->all()) }} Actions</span>
  47.                             <h4 class="panel-title" id="objective-title">{{ $objective->body }}</h4>
  48.                         </div>
  49.                         <div class="panel-body">
  50.  
  51.                             @if(count($objective->actions->all()) > 0)
  52.                             @foreach($objective->actions as $action)
  53.                                 <div class="panel panel-default">
  54.                                     <div class="panel-heading">
  55.                                         <span class="badge" id="bp-count">{{ count($action->tasks->all()) }} Tasks</span>
  56.                                         <h4 class="panel-title">{{ $action->body }}</h4>
  57.                                         <br/>
  58.                                         <table class="table table-striped table-bordered table-condensed action-table">
  59.                                             <thead>
  60.                                             <tr>
  61.                                                 <th id="due">Due</th>
  62.                                                 <th id="owner">Owner</th>
  63.                                                 <th id="lead">Lead</th>
  64.                                                 <th id="collab">Collaborators</th>
  65.                                                 <th id="status">Status</th>
  66.                                                 <th id="success">Success Measures</th>
  67.                                             </tr>
  68.                                             </thead>
  69.                                             <tbody>
  70.                                             <tr>
  71.                                                 <td id="due">{{ $action->date }}</td>
  72.                                                 <td id="owner">{{ $action->owner }}</td>
  73.                                                 <td id="lead">
  74.                                                     <?php
  75.                                                    $leads = explode("__,__", $action->lead);
  76.                                                     foreach ($leads as $lead) {
  77.                                                         // Check if it's a valid email address
  78.                                                         if (filter_var($lead, FILTER_VALIDATE_EMAIL)) {
  79.                                                             echo \App\User::where("email", $lead)->first()->name;
  80.                                                         } else {
  81.                                                             echo $lead;
  82.                                                         }
  83.  
  84.                                                         if ($lead != $leads[count($leads)-1]) {
  85.                                                             echo ", ";
  86.                                                         }
  87.                                                     }
  88.                                                     ?>
  89.                                                 </td>
  90.                                                 <td id="collab">
  91.                                                     <?php
  92.                                                    $collaborators = explode("__,__", $action->collaborators);
  93.                                                     foreach ($collaborators as $collaborator) {
  94.                                                         // Check if it's a valid email address
  95.                                                         if (filter_var($collaborator, FILTER_VALIDATE_EMAIL)) {
  96.                                                             echo \App\User::where("email", $collaborator)->first()->name;
  97.                                                         } else {
  98.                                                             echo $collaborator;
  99.                                                         }
  100.  
  101.                                                         if ($collaborator != $collaborators[count($collaborators)-1]) {
  102.                                                             echo ", ";
  103.                                                         }
  104.                                                     }
  105.                                                     ?>
  106.                                                 </td>
  107.                                                 <td id="status">{{ $action->status }}</td>
  108.                                                 <td id="success">{{ $action->success }}</td>
  109.                                             </tr>
  110.                                             </tbody>
  111.                                         </table>
  112.                                     </div>
  113.  
  114.                                     @if(count($action->tasks->all()) > 0)
  115.                                     <div class="panel-body">
  116.  
  117.                                         <table class="table table-striped table-bordered table-condensed task-table">
  118.                                             <thead>
  119.                                             <tr>
  120.                                                 <th id="task">Task</th>
  121.                                                 <th id="due">Due</th>
  122.                                                 <th id="owner">Owner</th>
  123.                                                 <th id="lead">Lead</th>
  124.                                                 <th id="collab">Collaborators</th>
  125.                                                 <th id="status">Status</th>
  126.                                                 <th id="success">Success Measures</th>
  127.                                             </tr>
  128.                                             </thead>
  129.                                             <tbody>
  130.                                             @foreach($action->tasks as $task)
  131.                                                 <tr>
  132.                                                     <td id="task">{{ $task->body }}</td>
  133.                                                     <td id="due">{{ $task->date }}</td>
  134.                                                     <td id="owner">{{ $task->owner }}</td>
  135.                                                     <td id="lead">
  136.                                                         <?php
  137.                                                        $leads = explode("__,__", $task->lead);
  138.                                                         foreach ($leads as $lead) {
  139.                                                             // Check if it's a valid email address
  140.                                                             if (filter_var($lead, FILTER_VALIDATE_EMAIL)) {
  141.                                                                 echo \App\User::where("email", $lead)->first()->name;
  142.                                                             } else {
  143.                                                                 echo $lead;
  144.                                                             }
  145.  
  146.                                                             if ($lead != $leads[count($leads)-1]) {
  147.                                                                 echo ", ";
  148.                                                             }
  149.                                                         }
  150.                                                         ?>
  151.                                                     </td>
  152.                                                     <td id="collab">
  153.                                                         <?php
  154.                                                        $collaborators = explode("__,__", $task->collaborators);
  155.                                                         foreach ($collaborators as $collaborator) {
  156.                                                             // Check if it's a valid email address
  157.                                                             if (filter_var($collaborator, FILTER_VALIDATE_EMAIL)) {
  158.                                                                 echo \App\User::where("email", $collaborator)->first()->name;
  159.                                                             } else {
  160.                                                                 echo $collaborator;
  161.                                                             }
  162.  
  163.                                                             if ($collaborator != $collaborators[count($collaborators)-1]) {
  164.                                                                 echo ", ";
  165.                                                             }
  166.                                                         }
  167.                                                         ?>
  168.                                                     </td>
  169.                                                     <td id="status">{{ $task->status}}</td>
  170.                                                     <td id="success">{{ $task->success}}</td>
  171.                                                 </tr>
  172.                                             @endforeach
  173.                                             </tbody>
  174.                                         </table>
  175.  
  176.                                     </div>
  177.                                     @endif
  178.                                 </div>
  179.  
  180.                             @endforeach
  181.                             @endif
  182.  
  183.                         </div>
  184.                     </div>
  185.                 @endforeach
  186.                 @endif
  187.  
  188.             </div>
  189.         </div>
  190.     @endforeach
  191.     @endif
  192. </div>
  193.  
  194. </body>
  195. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement