@ -50,6 +50,7 @@
{{/zone}}
{{#zone "content"}}
{{#if hasRoles}}
<div id="loading-content" class="col-centered">
{{#unless isCloud}}
{{#if removePermitted}}
@ -89,6 +90,26 @@
<th>By Role name</th>
</div>
{{else}}
<div id="user-created-msg" class="container col-centered wr-content">
<div class="wr-form">
<p class="page-sub-title">You Haven't created roles yet.</p>
<br>Please click <b>"Add A New Role"</b>, if you wish to add a role.
<hr/>
<a href="{{@app.context}}/role/add" class="cu-btn-inner">
<span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i>
</span>
Add Role
</a>
{{/if}}
{{#zone "bottomJs"}}
@ -33,6 +33,16 @@ function onRequest(context) {
context["adminRole"] = deviceMgtProps["adminRole"];
context["isCloud"] = deviceMgtProps["isCloud"];
var roleCount = userModule.getRolesCount()
if (deviceMgtProps["isCloud"]) {
roleCount = userModule.getFilteredRoles("devicemgt").content.count;
}
if (roleCount > 0) {
context["hasRoles"] = true;
} else {
context["hasRoles"] = false;
return context;