-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube-summation-db.blade.php
125 lines (115 loc) · 4.46 KB
/
cube-summation-db.blade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@extends('layouts.master')
@section('content')
<h1>Cube Summation using the Database</h1>
<h3>
{!!
isset($size) ?
"The current matrix size is $size X $size X $size" :
"Create the matrix before proceeding"
!!}
</h3>
<div class="divider"></div>
{!! Form::open([
'route' => 'cube-summation-db.create'
]) !!}
<h4>Create a new Matrix</h4>
<div class="row">
<div class="col-md-4">
<div class="form-group">
{!! Form::label('size', 'Size (size from 1 to 21)', ['class' => 'control-label']) !!}
{!! Form::number('size', isset($size) ? $size : '', ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-2">
{!! Form::submit('Create new Matrix', ['class' => 'btn btn-primary', 'name' => 'submit-btn']) !!}
</div>
<div class="col-md-6">
<p class="text-danger">NOTE: This deletes the old matrix</p>
<p class="text-warning">Due to heroku constraints, the maximum size can be 21 X 21
X21</p>
</div>
</div>
{!! Form::close() !!}
<div class="divider"></div>
{!! Form::open(['route' => 'cube-summation-db.update']) !!}
<h4>Update a Matrix cell</h4>
<div class="row">
<div class="col-md-2">
<div class="form-group">
{!! Form::label('x', 'X position', ['class' => 'control-label']) !!}
{!! Form::number('x', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-2">
<div class="form-group">
{!! Form::label('y', 'Y position', ['class' => 'control-label']) !!}
{!! Form::number('y', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-2">
<div class="form-group">
{!! Form::label('z', 'Z position', ['class' => 'control-label']) !!}
{!! Form::number('z', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-2">
<div class="form-group">
{!! Form::label('value', 'Value', ['class' => 'control-label']) !!}
{!! Form::number('value', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-4">
<div class="form-group">
{!! Form::submit('Update value', ['class' => 'btn btn-primary', 'name' => 'submit-btn']) !!}
</div>
</div>
</div>
{!! Form::close() !!}
<div class="divider"></div>
{!! Form::open(['route' => 'cube-summation-db.query']) !!}
<h4>Query the matrix</h4>
<div class="row">
<div class="col-md-1">
<div class="form-group">
{!! Form::label('x1', 'X1', ['class' => 'control-label']) !!}
{!! Form::number('x1', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1">
<div class="form-group">
{!! Form::label('y1', 'Y1', ['class' => 'control-label']) !!}
{!! Form::number('y1', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1">
<div class="form-group">
{!! Form::label('z1', 'Z1', ['class' => 'control-label']) !!}
{!! Form::number('z1', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1">
<div class="form-group">
{!! Form::label('x2', 'X2', ['class' => 'control-label']) !!}
{!! Form::number('x2', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1">
<div class="form-group">
{!! Form::label('y2', 'Y2', ['class' => 'control-label']) !!}
{!! Form::number('y2', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-1">
<div class="form-group">
{!! Form::label('z2', 'Z2', ['class' => 'control-label']) !!}
{!! Form::number('z2', 1, ['class' => 'form-control']) !!}
</div>
</div>
<div class="col-md-6">
<div class="form-group">
{!! Form::submit('Query', ['class' => 'btn btn-primary', 'name' => 'submit-btn']) !!}
</div>
</div>
</div>
{!! Form::close() !!}
@stop