Added initial page for the Timesheet controller
@ -32,6 +32,7 @@ module.exports = function(grunt) {
|
||||
'public/js/bootstrap-combobox.js',
|
||||
'public/vendor/jspdf/dist/jspdf.min.js',
|
||||
'public/vendor/handsontable/dist/jquery.handsontable.full.min.js',
|
||||
'public/vendor/handsontable/lib/jquery-ui/js/jquery-ui.custom.min.js',
|
||||
//'public/js/jspdf.source.js',
|
||||
//'public/js/jspdf.plugin.split_text_to_size.js',
|
||||
'public/js/script.js',
|
||||
@ -60,6 +61,7 @@ module.exports = function(grunt) {
|
||||
'public/css/bootstrap-combobox.css',
|
||||
'public/css/typeahead.js-bootstrap.css',
|
||||
'public/vendor/handsontable/dist/jquery.handsontable.full.css',
|
||||
'public/vendor/handsontable/lib/jquery-ui/css/ui-bootstrap/jquery-ui.custom.css',
|
||||
'public/css/style.css',
|
||||
],
|
||||
dest: 'public/built.css',
|
||||
|
@ -9,7 +9,14 @@ class TimesheetController extends \BaseController {
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
$data = [
|
||||
'showBreadcrumbs' => false,
|
||||
'timesheet' => [
|
||||
'timesheet_number' => 1
|
||||
]
|
||||
];
|
||||
|
||||
return View::make('timesheets.edit', $data);
|
||||
}
|
||||
|
||||
|
||||
|
@ -449,4 +449,5 @@ return array(
|
||||
'gateway_help_23' => 'Note: use your secret API key, not your publishable API key.',
|
||||
'gateway_help_27' => ':link to sign up for TwoCheckout.',
|
||||
|
||||
'timesheets' => 'Timesheets',
|
||||
);
|
@ -132,6 +132,8 @@ Route::group(array('before' => 'auth'), function()
|
||||
Route::get('credits/create/{client_id?}/{invoice_id?}', 'CreditController@create');
|
||||
Route::get('api/credits/{client_id?}', array('as'=>'api.credits', 'uses'=>'CreditController@getDatatable'));
|
||||
Route::post('credits/bulk', 'CreditController@bulk');
|
||||
|
||||
Route::resource('timesheets', 'TimesheetController');
|
||||
});
|
||||
|
||||
// Route group for API
|
||||
|
82
app/views/timesheets/edit.blade.php
Normal file
@ -0,0 +1,82 @@
|
||||
@extends('header')
|
||||
|
||||
@section('head')
|
||||
@parent
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li>{{ link_to('timesheets', trans('texts.timesheets')) }}</li>
|
||||
<li class='active'>{{ 1 }}</li>
|
||||
</ol>
|
||||
<div id="timesheet_table" style="height: 300px; overflow: auto">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
var table = $("#timesheet_table");
|
||||
table.handsontable({
|
||||
colHeaders: ['','Date', 'From', 'To', 'Hours', 'Owner', 'Project', 'Code', 'Tags' ],
|
||||
startRows: 6,
|
||||
startCols: 4,
|
||||
//minSpareRows: 1,
|
||||
stretchH: 'last',
|
||||
colWidths: [25, 97, 50, 50, 50, 150, 150, 150, 150],
|
||||
columns: [
|
||||
{ data: "selected", type: 'checkbox' },
|
||||
{ data: "date", type: 'date', dateFormat: 'yy-mm-dd' },
|
||||
{ data: "from" },
|
||||
{ data: "to" },
|
||||
{ data: "hours", type: 'numeric', format: '0.00' },
|
||||
{ data: "owner" },
|
||||
{ data: "project", type: 'dropdown', source: ["Hobby", "Large Development"], strict: true },
|
||||
{ data: "code", type: 'dropdown', source: ["DAMCO", "MYDAMCO", "SAXO", "STUDIE"], strict: true },
|
||||
{ data: "tags", type: 'dropdown', source: ["design", "development", "bug"], strict: false },
|
||||
],
|
||||
//cells: function(row, col, prop) {
|
||||
// return {
|
||||
// type : {
|
||||
// renderer : function (instance, td, row, col, prop, value, cellProperties) {
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
//}
|
||||
});
|
||||
|
||||
|
||||
var data = [
|
||||
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-01', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-02', from:'00:00', to:'23:00', hours:'11', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-03', from:'10:00', to:'11:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
{ selected: true, date:'2014-01-04', from:'23:00', to:'24:00', hours:'1', owner:'Troels Liebe Bentsen', project:'Hobby', code:'TEST', tags:'design'},
|
||||
];
|
||||
|
||||
table.handsontable("loadData", data);
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$.ajax({
|
||||
url: "/api/events",
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
success: function (res) {
|
||||
$("#dataTable").data("handsontable").loadData(res);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
</script>
|
||||
@stop
|
1615
public/built.css
BIN
public/images/ui-bg_flat_0_aaaaaa_40x100.png
Normal file
After Width: | Height: | Size: 180 B |
BIN
public/images/ui-bg_glass_55_fbf9ee_1x400.png
Normal file
After Width: | Height: | Size: 120 B |
BIN
public/images/ui-bg_glass_65_ffffff_1x400.png
Normal file
After Width: | Height: | Size: 105 B |
BIN
public/images/ui-bg_glass_75_dadada_1x400.png
Normal file
After Width: | Height: | Size: 111 B |
BIN
public/images/ui-bg_glass_75_e6e6e6_1x400.png
Normal file
After Width: | Height: | Size: 110 B |
BIN
public/images/ui-bg_glass_75_ffffff_1x400.png
Normal file
After Width: | Height: | Size: 107 B |
BIN
public/images/ui-bg_highlight-soft_75_cccccc_1x100.png
Normal file
After Width: | Height: | Size: 101 B |
BIN
public/images/ui-bg_inset-soft_95_fef1ec_1x100.png
Normal file
After Width: | Height: | Size: 123 B |
BIN
public/images/ui-icons_222222_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/images/ui-icons_2e83ff_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/images/ui-icons_454545_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/images/ui-icons_888888_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/images/ui-icons_cd0a0a_256x240.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
public/images/ui-icons_f6cf3b_256x240.png
Normal file
After Width: | Height: | Size: 8.7 KiB |