Guest User

Untitled

a guest
Apr 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. <!-- Styles -->
  2. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
  3.  
  4. {{-- <link href="{{ asset('css/app.css') }}" rel="stylesheet"> --}}
  5.  
  6. <style>
  7. body {
  8. padding-top: 65px;
  9. padding-bottom: 20px;
  10. }
  11.  
  12. /* Set padding to keep content from hitting the edges */
  13. .body-content {
  14. padding-left: 15px;
  15. padding-right: 15px;
  16. }
  17.  
  18. /* Override the default bootstrap behavior where horizontal description lists
  19. will truncate terms that are too long to fit in the left column.
  20. Also, add a 8pm to the bottom margin
  21. */
  22. .dl-horizontal dt {
  23. white-space: normal;
  24. margin-bottom: 8px;
  25. }
  26.  
  27. /* Set width on the form input elements since they're 100% wide by default */
  28. input,
  29. select,
  30. textarea,
  31. .uploaded-file-group,
  32. .input-width-input {
  33. max-width: 380px;
  34. }
  35.  
  36. .input-delete-container {
  37. width: 46px !important;
  38. }
  39.  
  40. /* Vertically align the table cells inside body-panel */
  41. .panel-body .table > tr > td
  42. {
  43. vertical-align: middle;
  44. }
  45.  
  46. .panel-body-with-table
  47. {
  48. padding: 0;
  49. }
  50.  
  51. .mt-5 {
  52. margin-top: 5px !important;
  53. }
  54.  
  55. .mb-5 {
  56. margin-bottom: 5px !important;
  57. }
  58. </style>
  59.  
  60. @php
  61.  
  62. Menu::create('navbar', function($menu)
  63.  
  64. $menu->url ('/home', trans('home.title'));
  65.  
  66. $menu->dropdown(trans('home.ppal_database'), function ($sub)
  67. {
  68. $sub->url('/customers', trans('home.adm_db_customers'));
  69. $sub->url('/invoices', trans('home.adm_db_invoices'));
  70. $sub->url('/details', trans('home.adm_db_details'));
  71. $sub->url('/products', trans('home.adm_db_products'));
  72.  
  73. });
  74.  
  75. $menu->dropdown(trans('home.ppal_stadistics'), function ($sub)
  76. {
  77. $sub->dropdown(trans('home.std_customers'), function ($sub)
  78. {
  79. $sub->url('/home', trans('home.std_cust_solvency'));
  80. $sub->url('/home', trans('home.std_cust_products'));
  81. });
  82. $sub->divider();
  83. $sub->url('/home', trans('home.std_products_sales'));
  84.  
  85. });
  86.  
  87. $menu->dropdown(trans('home.ppal_invoice'), function ($sub) {
  88. $sub->header(trans('home.subtitle_3'));
  89. $sub->url('/home', trans('home.inv_invoice_create'));
  90. $sub->url('/home', trans('home.inv_invoice_fix'));
  91. });
  92.  
  93. // $menu->url('/logout', trans('home.logout'));
  94.  
  95. @endphp
  96.  
  97. <nav class="navbar navbar-inverse navbar-fixed-top">
  98. <div class="container">
  99. <div class="navbar-header">
  100. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
  101. <span class="sr-only">Toggle navigation</span>
  102. <span class="icon-bar">A</span>
  103. <span class="icon-bar">B</span>
  104. <span class="icon-bar">C</span>
  105. </button>
  106. <a href="{!! url('/') !!}" class="navbar-brand">{{ config('app.name', 'home') }}</a>
  107. </div>
  108. <div id="navbar" class="collapse navbar-collapse">
  109. <ul class="nav navbar-nav">
  110. <li class="active"><a href="{!! url('/') !!}">Home Laravel</a></li>
  111. </ul>
  112.  
  113. @if (Route::has('login'))
  114. <ul class="nav navbar-nav navbar-right">
  115. @if (Auth::check())
  116. // <li><a href="{{ url('/home') }}">Home</a></li>
  117. {!! Menu::render('navbar') !!}
  118. @else
  119. <li><a href="{{ url('/login') }}">{{ trans('login') }}</a></li>
  120. <li><a href="{{ url('/register') }}">{{ trans('register') }}</a></li>
  121. @endif
  122. </ul>
  123. @endif
  124.  
  125. </div><!--/.nav-collapse -->
  126. </div>
  127. </nav>
  128.  
  129. <div class="container body-content">
  130. @yield('content')
  131. </div>
  132.  
  133. <!-- Scripts -->
  134.  
  135. <script src="https://code.jquery.com/jquery-1.12.4.min.js"
  136. integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ="
  137. crossorigin="anonymous"></script>
  138. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.15.0/jquery.validate.min.js"></script>
  139. {{-- <script src="{{ asset('js/app.js') }}"></script> --}}
  140. <script type="text/javascript">
  141. $(function(){
  142.  
  143. // sends the uploaded file file to the fielselect event
  144. $(document).on('change', ':file', function() {
  145. var input = $(this);
  146. var label = input.val().replace(/\/g, '/').replace(/.*//, '');
  147.  
  148. input.trigger('fileselect', [label]);
  149. });
  150.  
  151. // Set the label of the uploaded file
  152. $(':file').on('fileselect', function(event, label) {
  153. $(this).closest('.uploaded-file-group').find('.uploaded-file-name').val(label);
  154. });
  155.  
  156. // Deals with the upload file in edit mode
  157. $('.custom-delete-file:checkbox').change(function(e){
  158. var self = $(this);
  159. var container = self.closest('.input-width-input');
  160. var display = container.find('.custom-delete-file-name');
  161.  
  162. if (self.is(':checked')) {
  163. display.wrapInner('<del></del>');
  164. } else {
  165. var del = display.find('del').first();
  166. if (del.is('del')) {
  167. del.contents().unwrap();
  168. }
  169. }
  170. }).change();
  171.  
  172. // Sets the validator defaults
  173. $.validator.setDefaults({
  174. errorElement: "span",
  175. errorClass: "help-block",
  176. highlight: function (element, errorClass, validClass) {
  177. $(element).closest('.form-group').addClass('has-error');
  178. },
  179. unhighlight: function (element, errorClass, validClass) {
  180. $(element).closest('.form-group').removeClass('has-error');
  181. },
  182. errorPlacement: function (error, element) {
  183. if (element.parent('.input-group').length) {
  184. error.insertAfter(element.parent());
  185. } else if(element.prop('type') === 'checkbox' || element.prop('type') === 'radio') {
  186. error.appendTo(element.closest(':not(input, label, .checkbox, .radio)').first());
  187. } else {
  188. error.insertAfter(element);
  189. }
  190. }
  191. });
  192.  
  193. // Makes sure any input with the required class is actually required
  194. $('form').each(function(index, item){
  195. var form = $(item);
  196. form.validate();
  197.  
  198. form.find(':input.required').each(function(i, input){
  199. $(input).attr('required', true);
  200. });
  201. });
  202.  
  203. });
  204. </script>
Add Comment
Please, Sign In to add comment