mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Finalize project reorganization
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'batteries')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Batteries
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'batteriesoverview')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Batteries overview</h1>
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'batteryform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'batterytracking')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Battery tracking</h1>
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-5 col-lg-3 main well">
|
||||
<h3>Battery overview <strong><span id="selected-battery-name"></span></strong></h3>
|
||||
|
||||
<p>
|
||||
<strong>Charge cycles count:</strong> <span id="selected-battery-charge-cycles-count"></span><br>
|
||||
<strong>Last charged:</strong> <span id="selected-battery-last-charged"></span> <time id="selected-battery-last-charged-timeago" class="timeago timeago-contextual"></time><br>
|
||||
</p>
|
||||
<div class="col-sm-6 col-md-5 col-lg-3">
|
||||
@include('components.batterycard')
|
||||
</div>
|
||||
@stop
|
||||
|
16
views/components/batterycard.blade.php
Normal file
16
views/components/batterycard.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layout.basecomponent')
|
||||
|
||||
@section('componentJsName', 'batterycard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Battery overview <strong><span id="batterycard-battery-name"></span></strong></h3>
|
||||
|
||||
<p>
|
||||
<strong>Charge cycles count:</strong> <span id="batterycard-battery-charge-cycles-count"></span><br>
|
||||
<strong>Last charged:</strong> <span id="batterycard-battery-last-charged"></span> <time id="batterycard-battery-last-charged-timeago" class="timeago timeago-contextual"></time><br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
16
views/components/habitcard.blade.php
Normal file
16
views/components/habitcard.blade.php
Normal file
@@ -0,0 +1,16 @@
|
||||
@extends('layout.basecomponent')
|
||||
|
||||
@section('componentJsName', 'habitcard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Habit overview <strong><span id="habitcard-habit-name"></span></strong></h3>
|
||||
|
||||
<p>
|
||||
<strong>Tracked count:</strong> <span id="habitcard-habit-tracked-count"></span><br>
|
||||
<strong>Last tracked:</strong> <span id="habitcard-habit-last-tracked"></span> <time id="habitcard-habit-last-tracked-timeago" class="timeago timeago-contextual"></time><br>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
18
views/components/productcard.blade.php
Normal file
18
views/components/productcard.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('layout.basecomponent')
|
||||
|
||||
@section('componentJsName', 'productcard')
|
||||
|
||||
@section('componentContent')
|
||||
<div class="main well">
|
||||
|
||||
<h3>Product overview <strong><span id="productcard-product-name"></span></strong></h3>
|
||||
<h4><strong>Stock quantity unit:</strong> <span id="productcard-product-stock-qu-name"></span></h4>
|
||||
|
||||
<p>
|
||||
<strong>Stock amount:</strong> <span id="productcard-product-stock-amount"></span> <span id="productcard-product-stock-qu-name2"></span><br>
|
||||
<strong>Last purchased:</strong> <span id="productcard-product-last-purchased"></span> <time id="productcard-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>Last used:</strong> <span id="productcard-product-last-used"></span> <time id="productcard-product-last-used-timeago" class="timeago timeago-contextual"></time>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@stop
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'consume')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Consume</h1>
|
||||
|
||||
@@ -40,14 +40,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-5 col-lg-3 main well">
|
||||
<h3>Product overview <strong><span id="selected-product-name"></span></strong></h3>
|
||||
<h4><strong>Stock quantity unit:</strong> <span id="selected-product-stock-qu-name"></span></h4>
|
||||
|
||||
<p>
|
||||
<strong>Stock amount:</strong> <span id="selected-product-stock-amount"></span> <span id="selected-product-stock-qu-name2"></span><br>
|
||||
<strong>Last purchased:</strong> <span id="selected-product-last-purchased"></span> <time id="selected-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>Last used:</strong> <span id="selected-product-last-used"></span> <time id="selected-product-last-used-timeago" class="timeago timeago-contextual"></time>
|
||||
</p>
|
||||
<div class="col-sm-6 col-md-5 col-lg-3">
|
||||
@include('components.productcard')
|
||||
</div>
|
||||
@stop
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'habitform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'habits')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Habits
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'habitsoverview')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Habits overview</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'habittracking')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Habit tracking</h1>
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-5 col-lg-3 main well">
|
||||
<h3>Habit overview <strong><span id="selected-habit-name"></span></strong></h3>
|
||||
|
||||
<p>
|
||||
<strong>Tracked count:</strong> <span id="selected-habit-tracked-count"></span><br>
|
||||
<strong>Last tracked:</strong> <span id="selected-habit-last-tracked"></span> <time id="selected-habit-last-tracked-timeago" class="timeago timeago-contextual"></time><br>
|
||||
</p>
|
||||
<div class="col-sm-6 col-md-5 col-lg-3">
|
||||
@include('components.habitcard')
|
||||
</div>
|
||||
@stop
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'inventory')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Inventory</h1>
|
||||
|
||||
@@ -47,14 +47,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-5 col-lg-3 main well">
|
||||
<h3>Product overview <strong><span id="selected-product-name"></span></strong></h3>
|
||||
<h4><strong>Purchase quantity:</strong> <span id="selected-product-purchase-qu-name"></span></h4>
|
||||
|
||||
<p>
|
||||
<strong>Stock amount:</strong> <span id="selected-product-stock-amount"></span> <span id="selected-product-stock-qu-name"></span><br>
|
||||
<strong>Last purchased:</strong> <span id="selected-product-last-purchased"></span> <time id="selected-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>Last used:</strong> <span id="selected-product-last-used"></span> <time id="selected-product-last-used-timeago" class="timeago timeago-contextual"></time>
|
||||
</p>
|
||||
<div class="col-sm-6 col-md-5 col-lg-3">
|
||||
@include('components.productcard')
|
||||
</div>
|
||||
@stop
|
||||
|
6
views/layout/basecomponent.blade.php
Normal file
6
views/layout/basecomponent.blade.php
Normal file
@@ -0,0 +1,6 @@
|
||||
@section('componentContent')
|
||||
@show
|
||||
|
||||
@push('componentScripts')
|
||||
<script src="/viewjs/components/@yield('componentJsName').js"></script>
|
||||
@endpush
|
@@ -27,6 +27,7 @@
|
||||
|
||||
<script src="/bower_components/jquery/dist/jquery.min.js?v={{ $version }}"></script>
|
||||
<script src="/js/grocy.js?v={{ $version }}"></script>
|
||||
<script src="/js/extensions.js?v={{ $version }}"></script>
|
||||
<script>Grocy.ActiveNav = '@yield('activeNav', '')';</script>
|
||||
</head>
|
||||
|
||||
@@ -228,6 +229,7 @@
|
||||
<script src="/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js?v={{ $version }}"></script>
|
||||
|
||||
<script src="/viewjs/@yield('viewJsName').js"></script>
|
||||
@stack('componentScripts')
|
||||
|
||||
@if(file_exists(__DIR__ . '/../../data/add_before_end_body.html'))
|
||||
@php include __DIR__ . '/../../data/add_before_end_body.html' @endphp
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'locationform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'locations')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Locations
|
||||
|
@@ -4,7 +4,7 @@
|
||||
@section('viewJsName', 'login')
|
||||
|
||||
@section('content')
|
||||
<div class="col-md-4 col-md-offset-5 main">
|
||||
<div class="col-md-4 col-md-offset-5">
|
||||
|
||||
<h1 class="page-header text-center">Login</h1>
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'productform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'products')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Products
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'purchase')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-4 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Purchase</h1>
|
||||
|
||||
@@ -46,14 +46,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6 col-md-5 col-lg-3 main well">
|
||||
<h3>Product overview <strong><span id="selected-product-name"></span></strong></h3>
|
||||
<h4><strong>Purchase quantity:</strong> <span id="selected-product-purchase-qu-name"></span></h4>
|
||||
|
||||
<p>
|
||||
<strong>Stock amount:</strong> <span id="selected-product-stock-amount"></span> <span id="selected-product-stock-qu-name"></span><br>
|
||||
<strong>Last purchased:</strong> <span id="selected-product-last-purchased"></span> <time id="selected-product-last-purchased-timeago" class="timeago timeago-contextual"></time><br>
|
||||
<strong>Last used:</strong> <span id="selected-product-last-used"></span> <time id="selected-product-last-used-timeago" class="timeago timeago-contextual"></time>
|
||||
</p>
|
||||
<div class="col-sm-6 col-md-5 col-lg-3">
|
||||
@include('components.productcard')
|
||||
</div>
|
||||
@stop
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'quantityunitform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-4 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'quantityunits')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Quantity units
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'shoppinglist')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">
|
||||
Shopping list
|
||||
|
@@ -9,7 +9,7 @@
|
||||
@section('viewJsName', 'shoppinglistform')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2 main">
|
||||
<div class="col-sm-3 col-sm-offset-3 col-md-3 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">@yield('title')</h1>
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'stockoverview')
|
||||
|
||||
@section('content')
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
|
||||
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2">
|
||||
|
||||
<h1 class="page-header">Stock overview <span class="text-muded small"><strong>{{ count($currentStock) }}</strong> products with <strong>{{ SumArrayValue($currentStock, 'amount') }}</strong> units in stock</span></h1>
|
||||
|
||||
|
Reference in New Issue
Block a user