<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Use the original icon when creating template to indicate whether it
is remote or local.<br>
<img src="cid:part1.01010000.03020101@linux.vnet.ibm.com" alt=""><br>
<br>
As shao he is new about UI stuff, tips below for reference.<br>
<br>
<u>%kimchi-home%/ui/pages/tabs/templates.html.tmpl</u><br>
<br>
put an img tag after VM icon, use css 'position', 'width', 'height'
to control the size and position of the image.<br>
<br>
<div class="template-icon template-icon-position"><br>
<img alt="" src="{icon}"><br>
<font color="#3333ff"><i><img alt=""
src="{location}" style="width: 20px; height: 20px; position:
relative; top: -15px; left: 47px;"></i></font><br>
</div><br>
<br>
<u>%kimchi-home%/ui/js/src/kimchi.template_main.js</u><br>
<br>
differentiate template is local or remote.<br>
<br>
kimchi.doListTemplates = function() {<br>
kimchi.listTemplates(function(result) {<br>
if (result && result.length) {<br>
$('#noTemplates').hide();<br>
var listHtml = '';<br>
var templateHtml = $('#templateTmpl').html();<br>
$.each(result, function(index, value) {<br>
<font color="#3333ff"><br>
<i> if(isLocal){ //seek for some way to
differentiate local or remote</i><i><br>
</i><i> value.location =
"images/theme-default/icon-local.png";</i><i><br>
</i><i> }else{</i><i><br>
</i><i> value.location =
"images/theme-default/icon-remote.png";</i><i><br>
</i><i> }</i></font><br>
<br>
listHtml += kimchi.template(templateHtml, value);<br>
});<br>
$('#templateList').html(listHtml);<br>
kimchi.templateBindClick();<br>
} else {<br>
$('#templateList').html('');<br>
$('#noTemplates').show();<br>
}<br>
$('html').removeClass('processing');<br>
}, function(err) {<br>
kimchi.message.error(err.responseJSON.reason);<br>
$('html').removeClass('processing');<br>
});<br>
};<br>
</body>
</html>