Browse Source

style the tags + close #47

pull/99/head
KodeStar 7 years ago
parent
commit
a051c17010
  1. 8
      app/Item.php
  2. 8
      public/css/app.css
  3. 2
      public/mix-manifest.json
  4. 8
      resources/assets/sass/_select2.scss
  5. 2
      resources/views/item.blade.php
  6. 2
      resources/views/items/form.blade.php
  7. 1
      resources/views/items/list.blade.php
  8. 1
      resources/views/tags/list.blade.php

8
app/Item.php

@ -161,6 +161,14 @@ class Item extends Model
return 'fa-arrow-alt-to-right'; return 'fa-arrow-alt-to-right';
} }
} }
public function getLinkTypeAttribute()
{
if((int)$this->type === 1) {
return 'tags';
} else {
return 'items';
}
}
public function scopeOfType($query, $type) public function scopeOfType($query, $type)
{ {

8
public/css/app.css

@ -5590,14 +5590,16 @@ readers do not read off random characters that represent icons */
} }
.select2-container--default .select2-selection--multiple .select2-selection__choice { .select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4; background-color: #f2f3f6;
border: 1px solid #aaa; border: 1px solid #dedfe2;
border-radius: 4px; border-radius: 4px;
cursor: default; cursor: default;
float: left; float: left;
margin-right: 5px; margin-right: 5px;
font-size: 13px;
font-weight: 300;
margin-top: 5px; margin-top: 5px;
padding: 0 5px; padding: 5px;
} }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {

2
public/mix-manifest.json

@ -1,4 +1,4 @@
{ {
"/css/app.css": "/css/app.css?id=098a3a1a2e45b2715547", "/css/app.css": "/css/app.css?id=353c513dd97a5fa0607d",
"/js/app.js": "/js/app.js?id=24ea5e5c1fbea3461a14" "/js/app.js": "/js/app.js?id=24ea5e5c1fbea3461a14"
} }

8
resources/assets/sass/_select2.scss

@ -199,14 +199,16 @@
margin-top: 5px; margin-top: 5px;
margin-right: 10px; } margin-right: 10px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice { .select2-container--default .select2-selection--multiple .select2-selection__choice {
background-color: #e4e4e4; background-color: #f2f3f6;
border: 1px solid #aaa; border: 1px solid #dedfe2;
border-radius: 4px; border-radius: 4px;
cursor: default; cursor: default;
float: left; float: left;
margin-right: 5px; margin-right: 5px;
font-size: 13px;
font-weight: 300;
margin-top: 5px; margin-top: 5px;
padding: 0 5px; } padding: 5px; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
color: #999; color: #999;
cursor: pointer; cursor: pointer;

2
resources/views/item.blade.php

@ -13,6 +13,6 @@
</div> </div>
<a class="link"{{ $app->target }} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a> <a class="link"{{ $app->target }} href="{{ $app->link }}"><i class="fas {{ $app->link_icon }}"></i></a>
</div> </div>
<a class="item-edit" href="{{ route('items.edit', $app->id) }}"><i class="fas fa-pencil"></i></a> <a class="item-edit" href="{{ route($app->link_type.'.edit', $app->id) }}"><i class="fas fa-pencil"></i></a>
</section> </section>

2
resources/views/items/form.blade.php

@ -33,7 +33,7 @@
<label>{{ __('app.apps.colour') }} *</label> <label>{{ __('app.apps.colour') }} *</label>
{!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!} {!! Form::text('colour', null, array('placeholder' => __('app.apps.hex'),'class' => 'form-control color-picker')) !!}
<hr /> <hr />
<label>{{ __('app.apps.tags') }}</label> <label>{{ __('app.apps.tags') }} ({{ __('app.optional') }})</label>
{!! Form::select('tags', $tags, $current_tags, ['class' => 'tags', 'multiple']) !!} {!! Form::select('tags', $tags, $current_tags, ['class' => 'tags', 'multiple']) !!}
</div> </div>
<div class="input"> <div class="input">

1
resources/views/items/list.blade.php

@ -12,6 +12,7 @@
</div> </div>
<div class="module-actions"> <div class="module-actions">
<a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a> <a href="{{ route('items.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</header> </header>

1
resources/views/tags/list.blade.php

@ -12,6 +12,7 @@
</div> </div>
<div class="module-actions"> <div class="module-actions">
<a href="{{ route('tags.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a> <a href="{{ route('tags.create') }}" title="" class="button"><i class="fa fa-plus"></i><span>{{ __('app.buttons.add') }}</span></a>
<a href="{{ route('dash') }}" class="button"><i class="fa fa-ban"></i><span>{{ __('app.buttons.cancel') }}</span></a>
</div> </div>
</header> </header>

Loading…
Cancel
Save