style(legacy): format (#2039)
This commit is contained in:
parent
7082c9693d
commit
1550d44ac5
122 changed files with 18369 additions and 15819 deletions
|
@ -1,65 +1,69 @@
|
|||
<div id="history_template" class="prefpanel alpha-block padded-strong">
|
||||
<div>
|
||||
<h2><?php echo(_("Playout History Templates"));?></h2>
|
||||
<h2><?php echo (_("Playout History Templates")); ?></h2>
|
||||
|
||||
<div><h4><?php echo _("Log Sheet Templates") ?></h4></div>
|
||||
<div>
|
||||
<h4><?php echo _("Log Sheet Templates") ?></h4>
|
||||
</div>
|
||||
<button id="new_item_template" class="btn btn-new"><?php echo _("New Log Sheet Template") ?></button>
|
||||
<ul id="template_list">
|
||||
<?php if (count($this->template_list) == 0): ?>
|
||||
<?php if (count($this->template_list) == 0) : ?>
|
||||
<li><?php echo _("No Log Sheet Templates") ?></li>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->template_list as $id=>$name): ?>
|
||||
<?php if (in_array($id, $this->configured)): ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<i class="icon icon-ok"></i>
|
||||
<?php else: ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<a class="template_remove" href="<?php echo $this->baseUrl("Playouthistorytemplate/delete-template/id/{$id}"); ?>">
|
||||
<i class="icon icon-trash"></i>
|
||||
</a>
|
||||
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
|
||||
<?php echo _("Set Default") ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($this->template_list as $id => $name) : ?>
|
||||
<?php if (in_array($id, $this->configured)) : ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<i class="icon icon-ok"></i>
|
||||
<?php else : ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<a class="template_remove" href="<?php echo $this->baseUrl("Playouthistorytemplate/delete-template/id/{$id}"); ?>">
|
||||
<i class="icon icon-trash"></i>
|
||||
</a>
|
||||
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
|
||||
<?php echo _("Set Default") ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<br><br>
|
||||
<div>
|
||||
<div><h4><?php echo _("File Summary Templates") ?></h4></div>
|
||||
<div>
|
||||
<h4><?php echo _("File Summary Templates") ?></h4>
|
||||
</div>
|
||||
<button id="new_file_template" class="btn btn-new"><?php echo _("New File Summary Template") ?></button>
|
||||
<ul id="template_file">
|
||||
<?php if (count($this->template_file) == 0): ?>
|
||||
<?php if (count($this->template_file) == 0) : ?>
|
||||
<li><?php echo _("No File Summary Templates") ?></li>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($this->template_file as $id=>$name): ?>
|
||||
<?php if (in_array($id, $this->configured)): ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<i class="icon icon-ok"></i>
|
||||
<?php else: ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<a class="template_remove" href="<?php echo $this->baseUrl("Playouthistorytemplate/delete-template/id/{$id}"); ?>">
|
||||
<i class="icon icon-trash"></i>
|
||||
</a>
|
||||
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
|
||||
<?php echo _("Set Default") ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($this->template_file as $id => $name) : ?>
|
||||
<?php if (in_array($id, $this->configured)) : ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>" class="template_configured">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<i class="icon icon-ok"></i>
|
||||
<?php else : ?>
|
||||
<li data-template="<?php echo $id; ?>" data-name="<?php echo $name; ?>">
|
||||
<a class="template_name" href="<?php echo $this->baseUrl("Playouthistorytemplate/configure-template/id/{$id}"); ?>">
|
||||
<?php echo $name; ?>
|
||||
</a>
|
||||
<a class="template_remove" href="<?php echo $this->baseUrl("Playouthistorytemplate/delete-template/id/{$id}"); ?>">
|
||||
<i class="icon icon-trash"></i>
|
||||
</a>
|
||||
<a class="template_default" href="<?php echo $this->baseUrl("Playouthistorytemplate/set-template-default/format/json/id/{$id}"); ?>">
|
||||
<?php echo _("Set Default") ?>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,44 +1,38 @@
|
|||
<?php if ($this->template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
|
||||
<h4><?php echo _("Creating File Summary Template") ?></h4>
|
||||
<?php else: ?>
|
||||
<h4><?php echo _("Creating Log Sheet Template") ?></h4>
|
||||
<?php if ($this->template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE) : ?>
|
||||
<h4><?php echo _("Creating File Summary Template") ?></h4>
|
||||
<?php else : ?>
|
||||
<h4><?php echo _("Creating Log Sheet Template") ?></h4>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="template_name_wrap">
|
||||
<label>
|
||||
<?php echo _("Name") ?>
|
||||
<input id="template_name" type="text" value="<?php echo $this->template_name; ?>">
|
||||
</label>
|
||||
<label>
|
||||
<?php echo _("Name") ?>
|
||||
<input id="template_name" type="text" value="<?php echo $this->template_name; ?>">
|
||||
</label>
|
||||
|
||||
<?php $i = 0;
|
||||
$usedFileMD = array();
|
||||
$usedFileMD = array();
|
||||
?>
|
||||
|
||||
<ul class="template_item_list">
|
||||
<?php foreach ($this->template_fields as $field): ?>
|
||||
<?php foreach ($this->template_fields as $field) : ?>
|
||||
|
||||
<?php if($field["isFileMd"]) {
|
||||
$usedFileMD[] = $field["name"];
|
||||
} ?>
|
||||
<?php if ($field["isFileMd"]) {
|
||||
$usedFileMD[] = $field["name"];
|
||||
} ?>
|
||||
|
||||
<li id="<?php echo "field_".$i?>"
|
||||
data-id="<?php echo isset($field["id"]) ? $field["id"] : ""; ?>"
|
||||
data-name="<?php echo $field["name"]?>"
|
||||
data-label="<?php echo $field["label"]?>"
|
||||
data-type="<?php echo $field["type"]?>"
|
||||
data-filemd="<?php echo var_export($field["isFileMd"], true)?>"
|
||||
class="<?php echo ($field["isFileMd"]) ? 'field_filemd' : 'field_other' ?>">
|
||||
<span><?php echo $field["label"]?></span>
|
||||
<span><?php echo $field["type"]?></span>
|
||||
<?php if(!in_array($field["name"], $this->required_fields)): ?>
|
||||
<span class="template_item_remove">
|
||||
<i class="icon icon-trash"></i>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php $i++; ?>
|
||||
<li id="<?php echo "field_" . $i ?>" data-id="<?php echo isset($field["id"]) ? $field["id"] : ""; ?>" data-name="<?php echo $field["name"] ?>" data-label="<?php echo $field["label"] ?>" data-type="<?php echo $field["type"] ?>" data-filemd="<?php echo var_export($field["isFileMd"], true) ?>" class="<?php echo ($field["isFileMd"]) ? 'field_filemd' : 'field_other' ?>">
|
||||
<span><?php echo $field["label"] ?></span>
|
||||
<span><?php echo $field["type"] ?></span>
|
||||
<?php if (!in_array($field["name"], $this->required_fields)) : ?>
|
||||
<span class="template_item_remove">
|
||||
<i class="icon icon-trash"></i>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
<?php $i++; ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="add_more">
|
||||
|
@ -46,41 +40,38 @@
|
|||
<p><?php echo _("Add more elements") ?>:</p>
|
||||
|
||||
<ul class="template_file_md">
|
||||
<?php foreach ($this->fileMD as $md): ?>
|
||||
<?php foreach ($this->fileMD as $md) : ?>
|
||||
|
||||
<?php if(in_array($md["name"], $usedFileMD)) {
|
||||
continue;
|
||||
} ?>
|
||||
<?php if (in_array($md["name"], $usedFileMD)) {
|
||||
continue;
|
||||
} ?>
|
||||
|
||||
<li id="<?php echo "md_".$md["name"]?>"
|
||||
data-name="<?php echo $md["name"]?>"
|
||||
data-type="<?php echo $md["type"]?>"
|
||||
data-label="<?php echo $md["label"]?>">
|
||||
<?php echo $md["label"] ?>
|
||||
<a class="field_add" href="#"><i class="icon icon-plus"></i></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
<li id="<?php echo "md_" . $md["name"] ?>" data-name="<?php echo $md["name"] ?>" data-type="<?php echo $md["type"] ?>" data-label="<?php echo $md["label"] ?>">
|
||||
<?php echo $md["label"] ?>
|
||||
<a class="field_add" href="#"><i class="icon icon-plus"></i></a>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php if ($this->template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
|
||||
<div class="template_item_add">
|
||||
<input type="text" placeholder="<?php echo _("Add New Field") ?>">
|
||||
<select>
|
||||
<?php foreach ($this->fields as $field): ?>
|
||||
<option value="<?php echo $field; ?>"><?php echo _($field); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button class="btn">
|
||||
<i class="icon-white icon-plus"></i>
|
||||
<?php echo _("Add") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE) : ?>
|
||||
<div class="template_item_add">
|
||||
<input type="text" placeholder="<?php echo _("Add New Field") ?>">
|
||||
<select>
|
||||
<?php foreach ($this->fields as $field) : ?>
|
||||
<option value="<?php echo $field; ?>"><?php echo _($field); ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<button class="btn">
|
||||
<i class="icon-white icon-plus"></i>
|
||||
<?php echo _("Add") ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<?php if (!in_array($this->template_id, $this->configured)): ?>
|
||||
<button id="template_set_default" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Set Default Template") ?></button>
|
||||
<?php endif; ?>
|
||||
<button id="template_item_save" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Save") ?></button>
|
||||
<?php if (!in_array($this->template_id, $this->configured)) : ?>
|
||||
<button id="template_set_default" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Set Default Template") ?></button>
|
||||
<?php endif; ?>
|
||||
<button id="template_item_save" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Save") ?></button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue