# HG changeset patch # User Marcin Kuzminski # Date 2019-08-16 09:54:34 # Node ID 698bb7ce1d08a736265d9428488f94c4899ac742 # Parent 74da9073f9474b7c3d19e46472e3cbd1f83aa0b4 ui: changed status icons to elements instead of div. diff --git a/rhodecode/public/css/comments.less b/rhodecode/public/css/comments.less --- a/rhodecode/public/css/comments.less +++ b/rhodecode/public/css/comments.less @@ -227,11 +227,6 @@ tr.inline-comments div { } } - .flag_status { - display: inline-block; - margin: -2px .5em 0 .25em - } - .delete-comment { display: inline-block; color: @rcblue; diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less --- a/rhodecode/public/css/main.less +++ b/rhodecode/public/css/main.less @@ -983,9 +983,6 @@ label { } #graph { - .flag_status { - margin: 0; - } .pagination-left { float: left; @@ -1090,23 +1087,6 @@ label { } } -.flag_status { - margin: 2px; - &.under_review { - .circle(5px, @alert3); - } - &.approved { - .circle(5px, @alert1); - } - &.rejected, - &.forced_closed{ - .circle(5px, @alert2); - } - &.not_reviewed { - .circle(5px, @grey5); - } -} - .review-status { &.under_review { color: @alert3; @@ -1153,9 +1133,6 @@ label { border-color: @grey5; } -.flag_status_comment_box { - margin: 5px 6px 0px 2px; -} .test_pattern_preview { margin: @space 0; @@ -1885,10 +1862,6 @@ BIN_FILENODE = 7 line-height: 15px; } - .flag_status { - margin: 0; - } - .compare-radio-button { position: relative; top: -3px; @@ -1930,10 +1903,6 @@ BIN_FILENODE = 7 .table_disp { .status { width: auto; - - .flag_status { - float: left; - } } } diff --git a/rhodecode/public/css/select2.less b/rhodecode/public/css/select2.less --- a/rhodecode/public/css/select2.less +++ b/rhodecode/public/css/select2.less @@ -108,10 +108,6 @@ select.select2{height:28px;visibility:hi .drop-menu-dropdown { .drop-menu-core; - - .flag_status { - margin-top: 0; - } } .drop-menu-base { @@ -122,10 +118,6 @@ select.select2{height:28px;visibility:hi z-index: 2; cursor: pointer; - .flag_status { - margin-top: 0; - } - a { display:block; padding: .7em; diff --git a/rhodecode/public/js/src/rhodecode/codemirror.js b/rhodecode/public/js/src/rhodecode/codemirror.js --- a/rhodecode/public/js/src/rhodecode/codemirror.js +++ b/rhodecode/public/js/src/rhodecode/codemirror.js @@ -368,8 +368,9 @@ var initCommentBoxCodeMirror = function( $(CommentForm.statusChange).select2("val", 'approved').trigger('change'); }, render: function(elt, data, completion) { - var el = document.createElement('div'); - el.className = "flag_status flag_status_comment_box approved pull-left"; + var el = document.createElement('i'); + + el.className = "icon-circle review-status-approved"; elt.appendChild(el); el = document.createElement('span'); @@ -387,8 +388,8 @@ var initCommentBoxCodeMirror = function( $(CommentForm.statusChange).select2("val", 'rejected').trigger('change'); }, render: function(elt, data, completion) { - var el = document.createElement('div'); - el.className = "flag_status flag_status_comment_box rejected pull-left"; + var el = document.createElement('i'); + el.className = "icon-circle review-status-rejected"; elt.appendChild(el); el = document.createElement('span'); @@ -708,8 +709,8 @@ var fillCodeMirrorOptions = function(tar this.initStatusChangeSelector = function(){ var formatChangeStatus = function(state, escapeMarkup) { var originalOption = state.element; - return '
' + - '' + escapeMarkup(state.text) + ''; + var tmpl = '{1}'.format($(originalOption).data('status'), escapeMarkup(state.text)); + return tmpl }; var formatResult = function(result, container, query, escapeMarkup) { return formatChangeStatus(result, escapeMarkup); diff --git a/rhodecode/public/js/src/rhodecode/comments.js b/rhodecode/public/js/src/rhodecode/comments.js --- a/rhodecode/public/js/src/rhodecode/comments.js +++ b/rhodecode/public/js/src/rhodecode/comments.js @@ -218,8 +218,8 @@ var _submitAjaxPOST = function(url, post this.initStatusChangeSelector = function(){ var formatChangeStatus = function(state, escapeMarkup) { var originalOption = state.element; - return '
' + - '' + escapeMarkup(state.text) + ''; + var tmpl = '{1}'.format($(originalOption).data('status'), escapeMarkup(state.text)); + return tmpl }; var formatResult = function(result, container, query, escapeMarkup) { return formatChangeStatus(result, escapeMarkup); diff --git a/rhodecode/templates/changeset/changeset_file_comment.mako b/rhodecode/templates/changeset/changeset_file_comment.mako --- a/rhodecode/templates/changeset/changeset_file_comment.mako +++ b/rhodecode/templates/changeset/changeset_file_comment.mako @@ -79,7 +79,7 @@ % endif % if comment.status_change: -
+
${comment.status_change[0].status_lbl}
diff --git a/rhodecode/templates/commits/changelog_elements.mako b/rhodecode/templates/commits/changelog_elements.mako --- a/rhodecode/templates/commits/changelog_elements.mako +++ b/rhodecode/templates/commits/changelog_elements.mako @@ -33,16 +33,16 @@
%if c.statuses.get(commit.raw_id)[2]: -
+
%else: -
+
%endif
%else: -
+ %endif diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -348,8 +348,9 @@ ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))} + <%def name="pullrequest_status(status)"> -
+ <%def name="pullrequest_title(title, description)"> diff --git a/rhodecode/templates/pullrequests/pullrequest_show.mako b/rhodecode/templates/pullrequests/pullrequest_show.mako --- a/rhodecode/templates/pullrequests/pullrequest_show.mako +++ b/rhodecode/templates/pullrequests/pullrequest_show.mako @@ -150,7 +150,7 @@
%if c.pull_request_review_status: -
+ %if c.pull_request.is_closed(): ${_('Closed')}, @@ -213,7 +213,7 @@ <% review_status = c.review_versions[ver_pr].status if ver_pr in c.review_versions else 'not_reviewed' %> -
+
diff --git a/rhodecode/templates/summary/summary_commits.mako b/rhodecode/templates/summary/summary_commits.mako --- a/rhodecode/templates/summary/summary_commits.mako +++ b/rhodecode/templates/summary/summary_commits.mako @@ -25,16 +25,16 @@
%if c.statuses.get(cs.raw_id)[2]: -
+
%else: -
+
%endif
%else: -
+ %endif