CC-5334 : Localize Ryerson History Feature

This commit is contained in:
Naomi Aro 2013-09-23 14:42:35 +02:00
parent 69eb6ba060
commit ee45f10aeb
4 changed files with 37 additions and 32 deletions

View file

@ -1,26 +1,26 @@
<?php if ($this->template_type == Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
<h4>Creating File Summary Template</h4>
<h4><?php echo _("Creating File Summary Template") ?></h4>
<?php else: ?>
<h4>Creating Log Sheet Template</h4>
<h4><?php echo _("Creating Log Sheet Template") ?></h4>
<?php endif; ?>
<div class="template_name_wrap">
<label>
Name
<?php echo _("Name") ?>
<input id="template_name" type="text" value="<?php echo $this->template_name; ?>">
</label>
<?php $i = 0;
<?php $i = 0;
$usedFileMD = array();
?>
<ul class="template_item_list">
<?php foreach ($this->template_fields as $field): ?>
<?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"]?>"
@ -37,21 +37,21 @@
<?php endif; ?>
</li>
<?php $i++; ?>
<?php endforeach; ?>
</ul>
</div>
<div class="add_more">
<p>Add more elements:</p>
<p><?php echo _("Add more elements") ?>:</p>
<ul class="template_file_md">
<?php foreach ($this->fileMD as $md): ?>
<?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"]?>"
@ -61,23 +61,26 @@
</li>
<?php endforeach; ?>
</ul>
<?php if ($this->template_type !== Application_Service_HistoryService::TEMPLATE_TYPE_FILE): ?>
<div class="template_item_add">
<input type="text" placeholder="Add New Field">
<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>
<option value="<?php echo $field; ?>"><?php echo _($field); ?></option>
<?php endforeach; ?>
</select>
<button class="btn"><i class="icon-white icon-plus"></i> Add</button>
<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">Set Default Template</button>
<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">Save</button>
<button id="template_item_save" data-template="<?php echo $this->template_id; ?>" class="btn"><?php echo _("Save") ?></button>
</div>