From ec43a02588262b624b57f79edfa8c6b42c66c760 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 6 Feb 2015 16:19:07 +0100 Subject: [PATCH] Added vip feature. --- app/assets/stylesheets/zammad.css.scss | 21 ++++++++- .../20141217000001_update_object_manager2.rb | 2 +- db/migrate/20150206000001_create_vip.rb | 44 +++++++++++++++++++ 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20150206000001_create_vip.rb diff --git a/app/assets/stylesheets/zammad.css.scss b/app/assets/stylesheets/zammad.css.scss index a59689aa8..675d0f431 100644 --- a/app/assets/stylesheets/zammad.css.scss +++ b/app/assets/stylesheets/zammad.css.scss @@ -2478,7 +2478,7 @@ footer { .user-menu .dropdown-menu > li > a:hover { color: #2594d4; - background: rgba(0,0,0,.05); + background: rgba(0,0,0,.05); } .avatar { @@ -2492,6 +2492,11 @@ footer { vertical-align: bottom; } + :not(.navigation) .avatar.vip { + border: 2px dotted; + border-color: #fff; + } + .avatar.size-50 { width: 50px; height: 50px; @@ -2515,16 +2520,30 @@ footer { cursor: default; } + :not(.navigation) .unique.avatar.vip { + border: 2px dotted; + line-height: 40px; + } + .unique.avatar.size-50 { font-size: 16px; line-height: 52px; } + :not(.navigation) .unique.avatar.size-50.vip { + line-height: 50px; + } + .unique.avatar.size-80 { font-size: 20px; line-height: 84px; } + :not(.navigation) .unique.avatar.size-80.vip { + font-size: 20px; + line-height: 82px; + } + .sidebar { width: 32%; max-width: 300px; diff --git a/db/migrate/20141217000001_update_object_manager2.rb b/db/migrate/20141217000001_update_object_manager2.rb index cdb654b59..7da5b5be5 100644 --- a/db/migrate/20141217000001_update_object_manager2.rb +++ b/db/migrate/20141217000001_update_object_manager2.rb @@ -463,6 +463,7 @@ class UpdateObjectManager2 < ActiveRecord::Migration :maxlength => 100, :null => true, :autocomplete => 'off', + :item_class => 'formGroup--halfSize', }, :editable => false, :active => true, @@ -593,7 +594,6 @@ class UpdateObjectManager2 < ActiveRecord::Migration :display => 'Active', :data_type => 'boolean', :data_option => { - :maxlength => 250, :null => true, :default => true, }, diff --git a/db/migrate/20150206000001_create_vip.rb b/db/migrate/20150206000001_create_vip.rb new file mode 100644 index 000000000..e7854c49f --- /dev/null +++ b/db/migrate/20150206000001_create_vip.rb @@ -0,0 +1,44 @@ +class CreateVip < ActiveRecord::Migration + def up + add_column :users, :vip, :boolean, :default => false + + ObjectManager::Attribute.add( + :object => 'User', + :name => 'vip', + :display => 'VIP', + :data_type => 'boolean', + :data_option => { + :null => false, + :default => false, + :item_class => 'formGroup--halfSize', + :options => { + :false => 'no', + :true => 'yes', + }, + :translate => true, + }, + :editable => false, + :active => true, + :screens => { + :edit => { + :Admin => { + :null => false, + }, + }, + :view => { + '-all-' => { + :shown => false, + }, + }, + }, + :pending_migration => false, + :position => 1490, + :created_by_id => 1, + :updated_by_id => 1, + ) + + end + + def down + end +end