Skip to content

Commit

Permalink
Fix #475 and styling
Browse files Browse the repository at this point in the history
Cleaned up styling to break lines with larger notes on hardware view
and asset view. Changed column type to text.
  • Loading branch information
splaer committed Feb 12, 2015
1 parent 95be790 commit 00f7717
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ChangeLicenseNotesType extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
$prefix = DB::getTablePrefix();
DB::statement('ALTER TABLE '.$prefix.'licenses MODIFY COLUMN notes TEXT');
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
$prefix = DB::getTablePrefix();
DB::statement('ALTER TABLE '.$prefix.'licenses MODIFY COLUMN notes VARCHAR(255)');
}
}
2 changes: 1 addition & 1 deletion app/models/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class License extends Elegant
'license_email' => 'email|min:0|max:120',
'license_name' => 'alpha_space|min:0|max:100',
'note' => 'alpha_space',
'notes' => 'alpha_space|min:0|max:255',
'notes' => 'alpha_space|min:0',
);

/**
Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/hardware/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@

<!-- checked out assets table -->

<table class="table table-hover">
<table class="table table-hover table-fixed break-word">
<thead>
<tr>
<th class="col-md-3"><span class="line"></span>@lang('general.date')</th>
Expand Down Expand Up @@ -256,7 +256,7 @@
@if ($asset->notes)

<h6>@lang('admin/hardware/form.notes'):</h6>
{{ nl2br(e($asset->notes)) }}
<div class="break-word">{{ nl2br(e($asset->notes)) }}</div>

@endif

Expand Down
4 changes: 2 additions & 2 deletions app/views/backend/licenses/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@
<div class="col-md-12">
<h6>@lang('admin/licenses/general.checkout_history')</h6>

<table class="table table-hover">
<table class="table table-hover table-fixed break-word">
<thead>
<tr>
<th class="col-md-3">@lang('general.date')</th>
Expand Down Expand Up @@ -335,7 +335,7 @@

@if ($license->notes)
<li><strong>@lang('admin/licenses/form.notes'):</strong>
<li>{{ nl2br(e($license->notes)) }}</li>
<li class="break-word">{{ nl2br(e($license->notes)) }}</li>
@endif
</ul>
</div>
Expand Down
6 changes: 6 additions & 0 deletions public/assets/css/compiled/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@
float: right;
margin-top: 35px;
}
.table-fixed {
table-layout: fixed;
}
.break-word {
word-wrap: break-word;
}

/* responsive */
@media (max-width: 768px) {
Expand Down

0 comments on commit 00f7717

Please sign in to comment.