123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187 |
- <?php
- $ic = 'item-edit-input'; //input class.
- require('inc/json.item.icons.php');
- $exclude_debug_fieldlist = [
- 'icon','id','name','item_type','description',
- 'lore' ,'lore_equip' ,'stacklore' ,'temporary' ,
- 'artifact' ,'notrade' ,'nodestroy' ,'show_name',
- 'crafted','attuneable','heirloom','nozone','norepair',
- 'good_only','evil_only','novalue','ornate','etheral',
- 'appearance_only','reforged','refined','usable',
- 'collectable','tier','count','weight','slots'
- ];
-
- ?>
- <div class="row">
- <!-- Item Editor Controls -->
- <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 col-xl-12 mb-2 text-right">
- <button class="btn btn-md btn-default mr-2 item-save">
- <i class="fas fa-save text-success"></i> Save Changes <small>(CTRL+S)</small>
- </button>
- <button class="btn btn-md btn-warning mr-2 item-dupe">
- <i class="fad fa-copy"></i> Duplicate Item <small>(CTRL+D)</small>
- </button>
- <button class="btn btn-md btn-default item-del">
- <i class="fad fa-trash-alt text-danger"></i> Delete Item <small>(DEL)</small>
- </button>
- </div>
- <!-- Item Editor Controls -->
-
- <!-- Item Icon Edit -->
- <div class="col-xs-4 col-sm-3 col-md-3 col-lg-3 col-xl-2 text-center">
- <div class="edit-item-ico-ctn">
- <img class="edit-item-ico vm" src="img/eq2/items/<?php echo $item['icon']; ?>.png"/>
- <br/>
- <small><strong>Icon ID</strong>: <?php echo $item['icon']; ?></small>
- </div>
- <button class="btn btn-xs btn-default ico-picker-btn">Icon Picker</button>
- </div>
- <!-- Item Icon Edit -->
-
- <!-- Item Basic Details -->
- <div class="col-xs-8 col-sm-9 col-md-9 col-lg-9 col-xl-10">
- <div class="row">
- <div class="col-sm-12 col-xl-12">
- <?php echo build_edit_input(['field'=>'name','value'=>$item['name'],'id'=>$item['id'],'title'=>'Name','icon'=>'fad fa-tag','show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Enter item name ...']); ?>
- </div>
- <div class="col-sm-6 col-xl-6">
- <?php echo build_edit_input(['field'=>'icon','value'=>$item['icon'],'id'=>$item['id'],'title'=>'Icon ID','icon'=>'fad fa-images','show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Enter icon id ...', 'type'=>'number']); ?>
- </div>
- <div class="col-sm-6 col-xl-6">
- <?php echo build_edit_input(['field'=>'item_type','value'=>$item['item_type'],'id'=>$item['id'],'title'=>'Item Type','icon'=>'fad fa-disease','show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>NULL, 'field_type'=>'select', 'options'=>$itemCategories]); ?>
- </div>
- </div>
- </div>
- <!-- Item Basic Details -->
- </div>
- <!-- Description Row -->
- <div class="col-xl-12">
- <?php echo build_edit_input(['field'=>'description','value'=>$item['description'],'id'=>$item['id'],'title'=>'Description','icon'=>'fad fa-file-signature','show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Enter an item description ...', 'field_type'=>'textarea']); ?>
- </div>
- <!-- Description Row -->
- <div class="col-xl-12">
- <div class="row">
- <!-- Stats & Reqs Panel -->
- <div class="col-xs-7 col-sm-7 col-md-7 col-lg-7 col-xl-7">
- <!-- Requirements -->
- <div id="itemeditor-props" class="panel">
- <div class="panel-hdr text-primary">
- <h2>
- <span class="icon-stack fs-xxl mr-2">
- <i class="base base-7 icon-stack-2x opacity-100 color-info-500"></i>
- <i class="fas fa-vial icon-stack-1x opacity-100 color-white"></i>
- </span>
- Requirements
- </h2>
- </div>
- <div class="panel-container show" style="">
- <div class="panel-content">
- <div class="row">
- Use get_skills function to populate skill requirements.
- </div>
- </div>
- </div>
- </div>
-
- <!-- Stats -->
- <div id="itemeditor-props" class="panel">
- <div class="panel-hdr text-primary">
- <h2>
- <span class="icon-stack fs-xxl mr-2">
- <i class="base base-7 icon-stack-2x opacity-100 color-info-500"></i>
- <i class="fas fa-vial icon-stack-1x opacity-100 color-white"></i>
- </span>
- Stats
- </h2>
- </div>
- <div class="panel-container show" style="">
- <div class="panel-content">
- <div class="row">
- <div class="col-xl-12"><h1><small>Add item stats here</small><hr></hr></h1></div>
- <div class="col-xl-6">
- <?php echo build_edit_input(['field'=>'tier','value'=>$item['tier'],'id'=>$item['id'],'title'=>'Tier','icon'=>NULL,'show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Count - whatever that means...','type'=>'number']); ?>
- </div>
- <div class="col-xl-6">
- <?php echo build_edit_input(['field'=>'count','value'=>$item['count'],'id'=>$item['id'],'title'=>'Count','icon'=>NULL,'show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Count - whatever that means...','type'=>'number']); ?>
- </div>
- <div class="col-xl-6">
- <?php echo build_edit_input(['field'=>'weight','value'=>$item['weight'],'id'=>$item['id'],'title'=>'Weight','icon'=>NULL,'show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Count - whatever that means...','type'=>'number']); ?>
- </div>
- <div class="col-xl-6">
- <?php echo build_edit_input(['field'=>'stack_count','value'=>$item['stack_count'],'id'=>$item['id'],'title'=>'Stack Count','icon'=>NULL,'show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Stack count (int)','type'=>'number']); ?>
- </div>
- <div class="col-xl-6">
- <?php echo build_edit_input(['field'=>'slots','value'=>$item['slots'],'id'=>$item['id'],'title'=>'Slots','icon'=>NULL,'show-label'=>false,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>'Slots (int)','type'=>'number']); ?>
- </div>
- </div>
- </div> <!-- fas fa-toilet-paper, fas fa-book-spells -->
- </div>
- </div>
- </div>
- <!-- Item Properties Panel -->
- <div class="col-xs-5 col-sm-5 col-md-5 col-lg-5 col-xl-5">
- <div id="itemeditor-props" class="panel">
- <div class="panel-hdr text-primary">
- <h2>
- <span class="icon-stack fs-xxl mr-2">
- <i class="base base-7 icon-stack-2x opacity-100 color-primary-500"></i>
- <i class="fas fa-flag icon-stack-1x opacity-100 color-white"></i>
- </span>
- Flags
- </span>
- </h2>
- </div>
- <div class="panel-container show" style="">
- <div class="panel-content">
- <div class="row">
- <?php
- $_switches = [
- 'lore' => ['title'=>'Lore', 'ico'=>''],
- 'lore_equip' => ['title'=>'Lore Equip', 'ico'=>''],
- 'stacklore' => ['title'=>'Stack Lore', 'ico'=>''],
- 'temporary' => ['title'=>'Temporary', 'ico'=>''],
- 'artifact' => ['title'=>'Artifact', 'ico'=>''],
- 'notrade' => ['title'=>'Untradable', 'ico'=>''],
- 'nodestroy' => ['title'=>'Indestructible', 'ico'=>''],
- 'show_name' => ['title'=>'Show Name', 'ico'=>''],
- 'crafted' => ['title'=>'Crafted', 'ico'=>''],
- 'attuneable' => ['title'=>'Attuneable', 'ico'=>''],
- 'heirloom' => ['title'=>'Heirloom', 'ico'=>''],
- 'nozone' => ['title'=>'No Zone', 'ico'=>''],
- 'norepair' => ['title'=>'No Repair', 'ico'=>''],
- 'good_only' => ['title'=>'Good Only', 'ico'=>''],
- 'evil_only' => ['title'=>'Evil Only', 'ico'=>''],
- 'novalue' => ['title'=>'No Value', 'ico'=>''],
- 'ornate' => ['title'=>'Ornate', 'ico'=>''],
- 'etheral' => ['title'=>'Etheral', 'ico'=>''],
- 'appearance_only' => ['title'=>'Appearance Only', 'ico'=>''],
- 'reforged' => ['title'=>'Reforged', 'ico'=>''],
- 'refined' => ['title'=>'Refined', 'ico'=>''],
- 'usable' => ['title'=>'Usable', 'ico'=>''],
- 'collectable' => ['title'=>'Collectable', 'ico'=>'']
-
- ];
- foreach($_switches as $k => $v) {
- echo '
- <div class="col-xs-12 col-sm-6 col-md-6 col-lg-6 col-xl-6">
- '.build_edit_input(['field'=>$k,'value'=>$item[$k],'icon'=>$v['ico'],'title'=>$v['title'],'id'=>$item['id'],'show-label'=>true,'class'=>$ic,'aria'=>false,'desc'=>false,'placeholder'=>NULL, 'field_type'=>'switch']).'
- </div>';
- }
- ?>
- </div>
- </div> <!-- fas fa-toilet-paper, fas fa-book-spells -->
- </div>
- </div>
- </div>
- <!-- Properties Panel -->
-
- </div>
- </div>
-
|