diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2015-07-08 12:02:44 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2015-07-08 14:08:00 +0200 |
commit | 7a4939f74f1bc53203eb99945182adeb7ab750da (patch) | |
tree | efddc46d7afbdb9bd59eda48196a7aec571adf03 /server/sonar-web/src/main/js/apps/custom-measures/templates | |
parent | afa5a589582cfd710a8f83ff410204e082c14dfe (diff) | |
download | sonarqube-7a4939f74f1bc53203eb99945182adeb7ab750da.tar.gz sonarqube-7a4939f74f1bc53203eb99945182adeb7ab750da.zip |
SONAR-6697 add new custom measures page
Diffstat (limited to 'server/sonar-web/src/main/js/apps/custom-measures/templates')
6 files changed, 97 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-delete.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-delete.hbs new file mode 100644 index 00000000000..87a29038ba1 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-delete.hbs @@ -0,0 +1,13 @@ +<form id="delete-custom-measure-form"> + <div class="modal-head"> + <h2>Delete Custom Measure</h2> + </div> + <div class="modal-body"> + <div class="js-modal-messages"></div> + Are you sure you want to delete custom measure "{{metric.name}}"? + </div> + <div class="modal-foot"> + <button id="delete-custom-measure-submit" class="button-red">Delete</button> + <a href="#" class="js-modal-close" id="delete-custom-measure-cancel">Cancel</a> + </div> +</form> diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs new file mode 100644 index 00000000000..52e16a0e98b --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-form.hbs @@ -0,0 +1,30 @@ +<form id="create-custom-measure-form" autocomplete="off"> + <div class="modal-head"> + <h2>{{#if id}}Update{{else}}Create{{/if}} Custom Measure</h2> + </div> + <div class="modal-body"> + <div class="js-modal-messages"></div> + {{#unless id}} + <div class="modal-field"> + <label for="create-custom-measure-metric">Metric<em class="mandatory">*</em></label> + <select id="create-custom-measure-metric" name="metric" required> + {{#each metrics}} + <option value="{{id}}" {{#eq id ../metric.id}}selected{{/eq}}>{{name}}</option> + {{/each}} + </select> + </div> + {{/unless}} + <div class="modal-field"> + <label for="create-custom-measure-value">Value<em class="mandatory">*</em></label> + <input id="create-custom-measure-value" name="value" type="text" maxlength="200" required value="{{value}}"> + </div> + <div class="modal-field"> + <label for="create-custom-measure-description">Description</label> + <textarea id="create-custom-measure-description" name="description">{{description}}</textarea> + </div> + </div> + <div class="modal-foot"> + <button id="create-custom-measure-submit">{{#if id}}Update{{else}}Create{{/if}}</button> + <a href="#" class="js-modal-close" id="create-custom-measure-cancel">Cancel</a> + </div> +</form> diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-header.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-header.hbs new file mode 100644 index 00000000000..a8183635b8c --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-header.hbs @@ -0,0 +1,9 @@ +<header class="page-header"> + <h1 class="page-title">{{t 'custom_measures.page'}}</h1> + <div class="page-actions"> + <div class="button-group"> + <button id="custom-measures-create">{{t 'create'}}</button> + </div> + </div> + <p class="page-description">{{t 'custom_measures.page.description'}}</p> +</header> diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-layout.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-layout.hbs new file mode 100644 index 00000000000..a7bd51772ff --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-layout.hbs @@ -0,0 +1,5 @@ +<div class="page"> + <div id="custom-measures-header"></div> + <div id="custom-measures-list"></div> + <div id="custom-measures-list-footer"></div> +</div> diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-footer.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-footer.hbs new file mode 100644 index 00000000000..3a91e24482c --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-footer.hbs @@ -0,0 +1,6 @@ +<footer class="spacer-top note text-center"> + {{count}}/{{total}} shown + {{#if more}} + <a id="custom-measures-fetch-more" class="spacer-left" href="#">show more</a> + {{/if}} +</footer> diff --git a/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-item.hbs b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-item.hbs new file mode 100644 index 00000000000..d8aeedf60d3 --- /dev/null +++ b/server/sonar-web/src/main/js/apps/custom-measures/templates/custom-measures-list-item.hbs @@ -0,0 +1,34 @@ +<div class="pull-right big-spacer-left nowrap"> + <a class="js-custom-measure-update icon-edit" title="Update" data-toggle="tooltip" href="#"></a> + <a class="js-custom-measure-delete icon-delete" title="Delete" data-toggle="tooltip" href="#"></a> +</div> + +<div class="display-inline-block text-middle text-right width-10 big-spacer-right text-ellipsis" + title="{{formatMeasure value metric.type}}"> + <span class="js-custom-measure-value emphasised-measure"> + {{formatMeasure value metric.type}} + </span> +</div> + +<div class="display-inline-block text-middle width-20"> + <div> + <strong class="js-custom-measure-metric-name"> + {{metric.name}} + </strong> + {{#if pending}} + <span class="js-custom-measure-pending badge badge-warning spacer-left" + title="{{t 'custom_measures.pending_tooltip'}}" + data-toggle="tooltip" data-placement="bottom">{{t 'custom_measures.pending'}}</span> + {{/if}} + </div> + <span class="js-custom-measure-domain note">{{metric.domain}}</span> +</div> + +<div class="display-inline-block text-top width-20"> + <span class="js-custom-measure-description">{{description}}</span> +</div> + +<div class="display-inline-block text-top width-30"> + Created on <span class="js-custom-measure-created-at">{{d createdAt}}</span> + by <span class="js-custom-measure-user">{{user.name}}</span> +</div> |