Skip to content

Commit cd8ebbd

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 594212d + c2ed0f6 commit cd8ebbd

File tree

13 files changed

+122
-112
lines changed

13 files changed

+122
-112
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ env:
1515
before_script:
1616
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS snipeit_laravel;" -utravis; fi
1717
- curl -s http://getcomposer.org/installer | php
18+
- cp app/config/production/database.example.php app/config/database.php
19+
- cp app/config/production/mail.example.php app/config/mail.php
1820
- php composer.phar self-update
1921
- php composer.phar install --prefer-source --no-interaction --dev
2022
- php artisan key:generate

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href='https://pledgie.com/campaigns/22899'><img alt='Click here to lend your support to: Snipe IT - Free Open Source Asset Management System and make a donation at pledgie.com !' src='https://pledgie.com/campaigns/22899.png?skin_name=chrome' border='0' ></a>
1+
[![Click here to lend your support to: Snipe IT - Free Open Source Asset Management System and make a donation at pledgie.com](https://pledgie.com/campaigns/22899.png?skin_name=chrome)](https://pledgie.com/campaigns/22899) [![Build Status](https://travis-ci.org/snipe/snipe-it.svg?branch=develop)](https://travis-ci.org/snipe/snipe-it)
22

33
## Snipe-IT - Asset Management For the Rest of Us
44

app/config/production/database.example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'driver' => 'mysql',
5757
'host' => 'localhost',
5858
'database' => 'snipeit_laravel',
59-
'username' => 'snipeit_laravel',
59+
'username' => 'travis',
6060
'password' => '',
6161
'charset' => 'utf8',
6262
'collation' => 'utf8_unicode_ci',

app/controllers/admin/AssetsController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ public function exportReports()
136136
$depreciation = $asset->depreciate();
137137

138138
$row[] = $asset->purchase_date;
139-
$row[] = '$'.$asset->purchase_cost;
140-
$row[] = '$'.$depreciation;
141-
$row[] = '$'.($asset->purchase_cost - $depreciation);
139+
$row[] = '"'.number_format($asset->purchase_cost).'"';
140+
$row[] = '"'.number_format($depreciation).'"';
141+
$row[] = '"'.number_format($asset->purchase_cost - $depreciation).'"';
142142
$rows[] = implode($row, ',');
143143
}
144144

app/filters.php

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,23 @@
8080

8181
Route::filter('admin-auth', function()
8282
{
83-
// Check if the user is logged in
84-
if ( ! Sentry::check())
85-
{
86-
// Store the current uri in the session
87-
Session::put('loginRedirect', Request::url());
88-
89-
// Redirect to the login page
90-
return Redirect::route('signin');
91-
}
92-
93-
// Check if the user has access to the admin page
94-
if ( ! Sentry::getUser()->hasAccess('admin'))
95-
{
96-
// Show the insufficient permissions page
97-
return App::abort(403);
98-
}
83+
// Check if the user is logged in
84+
if ( ! Sentry::check()) {
85+
// Store the current uri in the session
86+
Session::put('loginRedirect', Request::url());
87+
88+
// Redirect to the login page
89+
return Redirect::route('signin');
90+
}
91+
92+
// Check if the user has access to the admin pages
93+
if ( ! Sentry::getUser()->hasAccess('admin')) {
94+
// Show the insufficient permissions page
95+
return Redirect::route('profile');
96+
}
9997
});
10098

99+
101100
/*
102101
|--------------------------------------------------------------------------
103102
| CSRF Protection Filter
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
return array(
4+
5+
'group_management' => 'Group Management',
6+
'create_group' => 'Create New Group',
7+
'edit_group' => 'Edit Group',
8+
'group_name' => 'Group Name',
9+
'group_admin' => 'Group Admin',
10+
'allow' => 'Allow',
11+
'deny' => 'Deny',
12+
13+
);

app/lang/en/admin/hardware/table.php

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
return array(
44

5-
'id' => 'ID',
6-
'title' => 'Asset ',
7-
'asset_tag' => 'Asset Tag',
8-
'serial' => 'Serial',
9-
'purchase_date' => 'Purchased',
10-
'purchase_cost' => 'Cost',
11-
'book_value' => 'Value',
12-
'status' => 'Status',
13-
'checkoutto' => 'Checked Out',
14-
'change' => 'In/Out',
15-
'location' => 'Location',
16-
'eol' => 'EOL',
17-
'diff' => 'Diff',
5+
'id' => 'ID',
6+
'title' => 'Asset ',
7+
'asset_tag' => 'Asset Tag',
8+
'serial' => 'Serial',
9+
'purchase_date' => 'Purchased',
10+
'purchase_cost' => 'Cost',
11+
'book_value' => 'Value',
12+
'status' => 'Status',
13+
'checkoutto' => 'Checked Out',
14+
'change' => 'In/Out',
15+
'location' => 'Location',
16+
'eol' => 'EOL',
17+
'diff' => 'Diff',
18+
'dl_csv' => 'Download CSV',
1819

1920
);

app/lang/en/general.php

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,46 @@
22

33
return array(
44

5-
'yes' => 'Yes',
6-
'no' => 'No',
7-
'currency' => '$',
8-
'save' => 'Save',
9-
'checkout' => 'Checkout',
10-
'checkin' => 'Checkin',
11-
'cancel' => 'Cancel',
12-
'back' => 'Back',
13-
14-
'total_assets' => 'total assets',
15-
'assets_available'=> 'assets available',
16-
'total_licenses'=> 'total licenses',
17-
'licenses_available'=> 'licenses available',
18-
'all_assets' => 'All Assets',
19-
'assets' => 'Assets',
20-
'asset' => 'Asset',
21-
'license' => 'License',
22-
'licenses' => 'Licenses',
23-
'user' => 'User',
24-
'people' => 'People',
25-
'reports' => 'Reports',
26-
'all' => 'All',
27-
28-
'create' => 'Create New',
29-
'welcome' => 'Welcome, :name',
30-
'settings' => 'Settings',
31-
'profile' => 'Your profile',
32-
'logout' => 'Logout',
33-
'admin' => 'Admin',
34-
'groups' => 'Groups',
35-
'status' => 'Status',
36-
'status_labels' => 'Status Labels',
37-
'manufacturers' => 'Manufacturers',
38-
'categories' => 'Categories',
39-
'locations' => 'Locations',
40-
'depreciation' => 'Depreciation',
41-
42-
'sign_in' => 'Sign in',
43-
'deployed' => 'Deployed',
44-
'ready_to_deploy'=> 'Ready to Deploy',
45-
'pending' => 'Pending',
46-
'undeployable' => 'Un-deployable',
47-
'list_all' => 'List All',
48-
'asset_models' => 'Asset Models',
49-
)
50-
;
5+
'yes' => 'Yes',
6+
'no' => 'No',
7+
'currency' => '$',
8+
'save' => 'Save',
9+
'checkout' => 'Checkout',
10+
'checkin' => 'Checkin',
11+
'cancel' => 'Cancel',
12+
'back' => 'Back',
13+
'total_assets' => 'total assets',
14+
'assets_available' => 'assets available',
15+
'total_licenses' => 'total licenses',
16+
'licenses_available' => 'licenses available',
17+
'all_assets' => 'All Assets',
18+
'assets' => 'Assets',
19+
'asset' => 'Asset',
20+
'license' => 'License',
21+
'licenses' => 'Licenses',
22+
'user' => 'User',
23+
'people' => 'People',
24+
'reports' => 'Reports',
25+
'all' => 'All',
26+
'create' => 'Create New',
27+
'welcome' => 'Welcome, :name',
28+
'settings' => 'Settings',
29+
'profile' => 'Your profile',
30+
'logout' => 'Logout',
31+
'admin' => 'Admin',
32+
'groups' => 'Groups',
33+
'status' => 'Status',
34+
'status_labels' => 'Status Labels',
35+
'manufacturers' => 'Manufacturers',
36+
'categories' => 'Categories',
37+
'locations' => 'Locations',
38+
'depreciation' => 'Depreciation',
39+
'sign_in' => 'Sign in',
40+
'deployed' => 'Deployed',
41+
'ready_to_deploy' => 'Ready to Deploy',
42+
'pending' => 'Pending',
43+
'undeployable' => 'Un-deployable',
44+
'list_all' => 'List All',
45+
'asset_models' => 'Asset Models',
46+
'currency_symbol' => '$',
47+
);

app/views/backend/groups/create.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div class="row header">
1414
<div class="col-md-12">
1515
<a href="{{ URL::previous() }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
16-
<h3>Group Update</h3>
16+
<h3>@lang('admin/groups/titles.create_group')</h3>
1717
</div>
1818
</div>
1919

@@ -26,7 +26,7 @@
2626

2727
<!-- Name -->
2828
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
29-
<label for="name" class="col-md-2 control-label">Group Name</label>
29+
<label for="name" class="col-md-2 control-label">@lang('admin/groups/titles.group_name')</label>
3030
<div class="col-md-6">
3131
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name') }}" />
3232
{{ $errors->first('name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
@@ -46,11 +46,11 @@
4646
<label for="name" class="col-md-2 control-label">{{ $permission['label'] }}</label>
4747
<div class="col-md-8">
4848
<label class="radio-inline">
49-
<input type="radio" value="1" id="{{ $permission['permission'] }}_allow" name="permissions[{{ $permission['permission'] }}]"{{ (array_get($selectedPermissions, $permission['permission']) === 1 ? ' checked="checked"' : '') }}> Allow
49+
<input type="radio" value="1" id="{{ $permission['permission'] }}_allow" name="permissions[{{ $permission['permission'] }}]"{{ (array_get($selectedPermissions, $permission['permission']) === 1 ? ' checked="checked"' : '') }}> @lang('admin/groups/titles.allow')
5050
</label>
5151

5252
<label class="radio-inline">
53-
<input type="radio" value="0" id="{{ $permission['permission'] }}_deny" name="permissions[{{ $permission['permission'] }}]"{{ ( ! array_get($selectedPermissions, $permission['permission']) ? ' checked="checked"' : '') }}> Deny
53+
<input type="radio" value="0" id="{{ $permission['permission'] }}_deny" name="permissions[{{ $permission['permission'] }}]"{{ ( ! array_get($selectedPermissions, $permission['permission']) ? ' checked="checked"' : '') }}> @lang('admin/groups/titles.deny')
5454
</label>
5555
</div>
5656
</div>

app/views/backend/groups/edit.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div class="row header">
1414
<div class="col-md-12">
1515
<a href="{{ URL::previous() }}" class="btn btn-flat gray pull-right"><i class="icon-circle-arrow-left icon-white"></i> Back</a>
16-
<h3>Group Update</h3>
16+
<h3>@lang('admin/groups/titles.edit_group')</h3>
1717
</div>
1818
</div>
1919

@@ -26,7 +26,7 @@
2626

2727
<!-- Name -->
2828
<div class="form-group {{ $errors->has('name') ? ' has-error' : '' }}">
29-
<label for="name" class="col-md-2 control-label">Group Name</label>
29+
<label for="name" class="col-md-2 control-label">@lang('admin/groups/titles.group_name')</label>
3030
<div class="col-md-6">
3131
<input class="form-control" type="text" name="name" id="name" value="{{ Input::old('name', $group->name) }}" />
3232
{{ $errors->first('name', '<span class="alert-msg"><i class="icon-remove-sign"></i> :message</span>') }}
@@ -43,11 +43,11 @@
4343
<label for="name" class="col-md-2 control-label">{{ $permission['label'] }}</label>
4444
<div class="col-md-8">
4545
<label class="radio-inline">
46-
<input type="radio" value="1" id="{{ $permission['permission'] }}_allow" name="permissions[{{ $permission['permission'] }}]"{{ (array_get($groupPermissions, $permission['permission']) === 1 ? ' checked="checked"' : '') }}> Allow
46+
<input type="radio" value="1" id="{{ $permission['permission'] }}_allow" name="permissions[{{ $permission['permission'] }}]"{{ (array_get($groupPermissions, $permission['permission']) === 1 ? ' checked="checked"' : '') }}> @lang('admin/groups/titles.allow')
4747
</label>
4848

4949
<label class="radio-inline">
50-
<input type="radio" value="0" id="{{ $permission['permission'] }}_deny" name="permissions[{{ $permission['permission'] }}]"{{ ( ! array_get($groupPermissions, $permission['permission']) ? ' checked="checked"' : '') }}> Deny
50+
<input type="radio" value="0" id="{{ $permission['permission'] }}_deny" name="permissions[{{ $permission['permission'] }}]"{{ ( ! array_get($groupPermissions, $permission['permission']) ? ' checked="checked"' : '') }}> @lang('admin/groups/titles.deny')
5151
</label>
5252
</div>
5353
</div>

0 commit comments

Comments
 (0)