Changeset - 61c99cdbbfff
[Not reviewed]
default
0 2 0
domruf - 8 years ago 2017-10-27 20:13:39
dominikruf@gmail.com
less: cleanup footer navbar style

- use default font weight for footer - it doesn't need special attention and
doesn't have to be bold
- use class selector for the footer instead of ID selector
- add comment for the styling that is removing margin below footer
2 files changed with 3 insertions and 5 deletions:
0 comments (0 inline, 0 general)
kallithea/public/less/style.less
Show inline comments
 
body {
 
  background: url("../images/background.png") repeat scroll 0 0 #B0B0B0;
 
}
 

	
 
/* class for texts where newlines should be preserved, for very light-weight ascii art markup (like pull request descriptions) */
 
.formatted-fixed {
 
  white-space: pre-wrap;
 
}
 

	
 
/* use monospace for changeset hashes */
 
.changeset_hash {
 
  font-family: @font-family-monospace;
 
}
 

	
 
/* Note: class 'icon-empty' or 'icon-gravatar' can be used to get icon-ish styling without an actual glyph */
 
i[class^='icon-empty'],
 
i[class^='icon-gravatar'] {
 
  background-repeat: no-repeat;
 
  background-position: center;
 
  display: inline-block;
 
  min-width: 16px;
 
  min-height: 16px;
 
  margin: -2px 0 -4px 0;
 
}
 

	
 
.inline-comments-general.show-general-status .hidden.general-only {
 
  display: block !important;
 
}
 
.truncate {
 
  white-space: nowrap;
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  -o-text-overflow: ellipsis;
 
  -ms-text-overflow: ellipsis;
 
}
 
.truncate.autoexpand:hover {
 
  overflow: visible;
 
}
 

	
 
/* show comment anchors when hovering over panel-heading */
 
a.permalink {
 
  visibility: hidden;
 
}
 
.panel-heading:hover .permalink {
 
  visibility: visible;
 
}
 

	
 
.navbar-inverse {
 
  border: none;
 
}
 

	
 
/* logo */
 
nav.navbar .navbar-brand {
 
  font-size: 20px;
 
  padding-top: 12px;
 
}
 
nav.navbar.mainmenu .navbar-brand .branding {
 
  &:before {
 
    content: "";
 
    display: inline-block;
 
    margin-right: .2em;
 
    background-image: url(@kallithea-logo-url);
 
    width: @kallithea-logo-width;
 
    height: @kallithea-logo-height;
 
    margin-bottom: -@kallithea-logo-bottom;
 
    margin-top: -12px;
 
  }
 
}
 

	
 
/* code highlighting */
 
/* don't use bootstrap style for code blocks */
 
.code-highlighttable pre {
 
  background: inherit;
 
  border: 0;
 
}
 

	
 
/* every direct child of a panel, that is not .panel-heading, should auto
 
 * overflow to prevent overflowing of elements like text boxes and tables */
 
.panel > :not(.panel-heading){
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 

	
 
/* search highlighting */
 
div.search-code-body pre .match {
 
  background-color: @highlight-color;
 
}
 
div.search-code-body pre .break {
 
  background-color: @highlight-line-color;
 
  width: 100%;
 
  display: block;
 
}
 

	
 
/* use @alert-danger-text for form error messages and .alert-danger for the input element */
 
.form-group .error-message {
 
  color: @alert-danger-text;
 
  display: inline-block;
 
  padding-top: 5px;
 
  &:empty{
 
    display: none;
 
  }
 
}
 
input.error {
 
  .alert-danger;
 
}
 

	
 
/* language bars (summary page) */
 
#lang_stats {
 
  .progress-bar {
 
    min-width: 15px;
 
    border-top-right-radius: 8px;
 
    border-bottom-right-radius: 8px;
 
  }
 
  td {
 
    padding: 1px 0 !important;
 
  }
 
}
 

	
 
/* every direct child of a main panel, that is not .panel-heading, should auto
 
 * overflow to prevent overflowing of elements like text boxes and tables */
 
#main > .panel > :not(.panel-heading) {
 
  overflow-x: auto;
 
  min-height: 0.01%;
 
}
 

	
 
/* use pointer cursor for expand_commit */
 
.expand_commit .icon-align-left {
 
  cursor: pointer;
 
  color: #999;
 
}
 

	
 
/* don't break author, date and comment cells into multiple lines in changeset table */
 
table.changesets {
 
  .author,
 
  .date,
 
  .comments {
 
    white-space: nowrap;
 
  }
 
}
 

	
 
/* textareas should be at least 100px high and 400px wide */
 
textarea.form-control {
 
  min-height: 100px;
 
  min-width: 400px;
 
}
 

	
 
/* add some space between the code-browser icons and the file names */
 
.browser-dir > i[class^='icon-'],
 
.submodule-dir > i[class^='icon-'],
 
.browser-file > i[class^='icon-'] {
 
  padding-right: 0.3em;
 
}
 

	
 
.form-group > label {
 
  float: left;
 
}
 
.dt_repo_pending {
 
  opacity: 0.5;
 
}
 

	
 
div.panel-primary {
 
  border: none;
 
}
 
div.panel div.panel-heading {
 
  font-size: 14px;
 
  font-weight: 700;
 
}
 

	
 
#content div.panel ul.pagination {
 
  margin: 10px 0 0 0;
 
}
 
#content div.panel ul.pagination > li > a,
 
#content div.panel ul.pagination > li > span {
 
  background: #ebebeb url("../images/pager.png") repeat-x;
 
  color: #4A4A4A;
 
  font-weight: 700;
 
  border-top: 1px solid #dedede;
 
  border-left: 1px solid #cfcfcf;
 
  border-bottom: 1px solid #c4c4c4;
 
  border-right: 1px solid #cfcfcf;
 
}
 
#content div.panel ul.pagination > li.active > span,
 
#content div.panel ul.pagination > li:hover > a,
 
#content div.panel ul.pagination > li:active > a {
 
  background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
  border-top: 1px solid #ccc;
 
  border-left: 1px solid #bebebe;
 
  border-bottom: 1px solid #afafaf;
 
  border-right: 1px solid #bebebe;
 
  color: #515151;
 
}
 

	
 
#footer {
 
/* remove margin below footer */
 
.navbar.footer {
 
  margin-bottom: 0;
 
}
 
#footer > span {
 
  font-weight: 700;
 
}
 

	
 
.user-menu {
 
  padding: 0 !important;
 
}
 
#quick_login {
 
  width: 360px;
 
  margin-top: 15px;
 
  min-height: 110px;
 
}
 
#quick_login input#username,
 
#quick_login input#password {
 
  display: block;
 
  margin: 5px 0 10px;
 
}
 
#quick_login .password_forgotten a,
 
#quick_login .register a {
 
  padding: 0 !important;
 
  line-height: 25px !important;
 
  float: left;
 
  clear: both;
 
}
 
#quick_login .submit {
 
  float: right;
 
}
 
#quick_login .submit input#sign_in {
 
  margin-top: 5px;
 
}
 
#quick_login > .pull-left {
 
  width: 170px;
 
}
 
#quick_login > .pull-right {
 
  width: 140px;
 
}
 
#quick_login .full_name {
 
  font-weight: bold;
 
  padding: 3px;
 
}
 
#quick_login .email {
 
  padding: 3px 3px 3px 0;
 
}
 
#quick_login :not(input) {
 
  color: @kallithea-theme-inverse-color;
 
  padding-bottom: 3px;
 
}
 
#register div.form div.form-group > label {
 
  width: 135px;
 
  float: left;
 
  text-align: right;
 
  margin: 2px 10px 0 0;
 
  padding: 5px 0 0 5px;
 
}
 
#register div.form div.form-group > div input {
 
  width: 300px;
 
}
 
#register div.form div.buttons {
 
  border-top: 1px solid #DDD;
 
  margin: 0;
 
  padding: 10px 0 0 145px;
 
}
 
#journal .journal_user {
 
  color: #747474;
 
  font-size: 14px;
 
  font-weight: bold;
 
  height: 30px;
 
}
 
#journal .journal_user.deleted {
 
  color: #747474;
 
  font-size: 14px;
 
  font-weight: normal;
 
  height: 30px;
 
  font-style: italic;
 
}
 
#journal .journal_icon {
 
  clear: both;
 
  float: left;
 
  padding-right: 4px;
 
  padding-top: 3px;
 
}
 
#journal .journal_action {
 
  padding-top: 4px;
 
  min-height: 2px;
 
  float: left;
 
}
 
#journal .journal_action_params {
 
  clear: left;
 
  padding-left: 22px;
 
}
 
#journal .date {
 
  clear: both;
 
  color: #777777;
 
  font-size: 11px;
 
  padding-left: 22px;
 
}
 
#journal .journal_repo_name {
 
  font-weight: bold;
 
  font-size: 1.1em;
 
}
 
#journal .compare_view {
 
  padding: 5px 0px 5px 0px;
 
  width: 95px;
 
}
 
.trending_language_tbl,
 
.trending_language_tbl td {
 
  border: 0 !important;
 
  margin: 0 !important;
 
  padding: 0 !important;
 
}
 
.trending_language_tbl,
 
.trending_language_tbl tr {
 
  border-spacing: 1px;
 
}
 
h3.files_location {
 
  font-size: 1.8em;
 
  font-weight: 700;
 
  border-bottom: none !important;
 
  margin: 10px 0 !important;
 
}
 
.file_history {
 
  padding-top: 10px;
 
  font-size: 16px;
 
}
 
.file_author {
 
  float: left;
 
}
 
.file_author .item {
 
  float: left;
 
  padding: 5px;
 
  color: #888;
 
}
 
.changeset_id {
 
  color: #666666;
 
  margin-right: -3px;
 
}
 
.changeset-logical-index {
 
  color: #666666;
 
  font-style: italic;
 
  font-size: 85%;
 
  padding-right: 0.5em;
 
  text-align: right;
 
}
 
#changeset_compare_view_content .compare_view_commits {
 
  width: auto !important;
 
}
 
#changeset_compare_view_content .compare_view_commits td {
 
  padding: 0px 0px 0px 12px !important;
 
}
 
td.author {
 
  overflow: hidden;
 
  text-overflow: ellipsis;
 
  white-space: nowrap;
 
  max-width: 210px;
 
}
 
#graph_nodes {
 
  position: absolute;
 
  width: 100px;
 
}
 
#graph_content,
 
#graph_content_pr,
 
#graph .container_header {
 
  margin-left: 100px;
 
}
 
#graph_content {
 
  position: relative;
 
}
 
table#updaterevs-table tr.mergerow,
 
table#updaterevs-table tr.out-of-range,
 
table#changesets tr.mergerow,
 
table#changesets tr.out-of-range {
 
  opacity: 0.6;
 
}
 
table#changesets tr > td {
 
  height: 31px;
 
  border-color: #cdcdcd;
 
  text-align: left;
 
}
 
table#changesets tr > td.checkbox-column {
 
  width: 14px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.status {
 
  width: 14px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.hash {
 
  width: 100px;
 
  font-size: 0.85em;
 
}
 
table#changesets tr > td.date {
 
  width: auto !important;
 
  color: #666;
 
  font-size: 10px;
 
  white-space: nowrap;
 
}
 
table#changesets tr > td.mid {
 
  width: 100%;
 
  padding: 0;
 
}
 
table#changesets .log-container {
 
  position: relative;
 
  margin-top: 8px;
 
}
 
table#changesets tr #singlerange,
 
table#changesets tr .changeset_range {
 
  float: left;
 
  margin: 2px 0;
 
}
 
table#changesets tr > td.author img {
 
  vertical-align: middle;
 
}
 
table#changesets tr > td.author .user {
 
  color: #444444;
 
}
 
table#changesets tr > td.mid .message,
 
#graph_content_pr .compare_view_commits .message {
 
  white-space: nowrap;
 
  padding: 0;
 
  overflow: hidden;
 
}
 
#graph_content_pr .compare_view_commits .message {
 
  padding: 0 !important;
 
}
 
table#changesets tr > td.mid .message.expanded,
 
#graph_content_pr .compare_view_commits .message.expanded {
 
  height: auto;
 
  overflow: initial;
 
}
 
table#changesets tr .extra-container {
 
  display: block;
 
  position: absolute;
 
  top: -15px;
 
  right: 0;
 
  padding-left: 5px;
 
  background: #FFFFFF;
 
  height: 41px;
 
}
 
#pull_request_overview .comments-container,
 
#changeset_compare_view_content .comments-container,
 
table#changesets .comments-container,
 
#shortlog_data .comments-container,
 
table#changesets .logtags {
 
  display: block;
 
  float: left;
 
  overflow: hidden;
 
  padding: 0;
 
  margin: 0;
 
  white-space: nowrap;
 
}
 
table#changesets .comments-container {
 
  margin: 0.8em 0;
 
  margin-right: 0.5em;
 
}
 
table#changesets .tagcontainer {
 
  width: 80px;
 
  position: relative;
 
  float: right;
 
  height: 100%;
 
  top: 7px;
 
  margin-left: 0.5em;
 
}
 
table#changesets .logtags {
 
  min-width: 80px;
 
  height: 1.1em;
 
  position: absolute;
 
  left: 0px;
 
  width: auto;
 
  top: 0px;
 
}
 
table#changesets .logtags.tags {
 
  top: 14px;
 
}
 
table#changesets .logtags:hover {
 
  overflow: visible;
 
  position: absolute;
 
  width: auto;
 
  right: 0;
 
  left: initial;
 
}
 
table#changesets .logtags .booktag,
 
table#changesets .logtags .tagtag {
 
  float: left;
 
  line-height: 1em;
 
  margin-bottom: 1px;
 
  margin-right: 1px;
 
  padding: 1px 3px;
 
  font-size: 10px;
 
}
 
table#changesets tr > td.mid .message a:hover {
 
  text-decoration: none;
 
}
 
#updaterevs-graph {
 
  position: relative;
 
  width: 40px;
 
  height: 0;
 
}
 
#updaterevs-table {
 
  margin-left: 40px !important;
 
}
 
.issue-tracker-link {
 
  color: #3F6F9F;
 
  font-weight: bold !important;
 
}
 
/* changeset statuses (must be the same name as the status) */
 
.changeset-status-not_reviewed {
 
  color: #bababa;
 
}
 
.changeset-status-approved {
 
  color: #81ba51;
 
}
 
.changeset-status-rejected {
 
  color: #d06060;
 
}
 
.changeset-status-under_review {
 
  color: #ffc71e;
 
}
 
.pull-right .changes {
 
  clear: both;
 
}
 
.pull-right .changes .changed_total {
 
  display: block;
 
  float: right;
 
  text-align: center;
 
  min-width: 45px;
 
  cursor: pointer;
 
  color: #444444;
 
  background: #FEA;
 
  border-radius: 0px 0px 0px 6px;
 
  padding: 1px;
 
}
 
.pull-right .changes .added,
 
.pull-right .changes .changed,
 
.pull-right .changes .deleted {
 
  color: #444444;
 
}
 
.pull-right .changes .added {
 
  background: #CFC;
 
}
 
.pull-right .changes .changed {
 
  background: #FEA;
 
}
 
.pull-right .changes .deleted {
 
  background: #FAA;
 
}
 

	
 
#repo_size {
 
  display: block;
 
  margin-top: 4px;
 
  color: #666;
 
  float: right;
 
}
 
.currently_following {
 
  padding-left: 10px;
 
  padding-bottom: 5px;
 
}
 
#switch_repos {
 
  position: absolute;
 
  height: 25px;
 
  z-index: 1;
 
}
 
#switch_repos select {
 
  min-width: 150px;
 
  max-height: 250px;
 
  z-index: 1;
 
}
 
.breadcrumbs {
 
  border: medium none;
 
  color: #FFF;
 
  font-weight: 700;
 
  font-size: 14px;
 
}
 
table#permissions_manage span.private_repo_msg {
 
  font-size: 0.8em;
 
  opacity: 0.6;
 
}
 
table#permissions_manage td.private_repo_msg {
 
  font-size: 0.8em;
 
}
 
table#permissions_manage tr#add_perm_input td {
 
  vertical-align: middle;
 
}
 
div.gravatar {
 
  float: left;
 
  background-color: #FFF;
 
  margin-right: 0.7em;
 
  padding: 1px 1px 1px 1px;
 
  line-height: 0;
 
  border-radius: 3px;
 
}
 
div.gravatar img {
 
  border-radius: 2px;
 
}
 
.panel-body.settings > ul.nav-stacked {
 
  float: left;
 
  width: 150px;
 
  padding-right: 35px;
 
  color: #393939;
 
  font-weight: 700;
 
}
 
.panel-body.settings .nav-pills > li {
 
  padding: 0 !important;
 
}
 
.panel-body.settings .nav-pills > li > a {
 
  border-radius: 4px;
 
  padding: 10px;
 
  display: block;
 
  position: relative;
 
  color: inherit;
 
}
 
.panel-body.settings > ul.nav-stacked li.active > a,
 
.panel-body.settings > ul.nav-stacked li.active:hover > a {
 
  color: #fff;
 
  background-color: #577632;
 
}
 
.panel-body.settings > ul.nav-stacked li:hover > a {
 
  text-decoration: none;
 
  background-color: #eee;
 
}
 
.panel-body.settings > div,
 
.panel-body.settings > form {
 
  float: left;
 
  width: 750px;
 
  margin: 0;
 
}
 
.panel-body.no-padding {
 
  padding: 0;
 
}
 
.panel-body ~ .panel-body {
 
  padding-top: 0;
 
}
 
.panel-body.no-padding ~ .panel-body {
 
  padding-top: 15px;
 
}
 
.panel-body > :last-child {
 
  margin-bottom: 0;
 
}
 
.panel-body.settings .text-muted {
 
  margin: 5px 0;
 
}
 
ins,
 
div.options a:hover {
 
  text-decoration: none;
 
}
 
img,
 
nav.navbar #quick li a:hover span.normal,
 
#clone_url,
 
#clone_url_id {
 
  border: none;
 
}
 
img.icon,
 
.right .merge img {
 
  vertical-align: bottom;
 
}
 
#content div.panel div.panel-heading ul.links,
 
#content div.panel div.message div.dismiss {
 
  float: right;
 
  margin: 0;
 
  padding: 0;
 
}
 
nav.navbar #home,
 
#content div.panel ul.left,
 
#content div.panel ol.left,
 
div#commit_history,
 
div#legend_data,
 
div#legend_container,
 
div#legend_choices {
 
  float: left;
 
}
 

	
 
/* set size for statistics charts */
 
#commit_history {
 
  width: 450px;
 
  height: 300px;
 
}
 
#overview {
 
  clear: both;
 
  width: 450px;
 
  height: 100px;
 
}
 

	
 
#content #left #menu ul.closed,
 
#content #left #menu li ul.collapsed,
 
.yui-tt-shadow {
 
  display: none;
 
}
 
#content #left #menu ul.opened,
 
#content #left #menu li ul.expanded {
 
  display: block !important;
 
}
 

	
 
#content div.panel ol.lower-roman,
 
#content div.panel ol.upper-roman,
 
#content div.panel ol.lower-alpha,
 
#content div.panel ol.upper-alpha,
 
#content div.panel ol.decimal {
 
  margin: 10px 24px 10px 44px;
 
}
 
#content div.panel div.form div.form-group > div {
 
  margin: 0 0 10px 200px;
 
}
 
div.form div.form-group div.button input,
 
#content div.panel div.form div.buttons input,
 
div.form div.buttons input,
 
#content div.panel div.action div.button input {
 
  font-size: 11px;
 
  font-weight: 700;
 
  margin: 0;
 
}
 
div.form div.form-group div.highlight,
 
#content div.panel div.form div.buttons div.highlight {
 
  display: inline;
 
}
 
#content div.panel div.form div.buttons,
 
div.form div.buttons {
 
  margin: 10px 10px 0 200px;
 
  padding: 0;
 
}
 
#content div.panel table td.user,
 
#content div.panel table td.address {
 
  width: 10%;
 
  text-align: center;
 
}
 
#content div.panel div.action div.button {
 
  text-align: right;
 
  margin: 6px 0 0;
 
  padding: 0;
 
}
 
#login,
 
#register {
 
  width: 520px;
 
  margin: 10% auto 0;
 
  padding: 0;
 
}
 
.ac .match {
 
  font-weight: 700;
 
  padding-top: 5px;
 
  padding-bottom: 5px;
 
}
 
.q_filter_box {
 
  border-radius: 4px;
 
  border: 0 none;
 
  margin-bottom: -4px;
 
  margin-top: -4px;
 
  padding-left: 3px;
 
}
 
#node_filter {
 
  border: 0px solid #545454;
 
  color: #AAAAAA;
 
  padding-left: 3px;
 
}
 
/** comment main **/
 
.comment .panel,
 
.comment-inline-form {
 
  max-width: 978px;
 
}
 
.comment .panel-body {
 
  background-color: #FAFAFA;
 
}
 
.comments-number {
 
  padding: 10px 0;
 
  color: #666;
 
}
 
.automatic-comment {
 
  font-style: italic;
 
}
 
/** comment form **/
 
.status-block {
 
  margin: 5px;
 
  clear: both;
 
}
 
.panel-heading .pull-left input[type=checkbox],
 
.panel-heading .pull-right input[type=checkbox] {
 
  position: relative;
 
  top: 4px;
 
  margin: -10px 2px 0;
 
}
 
/** comment inline form **/
 
.comment-inlines textarea {
 
  font-family: @font-family-monospace;
 
}
 
/** comment inline **/
 
.inline-comments {
 
  padding: 5px;
 
}
 
.inline-comments .comments-number {
 
  padding: 0px 0px 10px 0px;
 
}
 
input.status_change_checkbox,
 
input.status_change_radio {
 
  margin: 0 0 5px 15px;
 
}
 
@keyframes animated-comment-background {
 
  0% {
 
    background-position: 0 0;
 
  }
 
  100% {
 
    background-position: 20px 0;
 
  }
 
}
 
.comment-preview.failed .user,
 
.comment-preview.failed .panel-body {
 
  color: #666;
 
}
 
.comment-preview .comment-submission-status {
 
  float: right;
 
}
 
.comment-preview .comment-submission-status .btn-group {
 
  margin-left: 10px;
 
}
 
.comment-preview.submitting .panel-body {
 
  background-image: linear-gradient(-45deg, #FAFAFA, #FAFAFA 25%, #FFF 25%, #FFF 50%, #FAFAFA 50%, #FAFAFA 75%, #FFF 75%, #FFF 100%);
 
  background-size: 20px 20px;
 
  animation: animated-comment-background 0.4s linear infinite;
 
}
 
/****
 
PULL REQUESTS
 
*****/
 
div.pr-details-title.closed {
 
  color: #555;
 
  background: #eee;
 
}
 
div.pr {
 
  margin: 0px 15px;
 
  padding: 4px 4px;
 
}
 
tr.pr-closed td {
 
  background-color: #eee !important;
 
  color: #555 !important;
 
}
 
span.pr-closed-tag {
 
  margin-bottom: 1px;
 
  margin-right: 1px;
 
  padding: 1px 3px;
 
  font-size: 10px;
 
  color: #577632;
 
  white-space: nowrap;
 
  border-radius: 4px;
 
  border: 1px solid #d9e8f8;
 
  line-height: 1.5em;
 
}
 
.panel-body .pr-box {
 
  max-width: 978px;
 
  margin-right: 15px;
 
}
 
#s2id_org_ref,
 
#s2id_other_ref,
 
#s2id_org_repo,
 
#s2id_other_repo {
 
  min-width: 150px;
 
  margin: 5px;
 
}
 
#pr-summary > .pr-not-edit {
 
  min-height: 50px !important;
 
}
 
#pr-edit-btn {
 
  margin: 20px 0 0 !important;
 
  position: absolute;
 
}
 
/* make 'next iteration' changeset table smaller and scrollable */
 
#pr-summary #updaterevs {
 
  max-height: 200px;
 
  overflow-y: auto;
 
  overflow-x: hidden;
 
}
 

	
 
/****
 
  PERMS
 
*****/
 
.perm-gravatar-ac {
 
  vertical-align: middle;
 
  padding: 2px;
 
  width: 14px;
 
  height: 14px;
 
}
 

	
 
/* avoid gaps between the navbar and browser */
 
.navbar.mainmenu {
 
  border-top-left-radius: 0;
 
  border-top-right-radius: 0;
 
}
 
.navbar.footer {
 
  border-bottom-left-radius: 0;
 
  border-bottom-right-radius: 0;
 
}
 

	
 
/* show some context of link targets - but only works when the link target
 
   can be extended with any visual difference */
 
div.comment:target:before {
 
  display: block;
 
  height: 100px;
 
  margin: -100px 0 0;
 
  content: "";
 
}
 
div.comment:target > .panel {
 
  border: solid 2px #ee0 !important;
 
}
 
.lineno:target a {
 
  border: solid 2px #ee0 !important;
 
  margin: -2px;
 
}
 
.btn-image-diff-show,
 
.btn-image-diff-swap {
 
  margin: 5px;
 
}
 
.img-diff {
 
  max-width: 45%;
 
  height: auto;
 
  margin: 5px;
 
  /* http://lea.verou.me/demos/css3-patterns.html */
 
  background-image: linear-gradient(45deg, #888 25%, transparent 25%, transparent), linear-gradient(-45deg, #888 25%, transparent 25%, transparent), linear-gradient(45deg, transparent 75%, #888 75%), linear-gradient(-45deg, transparent 75%, #888 75%);
 
  background-size: 10px 10px;
 
  background-color: #999;
 
}
 
.img-preview {
 
  max-width: 100%;
 
  height: auto;
 
  margin: 5px;
 
}
 
div.comment-prev-next-links div.prev-comment,
 
div.comment-prev-next-links div.next-comment {
 
  display: inline-block;
 
  min-width: 150px;
 
  margin: 3px 6px;
 
}
 
#comments-general-comments div.comment-prev-next-links div.prev-comment,
 
#comments-general-comments div.comment-prev-next-links div.next-comment {
 
  margin-left: 0;
 
}
 
body table.dataTable thead .sorting {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_desc {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc_disabled {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_desc_disabled {
 
  background-image: none;
 
}
 
body table.dataTable thead .sorting_asc::after {
 
  font-family: "kallithea";
 
  content: "\23f6";
 
}
 
body table.dataTable thead .sorting_desc::after {
 
  font-family: "kallithea";
 
  content: "\23f7";
 
}
 
.dataTables_wrapper .dataTables_left {
 
  float: left !important;
 
}
 
.dataTables_wrapper .dataTables_right {
 
  float: right;
 
}
 
.dataTables_wrapper .dataTables_right > div {
 
  padding-left: 30px;
 
}
 
.dataTables_wrapper .dataTables_info {
 
  clear: none;
 
  padding-top: 3px;
 
}
 
.dataTables_wrapper .dataTables_paginate {
 
  padding-top: 0;
 
}
 
.dataTables_wrapper .dataTables_paginate .paginate_button {
 
  padding: 3px 10px;
 
}
 
.dataTables_wrapper .dataTables_paginate > a.paginate_button {
 
  padding-top: 1px;
 
  border: 0 !important;
 
}
 
.dataTables_wrapper label {
 
  margin-bottom: 0;
 
  font-weight: inherit;
 
}
 
#content div.panel .changelog-panel > .changelog-heading,
 
#content div.panel .changelog-panel > ul.pagination {
 
  margin-left: 100px;
 
}
 

	
 
/* undo Bootstrap chrome/webkit blue outline on focus in navbar */
 
.navbar-inverse .navbar-nav > li > a:focus {
 
  outline: 0;
 
}
 

	
 
/* use same badge coloring in navbar inverse as in panel-heading */
 
.navbar-inverse {
 
  .badge {
 
    color: @navbar-inverse-bg;
 
    background-color: @navbar-inverse-color;
 
  }
 
}
 

	
 
/* make all datatable paginations small */
 
.dataTables_paginate .pagination {
 
  .pagination-sm;
 
}
 

	
 
/* pygments style */
 
div.search-code-body pre .match {
 
  background-color: #FAFFA6;
 
}
 
div.search-code-body pre .break {
 
  background-color: #DDE7EF;
 
  width: 100%;
 
  color: #747474;
 
  display: block;
 
}
 
div.annotatediv {
 
  margin-left: 2px;
 
  margin-right: 4px;
 
}
 
.code-highlight {
 
  border-left: 1px solid #ccc;
 
}
 
.code-highlight pre,
 
.linenodiv pre {
 
  padding: 5px 2px 0px 5px;
 
  margin: 0;
 
}
 
.code-highlight pre div:target {
 
  background-color: #FFFFBE !important;
 
}
 
.linenos a { text-decoration: none; }
 

	
 
/* Stylesheets for the context bar */
 
#quick_login > .pull-right .list-group-item {
 
  background-color: #577632;
 
  border: 0;
 
}
 
#content #context-pages .follow .show-following,
 
#content #context-pages .following .show-follow {
 
  display: none;
 
}
 

	
 
nav.navbar #quick > li > a,
 
#context-pages > ul > li > a {
 
  height: @navbar-height;
 
}
kallithea/templates/base/base.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="root.html"/>
 

	
 
<!-- CONTENT -->
 
<div id="content" class="container-fluid">
 
    ${self.flash_msg()}
 
    <div id="main">
 
        ${next.main()}
 
    </div>
 
</div>
 
<!-- END CONTENT -->
 

	
 
<!-- FOOTER -->
 
<div id="footer" class="footer navbar navbar-inverse">
 
<div class="footer navbar navbar-inverse">
 
    <span class="navbar-text pull-left">
 
        ${_('Server instance: %s') % c.instance_id if c.instance_id else ''}
 
    </span>
 
    <span class="navbar-text pull-right">
 
        This site is powered by
 
        %if c.visual.show_version:
 
            <a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a> ${c.kallithea_version},
 
        %else:
 
            <a class="navbar-link" href="${h.url('kallithea_project_url')}" target="_blank">Kallithea</a>,
 
        %endif
 
        which is
 
        <a class="navbar-link" href="${h.canonical_url('about')}#copyright">&copy; 2010&ndash;2017 by various authors &amp; licensed under GPLv3</a>.
 
        %if c.issues_url:
 
            &ndash; <a class="navbar-link" href="${c.issues_url}" target="_blank">${_('Support')}</a>
 
        %endif
 
    </span>
 
</div>
 

	
 
<!-- END FOOTER -->
 

	
 
### MAKO DEFS ###
 

	
 
<%block name="branding_title">
 
    %if c.site_name:
 
    &middot; ${c.site_name}
 
    %endif
 
</%block>
 

	
 
<%def name="flash_msg()">
 
    <%include file="/base/flash_msg.html"/>
 
</%def>
 

	
 
<%def name="breadcrumbs()">
 
    <div class="breadcrumbs panel-title">
 
    ${self.breadcrumbs_links()}
 
    </div>
 
</%def>
 

	
 
<%def name="admin_menu()">
 
  <ul class="dropdown-menu" role="menu">
 
      <li><a href="${h.url('admin_home')}"><i class="icon-book"></i> ${_('Admin Journal')}</a></li>
 
      <li><a href="${h.url('repos')}"><i class="icon-database"></i> ${_('Repositories')}</a></li>
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder"></i> ${_('Repository Groups')}</a></li>
 
      <li><a href="${h.url('users')}"><i class="icon-user"></i> ${_('Users')}</a></li>
 
      <li><a href="${h.url('users_groups')}"><i class="icon-users"></i> ${_('User Groups')}</a></li>
 
      <li><a href="${h.url('admin_permissions')}"><i class="icon-block"></i> ${_('Default Permissions')}</a></li>
 
      <li><a href="${h.url('auth_home')}"><i class="icon-key"></i> ${_('Authentication')}</a></li>
 
      <li><a href="${h.url('defaults')}"><i class="icon-wrench"></i> ${_('Repository Defaults')}</a></li>
 
      <li class="last"><a href="${h.url('admin_settings')}"><i class="icon-gear"></i> ${_('Settings')}</a></li>
 
  </ul>
 

	
 
</%def>
 

	
 

	
 
## admin menu used for people that have some admin resources
 
<%def name="admin_menu_simple(repositories=None, repository_groups=None, user_groups=None)">
 
  <ul class="dropdown-menu" role="menu">
 
   %if repositories:
 
      <li><a href="${h.url('repos')}"><i class="icon-database"></i> ${_('Repositories')}</a></li>
 
   %endif
 
   %if repository_groups:
 
      <li><a href="${h.url('repos_groups')}"><i class="icon-folder"></i> ${_('Repository Groups')}</a></li>
 
   %endif
 
   %if user_groups:
 
      <li><a href="${h.url('users_groups')}"><i class="icon-users"></i> ${_('User Groups')}</a></li>
 
   %endif
 
  </ul>
 
</%def>
 

	
 
<%def name="repotag(repo)">
 
  %if h.is_hg(repo):
 
    <span class="repotag" title="${_('Mercurial repository')}">hg</span>
 
  %endif
 
  %if h.is_git(repo):
 
    <span class="repotag" title="${_('Git repository')}">git</span>
 
  %endif
 
</%def>
 

	
 
<%def name="repo_context_bar(current=None, rev=None)">
 
  <% rev = None if rev == 'tip' else rev %>
 
  <!--- CONTEXT BAR -->
 
  <nav id="context-bar" class="navbar navbar-inverse">
 
    <div class="container-fluid">
 
    <div class="navbar-header">
 
      <div class="navbar-brand">
 
        ${repotag(c.db_repo)}
 

	
 
        ## public/private
 
        %if c.db_repo.private:
 
          <i class="icon-keyhole-circled"></i>
 
        %else:
 
          <i class="icon-globe"></i>
 
        %endif
 
        %for group in c.db_repo.groups_with_parents:
 
          ${h.link_to(group.name, url('repos_group_home', group_name=group.group_name), class_='navbar-link')}
 
          &raquo;
 
        %endfor
 
        ${h.link_to(c.db_repo.just_name, url('summary_home', repo_name=c.db_repo.repo_name), class_='navbar-link')}
 

	
 
        %if current == 'createfork':
 
         - ${_('Create Fork')}
 
        %endif
 
      </div>
 
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#context-pages" aria-expanded="false">
 
        <span class="sr-only">Toggle navigation</span>
 
        <span class="icon-bar"></span>
 
        <span class="icon-bar"></span>
 
        <span class="icon-bar"></span>
 
      </button>
 
    </div>
 
    <div id="context-pages" class="navbar-collapse collapse">
 
    <ul class="nav navbar-nav navbar-right">
 
        <li class="${'active' if current == 'summary' else ''}" data-context="summary"><a href="${h.url('summary_home', repo_name=c.repo_name)}"><i class="icon-doc-text"></i> ${_('Summary')}</a></li>
 
        %if rev:
 
        <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_file_home', repo_name=c.repo_name, revision=rev, f_path='')}"><i class="icon-clock"></i> ${_('Changelog')}</a></li>
 
        %else:
 
        <li class="${'active' if current == 'changelog' else ''}" data-context="changelog"><a href="${h.url('changelog_home', repo_name=c.repo_name)}"><i class="icon-clock"></i> ${_('Changelog')}</a></li>
 
        %endif
 
        <li class="${'active' if current == 'files' else ''}" data-context="files"><a href="${h.url('files_home', repo_name=c.repo_name, revision=rev or 'tip')}"><i class="icon-doc-inv"></i> ${_('Files')}</a></li>
 
        <li class="${'active' if current == 'switch-to' else ''}" data-context="switch-to">
 
          <input id="branch_switcher" name="branch_switcher" type="hidden">
 
        </li>
 
        <li class="${'active' if current == 'options' else ''} dropdown" data-context="options">
 
             %if h.HasRepoPermissionLevel('admin')(c.repo_name):
 
               <a href="${h.url('edit_repo',repo_name=c.repo_name)}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i> ${_('Options')} <i class="caret"></i></a>
 
             %else:
 
               <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true"><i class="icon-wrench"></i> ${_('Options')} <i class="caret"></i></a>
 
             %endif
 
          <ul class="dropdown-menu" role="menu" aria-hidden="true">
 
             %if h.HasRepoPermissionLevel('admin')(c.repo_name):
 
                   <li><a href="${h.url('edit_repo',repo_name=c.repo_name)}"><i class="icon-gear"></i> ${_('Settings')}</a></li>
 
             %endif
 
              %if c.db_repo.fork:
 
               <li><a href="${h.url('compare_url',repo_name=c.db_repo.fork.repo_name,org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1], other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.db_repo.landing_rev[0],other_ref_name=request.GET.get('branch') or c.db_repo.landing_rev[1], merge=1)}">
 
                   <i class="icon-git-compare"></i> ${_('Compare Fork')}</a></li>
 
              %endif
 
              <li><a href="${h.url('compare_home',repo_name=c.repo_name)}"><i class="icon-git-compare"></i> ${_('Compare')}</a></li>
 

	
 
              <li><a href="${h.url('search_repo',repo_name=c.repo_name)}"><i class="icon-search"></i> ${_('Search')}</a></li>
 

	
 
              %if h.HasRepoPermissionLevel('write')(c.repo_name) and c.db_repo.enable_locking:
 
                %if c.db_repo.locked[0]:
 
                  <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock"></i> ${_('Unlock')}</a></li>
 
                %else:
 
                  <li><a href="${h.url('toggle_locking', repo_name=c.repo_name)}"><i class="icon-lock-open-alt"></i> ${_('Lock')}</a></li>
 
                %endif
 
              %endif
 
              ## TODO: this check feels wrong, it would be better to have a check for permissions
 
              ## also it feels like a job for the controller
 
              %if request.authuser.username != 'default':
 
                  <li>
 
                   <a href="#" class="${'following' if c.repository_following else 'follow'}" onclick="toggleFollowingRepo(this, ${c.db_repo.repo_id});">
 
                    <span class="show-follow"><i class="icon-heart-empty"></i> ${_('Follow')}</span>
 
                    <span class="show-following"><i class="icon-heart"></i> ${_('Unfollow')}</span>
 
                   </a>
 
                  </li>
 
                  <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i> ${_('Fork')}</a></li>
 
                  <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-git-pull-request"></i> ${_('Create Pull Request')}</a></li>
 
              %endif
 
             </ul>
 
        </li>
 
        <li class="${'active' if current == 'showpullrequest' else ''}" data-context="showpullrequest">
 
          <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}"> <i class="icon-git-pull-request"></i> ${_('Pull Requests')}
 
            %if c.repository_pull_requests:
 
              <span class="badge">${c.repository_pull_requests}</span>
 
            %endif
 
          </a>
 
        </li>
 
    </ul>
 
    </div>
 
    </div>
 
  </nav>
 
  <script type="text/javascript">
 
    $(document).ready(function() {
 
      var bcache = {};
 

	
 
      $("#branch_switcher").select2({
 
          placeholder: '<i class="icon-exchange"></i> ' + ${h.jshtml(_('Switch To'))} + ' <span class="caret"></span>',
 
          dropdownAutoWidth: true,
 
          sortResults: prefixFirstSort,
 
          formatResult: function(obj) {
 
              return obj.text;
 
          },
 
          formatSelection: function(obj) {
 
              return obj.text;
 
          },
 
          formatNoMatches: function(term) {
 
              return ${h.jshtml(_('No matches found'))};
 
          },
 
          escapeMarkup: function(m) {
 
              // don't escape our custom placeholder
 
              if (m.substr(0, 25) == '<i class="icon-exchange">') {
 
                  return m;
 
              }
 

	
 
              return Select2.util.escapeMarkup(m);
 
          },
 
          containerCssClass: "branch-switcher",
 
          dropdownCssClass: "repo-switcher-dropdown",
 
          query: function(query) {
 
              var key = 'cache';
 
              var cached = bcache[key];
 
              if (cached) {
 
                  var data = {
 
                      results: []
 
                  };
 
                  // filter results
 
                  $.each(cached.results, function() {
 
                      var section = this.text;
 
                      var children = [];
 
                      $.each(this.children, function() {
 
                          if (query.term.length === 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0) {
 
                              children.push({
 
                                  'id': this.id,
 
                                  'text': this.text,
 
                                  'type': this.type,
 
                                  'obj': this.obj
 
                              });
 
                          }
 
                      });
 
                      if (children.length !== 0) {
 
                          data.results.push({
 
                              'text': section,
 
                              'children': children
 
                          });
 
                      }
 

	
 
                  });
 
                  query.callback(data);
 
              } else {
 
                  $.ajax({
 
                      url: pyroutes.url('repo_refs_data', {
 
                          'repo_name': ${h.js(c.repo_name)}
 
                      }),
 
                      data: {},
 
                      dataType: 'json',
 
                      type: 'GET',
 
                      success: function(data) {
 
                          bcache[key] = data;
 
                          query.callback(data);
 
                      }
 
                  });
 
              }
 
          }
 
      });
 

	
 
      $("#branch_switcher").on('select2-selecting', function(e) {
 
          e.preventDefault();
 
          var context = $('#context-bar .active').data('context');
 
          if (context == 'files') {
 
              window.location = pyroutes.url('files_home', {
 
                  'repo_name': REPO_NAME,
 
                  'revision': e.choice.id,
 
                  'f_path': '',
 
                  'at': e.choice.text
 
              });
 
          } else if (context == 'changelog') {
 
              if (e.choice.type == 'tag' || e.choice.type == 'book') {
 
                  $("#branch_filter").append($('<'+'option/>').val(e.choice.text));
 
              }
 
              $("#branch_filter").val(e.choice.text).change();
 
          } else {
 
              window.location = pyroutes.url('changelog_home', {
 
                  'repo_name': ${h.js(c.repo_name)},
 
                  'branch': e.choice.text
 
              });
 
          }
 
      });
 
    });
 
  </script>
 
  <!--- END CONTEXT BAR -->
 
</%def>
 

	
 
<%def name="menu(current=None)">
 
  <ul id="quick" class="nav navbar-nav navbar-right">
 
    <!-- repo switcher -->
 
    <li class="${'active' if current == 'repositories' else ''}">
 
      <input id="repo_switcher" name="repo_switcher" type="hidden">
 
    </li>
 

	
 
    ##ROOT MENU
 
    %if request.authuser.username != 'default':
 
      <li class="${'active' if current == 'journal' else ''}">
 
        <a class="menu_link" title="${_('Show recent activity')}"  href="${h.url('journal')}">
 
          <i class="icon-book"></i> ${_('Journal')}
 
        </a>
 
      </li>
 
    %else:
 
      <li class="${'active' if current == 'journal' else ''}">
 
        <a class="menu_link" title="${_('Public journal')}"  href="${h.url('public_journal')}">
 
          <i class="icon-book"></i> ${_('Public journal')}
 
        </a>
 
      </li>
 
    %endif
 
      <li class="${'active' if current == 'gists' else ''} dropdown">
 
        <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Show public gists')}"  href="${h.url('gists')}">
 
          <i class="icon-clippy"></i> ${_('Gists')} <span class="caret"></span>
 
        </a>
 
          <ul class="dropdown-menu" role="menu">
 
            <li><a href="${h.url('new_gist', public=1)}"><i class="icon-paste"></i> ${_('Create New Gist')}</a></li>
 
            <li><a href="${h.url('gists')}"><i class="icon-globe"></i> ${_('All Public Gists')}</a></li>
 
            %if request.authuser.username != 'default':
 
              <li><a href="${h.url('gists', public=1)}"><i class="icon-user"></i> ${_('My Public Gists')}</a></li>
 
              <li><a href="${h.url('gists', private=1)}"><i class="icon-keyhole-circled"></i> ${_('My Private Gists')}</a></li>
 
            %endif
 
          </ul>
 
      </li>
 
    <li class="${'active' if current == 'search' else ''}">
 
        <a class="menu_link" title="${_('Search in repositories')}"  href="${h.url('search')}">
 
          <i class="icon-search"></i> ${_('Search')}
 
        </a>
 
    </li>
 
    % if h.HasPermissionAny('hg.admin')('access admin main page'):
 
      <li class="${'active' if current == 'admin' else ''} dropdown">
 
        <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Admin')}" href="${h.url('admin_home')}">
 
          <i class="icon-gear"></i> ${_('Admin')} <span class="caret"></span>
 
        </a>
 
        ${admin_menu()}
 
      </li>
 
    % elif request.authuser.repositories_admin or request.authuser.repository_groups_admin or request.authuser.user_groups_admin:
 
    <li class="${'active' if current == 'admin' else ''} dropdown">
 
        <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" title="${_('Admin')}" href="">
 
          <i class="icon-gear"></i> ${_('Admin')}
 
        </a>
 
        ${admin_menu_simple(request.authuser.repositories_admin,
 
                            request.authuser.repository_groups_admin,
 
                            request.authuser.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')())}
 
    </li>
 
    % endif
 

	
 
    <li class="${'active' if current == 'my_pullrequests' else ''}">
 
      <a class="menu_link" title="${_('My Pull Requests')}" href="${h.url('my_pullrequests')}">
 
        <i class="icon-git-pull-request"></i> ${_('My Pull Requests')}
 
        %if c.my_pr_count != 0:
 
          <span class="badge">${c.my_pr_count}</span>
 
        %endif
 
      </a>
 
    </li>
 

	
 
    ## USER MENU
 
    <li class="dropdown">
 
      <a class="menu_link dropdown-toggle" data-toggle="dropdown" role="button" id="quick_login_link"
 
        aria-expanded="false" aria-controls="quick_login"
 
        %if request.authuser.username != 'default':
 
          href="${h.url('notifications')}"
 
        %else:
 
          href="#"
 
        %endif
 
      >
 
          ${h.gravatar_div(request.authuser.email, size=20, div_class="icon")}
 
          %if request.authuser.username != 'default':
 
            <span class="menu_link_user">${request.authuser.username}</span>
 
            %if c.unread_notifications != 0:
 
              <span class="badge">${c.unread_notifications}</span>
 
            %endif
 
          %else:
 
              <span>${_('Not Logged In')}</span>
 
          %endif
 
          <i class="caret"></i>
 
      </a>
 

	
 
      <div class="dropdown-menu user-menu" role="menu">
 
        <div id="quick_login" role="form" aria-describedby="quick_login_h" aria-hidden="true" class="container-fluid">
 
          %if request.authuser.username == 'default' or request.authuser.user_id is None:
 
            ${h.form(h.url('login_home', came_from=request.path_qs), class_='form clearfix')}
 
                <h4 id="quick_login_h">${_('Login to Your Account')}</h4>
 
                <label>
 
                    ${_('Username')}:
 
                    ${h.text('username',class_='form-control')}
 
                </label>
 
                <label>
 
                    ${_('Password')}:
 
                    ${h.password('password',class_='form-control')}
 
                </label>
 
                <div class="password_forgotten">
 
                    ${h.link_to(_('Forgot password?'),h.url('reset_password'))}
 
                </div>
 
                <div class="register">
 
                    %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
 
                        ${h.link_to(_("Don't have an account?"),h.url('register'))}
 
                    %endif
 
                </div>
 
                <div class="submit">
 
                    ${h.submit('sign_in',_('Log In'),class_="btn btn-default btn-xs")}
 
                </div>
 
            ${h.end_form()}
 
          %else:
 
            <div class="pull-left">
 
                ${h.gravatar_div(request.authuser.email, size=48, div_class="big_gravatar")}
 
                <b class="full_name">${request.authuser.full_name_or_username}</b>
 
                <div class="email">${request.authuser.email}</div>
 
            </div>
 
            <div id="quick_login_h" class="pull-right list-group text-right">
 
              <a class="list-group-item" href="${h.url('notifications')}">${_('Notifications')}: ${c.unread_notifications}</a>
 
              ${h.link_to(_('My Account'),h.url('my_account'),class_='list-group-item')}
 
              %if not request.authuser.is_external_auth:
 
                ## Cannot log out if using external (container) authentication.
 
                ${h.link_to(_('Log Out'), h.url('logout_home'),class_='list-group-item')}
 
              %endif
 
            </div>
 
          %endif
 
        </div>
 
      </div>
 
    </li>
 
  </ul>
 

	
 
    <script type="text/javascript">
 
        $(document).ready(function(){
 
            var visual_show_public_icon = ${h.js(c.visual.show_public_icon)};
 
            var cache = {}
 
            /*format the look of items in the list*/
 
            var format = function(state){
 
                if (!state.id){
 
                  return state.text; // optgroup
 
                }
 
                var obj_dict = state.obj;
 
                var tmpl = '';
 

	
 
                if(obj_dict && state.type == 'repo'){
 
                    tmpl += '<span class="repo-icons">';
 
                    if(obj_dict['repo_type'] === 'hg'){
 
                        tmpl += '<span class="repotag" title="${_('Mercurial repository')}">hg</span> ';
 
                    }
 
                    else if(obj_dict['repo_type'] === 'git'){
 
                        tmpl += '<span class="repotag" title="${_('Git repository')}">git</span> ';
 
                    }
 
                    if(obj_dict['private']){
 
                        tmpl += '<i class="icon-keyhole-circled"></i> ';
 
                    }
 
                    else if(visual_show_public_icon){
 
                        tmpl += '<i class="icon-globe"></i> ';
 
                    }
 
                    tmpl += '</span>';
 
                }
 
                if(obj_dict && state.type == 'group'){
 
                        tmpl += '<i class="icon-folder"></i> ';
 
                }
 
                tmpl += state.text;
 
                return tmpl;
 
            }
 

	
 
            $("#repo_switcher").select2({
 
                placeholder: '<i class="icon-database"></i> ' + ${h.jshtml(_('Repositories'))} + ' <span class="caret"></span>',
 
                dropdownAutoWidth: true,
 
                sortResults: prefixFirstSort,
 
                formatResult: format,
 
                formatSelection: format,
 
                formatNoMatches: function(term){
 
                    return ${h.jshtml(_('No matches found'))};
 
                },
 
                containerCssClass: "repo-switcher",
 
                dropdownCssClass: "repo-switcher-dropdown",
 
                escapeMarkup: function(m){
 
                    // don't escape our custom placeholder
 
                    if(m.substr(0,29) == '<i class="icon-database"></i>'){
 
                        return m;
 
                    }
 

	
 
                    return Select2.util.escapeMarkup(m);
 
                },
 
                query: function(query){
 
                  var key = 'cache';
 
                  var cached = cache[key] ;
 
                  if(cached) {
 
                    var data = {results: []};
 
                    //filter results
 
                    $.each(cached.results, function(){
 
                        var section = this.text;
 
                        var children = [];
 
                        $.each(this.children, function(){
 
                            if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
 
                                children.push({'id': this.id, 'text': this.text, 'type': this.type, 'obj': this.obj});
 
                            }
 
                        });
 
                        if(children.length !== 0){
 
                            data.results.push({'text': section, 'children': children});
 
                        }
 

	
 
                    });
 
                    query.callback(data);
 
                  }else{
 
                      $.ajax({
 
                        url: ${h.js(h.url('repo_switcher_data'))},
 
                        data: {},
 
                        dataType: 'json',
 
                        type: 'GET',
 
                        success: function(data) {
 
                          cache[key] = data;
 
                          query.callback({results: data.results});
 
                        }
 
                      });
 
                  }
 
                }
 
            });
 

	
 
            $("#repo_switcher").on('select2-selecting', function(e){
 
                e.preventDefault();
 
                window.location = pyroutes.url('summary_home', {'repo_name': e.val});
 
            });
 

	
 
            $(document).on('shown.bs.dropdown', function(event) {
 
                var dropdown = $(event.target);
 

	
 
                dropdown.attr('aria-expanded', true);
 
                dropdown.find('.dropdown-menu').attr('aria-hidden', false);
 
            });
 

	
 
            $(document).on('hidden.bs.dropdown', function(event) {
 
                var dropdown = $(event.target);
 

	
 
                dropdown.attr('aria-expanded', false);
 
                dropdown.find('.dropdown-menu').attr('aria-hidden', true);
 
            });
 
        });
 
    </script>
 
</%def>
 

	
 
<%def name="parent_child_navigation()">
 
    <div class="pull-left">
 
        <div class="parent-child-link"
 
             data-ajax-url="${h.url('changeset_parents',repo_name=c.repo_name, revision=c.changeset.raw_id)}"
 
             data-linktype="parent"
 
             data-reponame="${c.repo_name}">
 
            <i class="icon-left-open"></i> <a href="#">${_('Parent rev.')}</a>
 
        </div>
 
    </div>
 

	
 
    <div class="pull-right">
 
        <div class="parent-child-link"
 
             data-ajax-url="${h.url('changeset_children',repo_name=c.repo_name, revision=c.changeset.raw_id)}"
 
             data-linktype="child"
 
             data-reponame="${c.repo_name}">
 
            <a href="#">${_('Child rev.')}</a> <i class="icon-right-open"></i>
 
        </div>
 
    </div>
 

	
 
    <script type="text/javascript">
 
      $(document).ready(function(){
 
          activate_parent_child_links();
 
      });
 
    </script>
 
</%def>
0 comments (0 inline, 0 general)