Changeset - ee3fb2dfbcc0
[Not reviewed]
default
0 52 0
domruf - 9 years ago 2016-09-18 20:00:46
dominikruf@gmail.com
style: in preparation for bootstrap, replace kallithea title class with bootstrap compatible panel-heading

This is a subset of a bigger changeset. The subset was extracted by Mads Kiilerich, mostly by:

sed -i 's,<div class="title\>,<div class="panel-heading,g' `hg mani`
sed -i 's,\<div\.title\>,div.panel-heading,g' kallithea/public/css/style.css
52 files changed with 69 insertions and 69 deletions:
0 comments (0 inline, 0 general)
kallithea/public/css/style.css
Show inline comments
 
@@ -439,242 +439,242 @@ div.header img {
 
#header #header-inner #quick li .icon {
 
    border-left: none;
 
    padding-left: 10px;
 
}
 

	
 
#header #header-inner #quick li .icon_short {
 
    top: 0;
 
    left: 0;
 
    border-left: none;
 
    border-right: 1px solid #2e5c89;
 
    padding: 8px 6px 4px;
 
}
 

	
 
#header #header-inner #quick li .icon img,
 
#header #header-inner #quick li .icon_short img {
 
    vertical-align: middle;
 
    margin-bottom: 2px;
 
}
 

	
 
#header #header-inner #quick ul.repo_switcher {
 
    max-height: 275px;
 
    overflow-x: hidden;
 
    overflow-y: auto;
 
}
 

	
 
#header #header-inner #quick ul.repo_switcher li.qfilter_rs {
 
    padding: 2px 3px;
 
    padding-right: 17px;
 
}
 

	
 
#header #header-inner #quick ul.repo_switcher li.qfilter_rs input {
 
    width: 100%;
 
    border-radius: 10px;
 
    padding: 2px 7px;
 
}
 

	
 
#header #header-inner #quick .repo_switcher_type {
 
    position: absolute;
 
    left: 0;
 
    top: 9px;
 
    margin: 0px 2px 0px 2px;
 
}
 

	
 
.groups_breadcrumbs a {
 
    color: #fff;
 
}
 

	
 
.groups_breadcrumbs a:hover {
 
    color: #bfe3ff;
 
    text-decoration: none;
 
}
 

	
 
.dt_repo {
 
    white-space: nowrap;
 
    color: #577632;
 
}
 

	
 
.dt_repo_pending {
 
    opacity: 0.5;
 
}
 

	
 
.dt_repo i.icon-keyhole-circled,
 
.dt_repo i.icon-globe
 
{
 
    font-size: 16px;
 
    vertical-align: -2px;
 
    margin: 0px 1px 0px 3px;
 
}
 

	
 
.dt_repo a {
 
    text-decoration: none;
 
}
 

	
 
.dt_repo .dt_repo_name:hover {
 
    text-decoration: underline;
 
}
 

	
 
#content #left {
 
    left: 0;
 
    width: 280px;
 
    position: absolute;
 
}
 

	
 
#content #right {
 
    margin: 0 60px 10px 290px;
 
}
 

	
 
#content div.panel {
 
    clear: both;
 
    background: #fff;
 
    margin: 0 0 10px;
 
    padding: 0 0 10px;
 
    border-radius: 4px 4px 4px 4px;
 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
}
 

	
 
#content div.panel div.title {
 
#content div.panel div.panel-heading {
 
    clear: both;
 
    overflow: hidden;
 
    background-color: #577632;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #577632, #577632);
 
    margin: 0 0 20px;
 
    padding: 0;
 
    border-radius: 4px 4px 0 0;
 
}
 

	
 
#content div.panel div.title h5 {
 
#content div.panel div.panel-heading h5 {
 
    float: left;
 
    border: none;
 
    color: #fff;
 
    margin: 0;
 
    padding: 11px 0 11px 10px;
 
}
 

	
 
#content div.panel div.title .link-white {
 
#content div.panel div.panel-heading .link-white {
 
    color: #FFFFFF;
 
}
 

	
 
#content div.panel div.title .link-white.current {
 
#content div.panel div.panel-heading .link-white.current {
 
    color: #BFE3FF;
 
}
 

	
 
#content div.panel div.title ul.links li {
 
#content div.panel div.panel-heading ul.links li {
 
    list-style: none;
 
    float: left;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.title ul.links li a {
 
#content div.panel div.panel-heading ul.links li a {
 
    font-size: 13px;
 
    font-weight: 700;
 
    height: 1%;
 
    margin: 4px;
 
    text-decoration: none;
 
}
 

	
 
#content div.panel div.title ul.links.nav-tabs li a {
 
#content div.panel div.panel-heading ul.links.nav-tabs li a {
 
    float: left;
 
    color: #fff;
 
    margin: 0;
 
    padding: 11px 10px 11px 10px;
 
}
 

	
 
#content div.panel div.title ul.links.icon-only-links li a {
 
#content div.panel div.panel-heading ul.links.icon-only-links li a {
 
    float: left;
 
    color: #fff;
 
    margin: 0;
 
    padding: 11px 10px 11px 10px;
 
}
 

	
 
#content div.panel h1,
 
#content div.panel h2,
 
#content div.panel h3,
 
#content div.panel h4,
 
#content div.panel h5,
 
#content div.panel h6,
 
#content div.panel div.h1,
 
#content div.panel div.h2,
 
#content div.panel div.h3,
 
#content div.panel div.h4,
 
#content div.panel div.h5,
 
#content div.panel div.h6 {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 8px 20px 3px;
 
    padding-bottom: 2px;
 
}
 

	
 
#content div.panel div.normal-indent {
 
    margin: 0 20px 10px 20px;
 
}
 

	
 
#content div.panel p {
 
    color: #5f5f5f;
 
    font-size: 12px;
 
    line-height: 150%;
 
    margin: 0 24px 10px;
 
    padding: 0;
 
}
 

	
 
#content div.panel blockquote {
 
    border-left: 4px solid #DDD;
 
    color: #5f5f5f;
 
    font-size: 11px;
 
    line-height: 150%;
 
    margin: 0 34px;
 
    padding: 0 0 0 14px;
 
}
 

	
 
#content div.panel blockquote p {
 
    margin: 10px 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel dl {
 
    margin: 10px 0px;
 
}
 

	
 
#content div.panel dt {
 
    font-size: 12px;
 
    margin: 0;
 
}
 

	
 
#content div.panel dd {
 
    font-size: 12px;
 
    margin: 0;
 
    padding: 8px 0 8px 15px;
 
}
 

	
 
#content div.panel li {
 
    font-size: 12px;
 
    padding: 4px 0;
 
}
 

	
 
#content div.panel ul.disc,
 
#content div.panel ul.circle {
 
    margin: 10px 24px 10px 38px;
 
}
 

	
 
#content div.panel ul.square {
 
    margin: 10px 24px 10px 40px;
 
}
 

	
 
#content div.panel img.left {
 
    border: none;
 
    float: left;
 
    margin: 10px 10px 10px 0;
 
}
 

	
 
#content div.panel img.right {
 
    border: none;
 
    float: right;
 
    margin: 10px 0 10px 10px;
 
}
 

	
 
#content div.panel div.messages {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0 20px;
 
    padding: 0;
 
@@ -1347,193 +1347,193 @@ div.form div.fields div.field div.button
 
}
 

	
 
.metatag {
 
    display: inline-block;
 
    margin-right: 1px;
 
    border-radius: 4px 4px 4px 4px;
 

	
 
    border: solid 1px #9CF;
 
    padding: 2px 3px 2px 3px !important;
 
    background-color: #DEF;
 
}
 

	
 
.metatag[tag="dead"] {
 
    background-color: #E44;
 
}
 

	
 
.metatag[tag="stale"] {
 
    background-color: #EA4;
 
}
 

	
 
.metatag[tag="featured"] {
 
    background-color: #AEA;
 
}
 

	
 
.metatag[tag="requires"] {
 
    background-color: #9CF;
 
}
 

	
 
.metatag[tag="recommends"] {
 
    background-color: #BDF;
 
}
 

	
 
.metatag[tag="lang"] {
 
    background-color: #FAF474;
 
}
 

	
 
.metatag[tag="license"] {
 
    border: solid 1px #9CF;
 
    background-color: #DEF;
 
}
 
.metatag[tag="see"] {
 
    border: solid 1px #CBD;
 
    background-color: #EDF;
 
}
 

	
 
a.metatag[tag="license"]:hover {
 
    background-color: #577632;
 
    color: #FFF;
 
    text-decoration: none;
 
}
 

	
 
#summary .desc {
 
    white-space: pre;
 
    width: 100%;
 
}
 

	
 
#summary .repo_name {
 
    font-size: 1.6em;
 
    font-weight: bold;
 
    vertical-align: baseline;
 
    clear: right
 
}
 

	
 
#footer {
 
    clear: both;
 
    overflow: hidden;
 
    text-align: right;
 
    margin: 0;
 
    padding: 0 10px 4px;
 
    margin: -10px 0 0;
 
}
 

	
 
#footer div#footer-inner {
 
    background-color: #577632;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #577632, #577632);
 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 
    border-radius: 4px 4px 4px 4px;
 
}
 

	
 
#footer div#footer-inner p {
 
    padding: 15px 25px 15px 0;
 
    color: #FFF;
 
    font-weight: 700;
 
}
 

	
 
#footer div#footer-inner .footer-link {
 
    float: left;
 
    padding-left: 10px;
 
}
 

	
 
#footer div#footer-inner .footer-link a,
 
#footer div#footer-inner .footer-link-right a {
 
    color: #FFF;
 
}
 

	
 
#login div.title {
 
#login div.panel-heading {
 
    clear: both;
 
    overflow: hidden;
 
    position: relative;
 
    background-color: #577632;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #577632, #577632);
 
    margin: 0 auto;
 
    padding: 0;
 
}
 

	
 
#login div.inner .icon-lock {
 
    font-size: 80pt;
 
    color: #DDD;
 
}
 

	
 
#login div.inner {
 
    background: #FFF;
 
    border-top: none;
 
    border-bottom: none;
 
    margin: 0 auto;
 
    padding: 20px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group > label {
 
    width: 173px;
 
    float: left;
 
    text-align: right;
 
    margin: 2px 10px 0 0;
 
    padding: 5px 0 0 5px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div input {
 
    background: #FFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000;
 
    font-size: 11px;
 
    margin: 0;
 
    padding: 7px 7px 6px;
 
}
 

	
 
#login div.form .buttons {
 
    float: right;
 
}
 

	
 
#login div.form div.links {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 10px 0 0;
 
    border-top: 1px solid #DDD;
 
    padding: 10px 0 0;
 
}
 

	
 
.user-menu {
 
    margin: 0px !important;
 
    float: left;
 
}
 

	
 
.user-menu .container {
 
    padding: 0px 4px 0px 4px;
 
    margin: 0px 0px 0px 0px;
 
}
 

	
 
.user-menu .gravatar {
 
    margin: 0px 0px 0px 0px;
 
    cursor: pointer;
 
}
 
.user-menu .gravatar.enabled {
 
    background-color: #FDF784 !important;
 
}
 
.user-menu .gravatar:hover {
 
    background-color: #FDF784 !important;
 
}
 
#quick_login {
 
    min-height: 110px;
 
    padding: 4px;
 
    position: absolute;
 
    right: 0;
 
    background-color: #577632;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #577632, #577632);
 

	
 
    z-index: 999;
 
    border-radius: 0px 0px 4px 4px;
 
    box-shadow: 0 2px 2px rgba(0, 0, 0, 0.6);
 

	
 
    overflow: hidden;
 
}
 
#quick_login h4 {
 
    color: #fff;
 
    padding: 5px 0px 5px 14px;
 
}
 

	
 
#quick_login .password_forgoten {
 
@@ -1583,193 +1583,193 @@ a.metatag[tag="license"]:hover {
 
    font-weight: bold;
 
    padding: 3px 3px 3px 6px;
 
}
 
#quick_login .big_gravatar {
 
    padding: 4px 0px 0px 6px;
 
}
 
#quick_login .notifications {
 
    padding: 2px 0px 0px 6px;
 
    color: #FFFFFF;
 
    font-weight: bold;
 
    line-height: 10px !important;
 
}
 
#quick_login .notifications a,
 
#quick_login .unread a {
 
    color: #FFFFFF;
 
    display: block;
 
    padding: 0px !important;
 
}
 
#quick_login .notifications a:hover,
 
#quick_login .unread a:hover {
 
    background-color: inherit !important;
 
}
 
#quick_login .email,
 
#quick_login .unread {
 
    color: #FFFFFF;
 
    padding: 3px 3px 3px 6px;
 
}
 
#quick_login .links .logout {
 
}
 

	
 
#quick_login div.form div.fields {
 
    padding-top: 2px;
 
    padding-left: 10px;
 
}
 

	
 
#quick_login div.form div.fields div.field {
 
    padding: 5px;
 
}
 

	
 
#quick_login div.form div.fields div.field div.label label {
 
    color: #fff;
 
    padding-bottom: 3px;
 
}
 

	
 
#quick_login div.form div.fields div.field div.input input {
 
    width: 236px;
 
    background: #FFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000;
 
    font-size: 11px;
 
    margin: 0;
 
    padding: 5px 7px 4px;
 
}
 

	
 
#quick_login div.form div.fields div.buttons {
 
    clear: both;
 
    overflow: hidden;
 
    text-align: right;
 
    margin: 0;
 
    padding: 5px 14px 0px 5px;
 
}
 

	
 
#quick_login div.form div.links {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 10px 0 0;
 
    padding: 0 0 2px;
 
}
 

	
 
#quick_login ol.links {
 
    display: block;
 
    font-weight: bold;
 
    list-style: none outside none;
 
    text-align: right;
 
}
 
#quick_login ol.links li {
 
    line-height: 27px;
 
    margin: 0;
 
    padding: 0;
 
    color: #fff;
 
    display: block;
 
    float: none !important;
 
}
 

	
 
#quick_login ol.links li a {
 
    color: #fff;
 
    display: block;
 
    padding: 2px;
 
}
 
#quick_login ol.links li a:HOVER {
 
    background-color: inherit !important;
 
}
 

	
 
#register div.title {
 
#register div.panel-heading {
 
    clear: both;
 
    overflow: hidden;
 
    position: relative;
 
    background-color: #577632;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #577632, #577632);
 
    margin: 0 auto;
 
    padding: 0;
 
}
 

	
 
#register div.inner {
 
    background: #FFF;
 
    border-top: none;
 
    border-bottom: none;
 
    margin: 0 auto;
 
    padding: 20px;
 
}
 

	
 
#register div.form div.fields div.field div.label {
 
    width: 135px;
 
    float: left;
 
    text-align: right;
 
    margin: 2px 10px 0 0;
 
    padding: 5px 0 0 5px;
 
}
 

	
 
#register div.form div.fields div.field div.input input {
 
    width: 300px;
 
    background: #FFF;
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    color: #000;
 
    font-size: 11px;
 
    margin: 0;
 
    padding: 7px 7px 6px;
 
}
 

	
 
#register div.form div.fields div.buttons {
 
    clear: both;
 
    overflow: hidden;
 
    border-top: 1px solid #DDD;
 
    text-align: left;
 
    margin: 0;
 
    padding: 10px 0 0 150px;
 
}
 

	
 
#register div.form div.activation_msg {
 
    padding-top: 4px;
 
    padding-bottom: 4px;
 
}
 

	
 
#journal .journal_day {
 
    font-size: 20px;
 
    padding: 10px 0px;
 
    border-bottom: 2px solid #DDD;
 
    margin-left: 10px;
 
    margin-right: 10px;
 
}
 

	
 
#journal .journal_container {
 
    padding: 5px;
 
    clear: both;
 
    margin: 0px 5px 0px 10px;
 
}
 

	
 
#journal .journal_action_container {
 
    padding-left: 38px;
 
}
 

	
 
#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;
 
@@ -2964,344 +2964,344 @@ table.code-browser i[class^='icon-'] {
 
    background-image: linear-gradient(to bottom, #62c462, #57a957);
 
    border-color: #57a957 #57a957 #3d773d;
 
}
 

	
 
.flash_msg .alert-success a {
 
    text-decoration: underline;
 
    color: #FFF !important;
 
}
 

	
 
.flash_msg .alert-info {
 
    background-color: #339bb9;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
 
    border-color: #339bb9 #339bb9 #22697d;
 
}
 

	
 
.flash_msg .alert-info a {
 
    text-decoration: underline;
 
}
 

	
 
.flash_msg .alert-error,
 
.flash_msg .alert-warning,
 
.flash_msg .alert-success,
 
.flash_msg .alert-info {
 
    font-size: 12px;
 
    font-weight: 700;
 
    min-height: 14px;
 
    line-height: 14px;
 
    margin-bottom: 10px;
 
    margin-top: 0;
 
    display: block;
 
    overflow: auto;
 
    padding: 6px 10px 6px 10px;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
    position: relative;
 
    color: #FFF;
 
    border-width: 1px;
 
    border-style: solid;
 
    border-radius: 4px;
 
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
 
}
 

	
 
div#legend_data {
 
    padding-left: 10px;
 
}
 
div#legend_container table {
 
    border: none !important;
 
}
 
div#legend_container table,
 
div#legend_choices table {
 
    width: auto !important;
 
}
 

	
 
table#permissions_manage {
 
    width: 0 !important;
 
}
 

	
 
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 {
 
    background-color: #FFF;
 
    float: left;
 
    margin-right: 0.7em;
 
    padding: 1px 1px 1px 1px;
 
    line-height: 0;
 
    border-radius: 3px;
 
}
 

	
 
div.gravatar img {
 
    border-radius: 2px;
 
}
 

	
 
#header, #content, #footer {
 
    min-width: 978px;
 
}
 

	
 
#content {
 
    clear: both;
 
    padding: 10px 10px 14px 10px;
 
}
 

	
 
#content.hover {
 
    padding: 55px 10px 14px 10px !important;
 
}
 

	
 
#content div.panel div.title div.search {
 
#content div.panel div.panel-heading div.search {
 
    border-left: 1px solid #576622;
 
}
 

	
 
#content div.panel div.title div.search div.input input {
 
#content div.panel div.panel-heading div.search div.input input {
 
    border: 1px solid #576622;
 
}
 

	
 
.btn {
 
    color: #515151;
 
    background-color: #DADADA;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #F4F4F4, #DADADA);
 

	
 
    border-top: 1px solid #DDD;
 
    border-left: 1px solid #c6c6c6;
 
    border-right: 1px solid #DDD;
 
    border-bottom: 1px solid #c6c6c6;
 
    outline: none;
 
    margin: 0px 3px 3px 0px;
 
    border-radius: 4px 4px 4px 4px !important;
 
    cursor: pointer !important;
 
    padding: 3px 3px 3px 3px;
 
    display: inline-block;
 
}
 

	
 
ul.nav-stacked {
 
    margin: 20px;
 
    color: #393939;
 
    font-weight: 700;
 
}
 

	
 
ul.nav-stacked a {
 
    color: inherit;
 
}
 

	
 
ul.nav-stacked li.active {
 
    list-style-type: disc
 
}
 

	
 
/* make .btn inputs and buttons and divs look the same */
 
button.btn,
 
input.btn {
 
    font-family: inherit;
 
    font-size: inherit;
 
    line-height: inherit;
 
}
 

	
 
.btn::-moz-focus-inner {
 
    border: 0;
 
    padding: 0;
 
}
 

	
 
.btn.badge {
 
    cursor: default !important;
 
}
 

	
 
input[disabled].btn,
 
.btn.disabled {
 
    color: #999;
 
}
 

	
 
.btn.btn-sm {
 
    padding: 2px 6px;
 
}
 

	
 
.btn.btn-xs {
 
    padding: 0px 4px;
 
}
 

	
 
.btn:focus {
 
    outline: none;
 
}
 
.btn:hover {
 
    text-decoration: none;
 
    color: #515151;
 
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 0 3px #FFFFFF !important;
 
}
 
.btn.badge:hover {
 
    box-shadow: none !important;
 
}
 
.btn.disabled:hover {
 
    background-position: 0;
 
    color: #999;
 
    text-decoration: none;
 
    box-shadow: none !important;
 
}
 

	
 
.btn.red {
 
    color: #fff;
 
    background-color: #c43c35;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
 
    border-color: #c43c35 #c43c35 #882a25;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 

	
 
.btn.blue {
 
    color: #fff;
 
    background-color: #339bb9;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
 
    border-color: #339bb9 #339bb9 #22697d;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
.btn.green {
 
    color: #fff;
 
    background-color: #57a957;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #62c462, #57a957);
 
    border-color: #57a957 #57a957 #3d773d;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
.btn.yellow {
 
    color: #fff;
 
    background-color: #faa732;
 
    background-repeat: repeat-x;
 
    background-image: linear-gradient(to bottom, #fbb450, #f89406);
 
    border-color: #f89406 #f89406 #ad6704;
 
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
 
}
 

	
 
label.disabled {
 
    color: #aaa;
 
}
 

	
 
.btn.active {
 
    font-weight: bold;
 
}
 

	
 
ins, div.options a:hover {
 
    text-decoration: none;
 
}
 

	
 
img,
 
#header #header-inner #quick li a:hover span.normal,
 
#content div.panel div.form div.fields div.field div.textarea table td table td a,
 
#clone_url,
 
#clone_url_id
 
{
 
    border: none;
 
}
 

	
 
img.icon, .right .merge img {
 
    vertical-align: bottom;
 
}
 

	
 
#header ul#logged-user,
 
#content div.panel div.title ul.links,
 
#content div.panel div.panel-heading ul.links,
 
#content div.panel div.message div.dismiss,
 
#content div.panel div.traffic div.legend ul {
 
    float: right;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#header #header-inner #home,
 
#header #header-inner #logo,
 
#content div.panel ul.left,
 
#content div.panel ol.left,
 
div#commit_history,
 
div#legend_data, div#legend_container, div#legend_choices {
 
    float: left;
 
}
 

	
 
#header #header-inner #quick li #quick_login,
 
#content #left #menu ul.closed,
 
#content #left #menu li ul.collapsed,
 
.yui-tt-shadow {
 
    display: none;
 
}
 

	
 
.dropdown.open .dropdown-menu,
 
#content #left #menu ul.opened,
 
#content #left #menu li ul.expanded {
 
    display: block !important;
 
}
 

	
 
.caret:after {
 
    font-family: 'kallithea';
 
    content: ' \23f7';           /* triangle-down */
 
}
 

	
 
.repo-switcher .select2-choice {
 
    padding: 0px 8px 1px !important;
 
    display: block;
 
    height: 100%;
 
}
 

	
 
.repo-switcher .select2-container,
 
.repo-switcher .select2-choice,
 
.repo-switcher .select2-choice span {
 
    background: transparent !important;
 
    border: 0 !important;
 
    box-shadow: none !important;
 
    color: #FFFFFF !important;
 
}
 

	
 
.repo-switcher .select2-arrow {
 
    display: none !important;
 
}
 

	
 
.repo-switcher-dropdown.select2-drop.select2-drop-active {
 
    box-shadow: none;
 
    color: #fff;
 
    background-color: #576622;
 
}
 

	
 
.repo-switcher-dropdown.select2-drop.select2-drop-active .select2-results .select2-highlighted {
 
    background-color: #6388ad;
 
}
 

	
 
#content div.graph {
 
    padding: 0 10px 10px;
 
    height: 450px;
 
}
 

	
 
#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,
 
#content div.panel div.table,
 
#content div.panel div.traffic {
 
    position: relative;
 
    clear: both;
 
    margin: 0;
 
    padding: 0 20px 10px;
 
}
 

	
 
#content div.panel div.form div.fields,
 
#login div.form-horizontal,
 
#login div.form-horizontal div.form-group,
 
#register div.form,
 
#register div.form div.fields {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
@@ -3378,194 +3378,194 @@ div#legend_data, div#legend_container, d
 
#content div.panel div.form div.fields div.field div.radios div.radio label {
 
    height: 1%;
 
    display: block;
 
    float: left;
 
    margin: 2px 0 0 4px;
 
}
 

	
 
div.form div.fields div.field div.button input,
 
#content div.panel div.form div.fields div.buttons input
 
div.form div.fields div.buttons input,
 
#content div.panel div.action div.button input {
 
    font-size: 11px;
 
    font-weight: 700;
 
    margin: 0;
 
}
 

	
 
div.form div.fields div.field div.highlight,
 
#content div.panel div.form div.fields div.buttons div.highlight {
 
    display: inline;
 
}
 

	
 
#content div.panel div.form div.fields div.buttons,
 
div.form div.fields div.buttons {
 
    margin: 10px 0 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,
 
#login div.form div.form-horizontal div.form-group div.input div.link,
 
#register div.form div.fields div.field div.input div.link {
 
    text-align: right;
 
    margin: 6px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination div.results,
 
#content div.panel div.pagination-wh div.results {
 
    text-align: left;
 
    float: left;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination div.results span,
 
#content div.panel div.pagination-wh div.results span {
 
    height: 1%;
 
    display: block;
 
    float: left;
 
    background: #ebebeb url("../images/pager.png") repeat-x;
 
    border-top: 1px solid #dedede;
 
    border-left: 1px solid #cfcfcf;
 
    border-right: 1px solid #c4c4c4;
 
    border-bottom: 1px solid #c4c4c4;
 
    color: #4A4A4A;
 
    font-weight: 700;
 
    margin: 0;
 
    padding: 6px 8px;
 
}
 

	
 
#content div.panel div.pagination ul.pager li.disabled,
 
#content div.panel div.pagination-wh a.disabled {
 
    color: #B4B4B4;
 
    padding: 6px;
 
}
 

	
 
#login, #register {
 
    width: 520px;
 
    margin: 10% auto 0;
 
    padding: 0;
 
}
 

	
 
#login div.color,
 
#register div.color {
 
    clear: both;
 
    overflow: hidden;
 
    background: #FFF;
 
    margin: 10px auto 0;
 
    padding: 3px 3px 3px 0;
 
}
 

	
 
#login div.color a,
 
#register div.color a {
 
    width: 20px;
 
    height: 20px;
 
    display: block;
 
    float: left;
 
    margin: 0 0 0 3px;
 
    padding: 0;
 
}
 

	
 
#login div.title h5,
 
#register div.title h5 {
 
#login div.panel-heading h5,
 
#register div.panel-heading h5 {
 
    color: #fff;
 
    margin: 10px;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group,
 
#register div.form div.fields div.field {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0 0 10px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group span.error-message,
 
#register div.form div.fields div.field span.error-message {
 
    height: 1%;
 
    display: block;
 
    color: red;
 
    margin: 8px 0 0;
 
    padding: 0;
 
    max-width: 320px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group label,
 
#register div.form div.fields div.field div.label label {
 
    color: #000;
 
    font-weight: 700;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div,
 
#register div.form div.fields div.field div.input {
 
    float: left;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div input.large {
 
    width: 250px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div.checkbox,
 
#register div.form div.fields div.field div.checkbox {
 
    margin: 0 0 0 184px;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div.checkbox label,
 
#register div.form div.fields div.field div.checkbox label {
 
    color: #565656;
 
    font-weight: 700;
 
}
 

	
 
#login div.form div.buttons input,
 
#register div.form div.fields div.buttons input {
 
    color: #000;
 
    font-size: 1em;
 
    font-weight: 700;
 
    margin: 0;
 
}
 

	
 
#changeset_content .container .wrapper,
 
#graph_content .container .wrapper {
 
    width: 600px;
 
}
 

	
 
#changeset_content .container .date,
 
.ac .match {
 
    font-weight: 700;
 
    padding-top: 5px;
 
    padding-bottom: 5px;
 
}
 

	
 
div#legend_container table td,
 
div#legend_choices table td {
 
    border: none !important;
 
    height: 20px !important;
 
    padding: 0 !important;
 
}
 

	
 
.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;
 
}
 

	
 
.reviewer_status {
 
    float: left;
 
}
kallithea/templates/about.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%block name="title">
 
    ${_('About')}
 
</%block>
 
<%def name="breadcrumbs()">
 
    ${c.site_name}
 
</%def>
 
<%block name="header_menu">
 
    ${self.menu('about')}
 
</%block>
 
<%def name="main()">
 

	
 
<div class="panel panel-primary">
 
  <!-- box / title -->
 
  <div class="title">
 
  <div class="panel-heading">
 
    <h5>${_('About')} Kallithea</h5>
 
  </div>
 

	
 
  <p><a href="https://kallithea-scm.org/">Kallithea</a> is a project of the
 
  <a href="http://sfconservancy.org/">Software Freedom Conservancy, Inc.</a>
 
  and is released under the terms of the
 
  <a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public License,
 
  v 3.0 (GPLv3)</a>.</p>
 

	
 
  <p>Kallithea is copyrighted by various authors, including but not
 
  necessarily limited to the following:
 
  <ul style="margin: 0 0 0 50px;">
 

	
 
  <li>Copyright &copy; 2012&ndash;2016, Mads Kiilerich</li>
 
  <li>Copyright &copy; 2012&ndash;2016, Takumi IINO</li>
 
  <li>Copyright &copy; 2012&ndash;2016, Unity Technologies</li>
 
  <li>Copyright &copy; 2012, 2014&ndash;2016, Andrew Shadura</li>
 
  <li>Copyright &copy; 2012, 2014&ndash;2016, Dominik Ruf</li>
 
  <li>Copyright &copy; 2014&ndash;2016, Thomas De Schampheleire</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Étienne Gilli</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Jan Heylen</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Robert Martinez</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Robert Rauch</li>
 
  <li>Copyright &copy; 2015&ndash;2016, Søren Løvborg</li>
 
  <li>Copyright &copy; 2016, Angel Ezquerra</li>
 
  <li>Copyright &copy; 2016, Asterios Dimitriou</li>
 
  <li>Copyright &copy; 2016, Kateryna Musina</li>
 
  <li>Copyright &copy; 2016, Konstantin Veretennicov</li>
 
  <li>Copyright &copy; 2016, Oscar Curero</li>
 
  <li>Copyright &copy; 2016, Robert James Dennington</li>
 
  <li>Copyright &copy; 2016, timeless@gmail.com</li>
 
  <li>Copyright &copy; 2016, YFdyh000</li>
 
  <li>Copyright &copy; 2012&ndash;2013, 2015, Aras Pranckevičius</li>
 
  <li>Copyright &copy; 2014&ndash;2015, Christian Oyarzun</li>
 
  <li>Copyright &copy; 2014&ndash;2015, Joseph Rivera</li>
 
  <li>Copyright &copy; 2014&ndash;2015, Michal Čihař</li>
 
  <li>Copyright &copy; 2014&ndash;2015, Sean Farley</li>
 
  <li>Copyright &copy; 2015, Anatoly Bubenkov</li>
 
  <li>Copyright &copy; 2015, Andrew Bartlett</li>
 
  <li>Copyright &copy; 2015, Balázs Úr</li>
 
  <li>Copyright &copy; 2015, Ben Finney</li>
 
  <li>Copyright &copy; 2015, Branko Majic</li>
 
  <li>Copyright &copy; 2015, Daniel Hobley</li>
 
  <li>Copyright &copy; 2015, David Avigni</li>
 
  <li>Copyright &copy; 2015, Denis Blanchette</li>
 
  <li>Copyright &copy; 2015, duanhongyi</li>
 
  <li>Copyright &copy; 2015, EriCSN Chang</li>
 
  <li>Copyright &copy; 2015, Grzegorz Krason</li>
 
  <li>Copyright &copy; 2015, Jiří Suchan</li>
 
  <li>Copyright &copy; 2015, Kazunari Kobayashi</li>
 
  <li>Copyright &copy; 2015, Kevin Bullock</li>
 
  <li>Copyright &copy; 2015, kobanari</li>
 
  <li>Copyright &copy; 2015, Marc Abramowitz</li>
 
  <li>Copyright &copy; 2015, Marc Villetard</li>
 
  <li>Copyright &copy; 2015, Matthias Zilk</li>
 
  <li>Copyright &copy; 2015, Michael Pohl</li>
 
  <li>Copyright &copy; 2015, Michael V. DePalatis</li>
 
  <li>Copyright &copy; 2015, Morten Skaaning</li>
 
  <li>Copyright &copy; 2015, Nick High</li>
 
  <li>Copyright &copy; 2015, Niemand Jedermann</li>
 
  <li>Copyright &copy; 2015, Peter Vitt</li>
 
  <li>Copyright &copy; 2015, Ronny Pfannschmidt</li>
 
  <li>Copyright &copy; 2015, Sam Jaques</li>
 
  <li>Copyright &copy; 2015, Tuux</li>
 
  <li>Copyright &copy; 2015, Viktar Palstsiuk</li>
 
  <li>Copyright &copy; 2014, Ante Ilic</li>
 
  <li>Copyright &copy; 2014, Bradley M. Kuhn</li>
 
  <li>Copyright &copy; 2014, Calinou</li>
 
  <li>Copyright &copy; 2014, Daniel Anderson</li>
 
  <li>Copyright &copy; 2014, Henrik Stuart</li>
 
  <li>Copyright &copy; 2014, Ingo von Borstel</li>
 
  <li>Copyright &copy; 2014, Jelmer Vernooij</li>
 
  <li>Copyright &copy; 2014, Jim Hague</li>
 
  <li>Copyright &copy; 2014, Matt Fellows</li>
 
  <li>Copyright &copy; 2014, Max Roman</li>
 
  <li>Copyright &copy; 2014, Na'Tosha Bard</li>
 
  <li>Copyright &copy; 2014, Rasmus Selsmark</li>
 
  <li>Copyright &copy; 2014, Tim Freund</li>
 
  <li>Copyright &copy; 2014, Travis Burtrum</li>
 
  <li>Copyright &copy; 2014, Zoltan Gyarmati</li>
 
  <li>Copyright &copy; 2010&ndash;2013, Marcin Kuźmiński</li>
 
  <li>Copyright &copy; 2010&ndash;2013, RhodeCode GmbH</li>
 
  <li>Copyright &copy; 2011, 2013, Aparkar</li>
 
  <li>Copyright &copy; 2012&ndash;2013, xpol</li>
 
  <li>Copyright &copy; 2013, Dennis Brakhane</li>
 
  <li>Copyright &copy; 2013, Grzegorz Rożniecki</li>
 
  <li>Copyright &copy; 2013, Jonathan Sternberg</li>
 
  <li>Copyright &copy; 2013, Leonardo Carneiro</li>
 
  <li>Copyright &copy; 2013, Magnus Ericmats</li>
 
  <li>Copyright &copy; 2013, Martin Vium</li>
 
  <li>Copyright &copy; 2013, Simon Lopez</li>
 
  <li>Copyright &copy; 2011&ndash;2012, Augusto Herrmann</li>
 
  <li>Copyright &copy; 2012, Dan Sheridan</li>
 
  <li>Copyright &copy; 2012, H Waldo G</li>
 
  <li>Copyright &copy; 2012, hppj</li>
 
  <li>Copyright &copy; 2012, Indra Talip</li>
kallithea/templates/admin/admin.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Admin Journal')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <form id="filter_form">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('journal filter...')}"/>
 
    <span class="tooltip" title="${h.journal_filter_help()}">?</span>
 
    <input type='submit' value="${_('Filter')}" class="btn btn-default btn-xs" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Admin Journal')} - ${ungettext('%s Entry', '%s Entries', c.users_log.item_count) % (c.users_log.item_count)}
 
    </form>
 
    ${h.end_form()}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <div id="user_log">
 
            <%include file='admin_log.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
<script>
 
$(document).ready(function() {
 
  $('#j_filter').click(function(){
 
    var $jfilter = $('#j_filter');
 
    if($jfilter.hasClass('initial')){
 
        $jfilter.val('');
 
    }
 
  });
 
  var fix_j_filter_width = function(len){
 
      $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
 
  };
 
  $('#j_filter').keyup(function () {
 
    fix_j_filter_width($('#j_filter').val().length);
 
  });
 
  $('#filter_form').submit(function (e) {
 
      e.preventDefault();
 
      var val = $('#j_filter').val();
 
      window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
 
  });
 
  fix_j_filter_width($('#j_filter').val().length);
 
});
 
</script>
 
</%def>
kallithea/templates/admin/auth/auth_settings.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Authentication Settings')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${_('Authentication')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    ${h.form(url('auth_settings'))}
 
    <div class="form">
 

	
 
    ## enabled auth plugins
 
    <h1>${_('Authentication Plugins')}</h1>
 
    <div class="fields">
 
       <div class="field">
 
           <div class="label"><label for="auth_plugins">${_("Enabled Plugins")}</label></div>
 
           <div class="input">${h.text("auth_plugins", class_='large')}
 
           <span class="help-block">${_('Comma-separated list of plugins; Kallithea will try user authentication in plugin order')}</span>
 
               <div style="padding:10px 0px 10px 0px;font-weight: bold">${_('Available built-in plugins')}</div>
 
               <ul>
 
               %for plugin_path in c.available_plugins:
 
                    <li>
 
                      <div style="padding:3px 0px 3px 0px">
 
                          <span style="margin: 0px 10px 0px 0px" plugin_id="${plugin_path}" class="toggle-plugin btn btn-default btn-xs ${'active' if plugin_path in c.enabled_plugins else ''}">
 
                          ${_('Enabled') if plugin_path in c.enabled_plugins else _('Disabled')}</span>${plugin_path}
 
                      </div>
 
                    </li>
 
               %endfor
 
               </ul>
 
           </div>
 
       </div>
 
    </div>
 

	
 
    %for cnt, module in enumerate(c.enabled_plugins):
 
        <% pluginName = c.plugin_shortnames[module] %>
 
        <h1>${_('Plugin')}: ${pluginName}</h1>
 
        <div class="fields">
 
        ## autoform generation, based on plugin definition from it's settings
 
        %for setting in c.plugin_settings[module]:
 
            <% fullsetting = "auth_%s_%s" % (pluginName, setting["name"]) %>
 
            <% displayname = (setting["formname"] if ("formname" in setting) else setting["name"]) %>
 
            %if setting["type"] == "password":
 
            <div class="field">
 
                <div class="label"><label for="${fullsetting}">${_(displayname)}</label></div>
 
                <div class="input">
 
                    ${h.password(fullsetting,class_='small')}
 
                    <span class="help-block">${setting["description"]}</span>
 
                </div>
 
            </div>
 
            %elif setting["type"] in ["string", "int"]:
 
            <div class="field">
 
                <div class="label"><label for="${fullsetting}">${_(displayname)}</label></div>
 
                <div class="input">
 
                    ${h.text(fullsetting,class_='small')}
 
                    <span class="help-block">${setting["description"]}</span>
 
                </div>
 
            </div>
 
            %elif setting["type"] == "bool":
 
            <div class="field">
 
                <div class="label label-checkbox"><label for="${fullsetting}">${_(displayname)}</label></div>
 
                <div class="checkboxes">
 
                    <div class="checkbox">${h.checkbox(fullsetting,True,class_='small')}</div>
 
                    <span class="help-block">${setting["description"]}</span>
 
                </div>
 
            </div>
 
            %elif setting["type"] == "select":
 
            <div class="field">
 
                <div class="label"><label for="${fullsetting}">${_(displayname)}</label></div>
 
                <div class="select">
 
                    ${h.select(fullsetting,setting['values'][0],setting['values'],class_='small')}
 
                    <span class="help-block">${setting["description"]}</span>
 
                </div>
 
            </div>
 
            %else:
 
            <div class="field">
 
                <div class="label"><label for="${fullsetting}">${_(displayname)}</label></div>
 
                <div class="input">This field is of type ${setting['type']}, which cannot be displayed. Must be one of [string|int|bool|select].</div>
 
                <span class="help-block">${setting["description"]}</span>
 
            </div>
 
            %endif
 
        %endfor
 
        </div>
 
    %endfor
 
        <div class="fields">
 
            <div class="buttons">
 
                ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<script>
 
    $('.toggle-plugin').click(function(e){
 
        var $auth_plugins_input = $('#auth_plugins');
 
        var notEmpty = function(element, index, array) {
 
            return (element != "");
 
        }
 
        var elems = $auth_plugins_input.val().split(',').filter(notEmpty);
 
        var $cur_button = $(e.currentTarget);
 
        var plugin_id = $cur_button.attr('plugin_id');
 

	
kallithea/templates/admin/defaults/defaults.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Repository Defaults')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${_('Repository Defaults')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ${h.form(url('defaults_update', id='defaults'))}
 
    <div class="form">
 
        <!-- fields -->
 

	
 
        <div class="fields">
 

	
 
            <div class="field">
 
                <div class="label">
 
                    <label for="default_repo_type">${_('Type')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.select('default_repo_type','hg',c.backends,class_="medium")}
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="default_repo_private">${_('Private repository')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('default_repo_private',value="True")}
 
                    <span class="help-block">${_('Private repositories are only visible to people explicitly added as collaborators.')}</span>
 
                </div>
 
            </div>
 

	
 

	
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="default_repo_enable_statistics">${_('Enable statistics')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('default_repo_enable_statistics',value="True")}
 
                    <span class="help-block">${_('Enable statistics window on summary page.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="default_repo_enable_downloads">${_('Enable downloads')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('default_repo_enable_downloads',value="True")}
 
                    <span class="help-block">${_('Enable download menu on summary page.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="default_repo_enable_locking">${_('Enable locking')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('default_repo_enable_locking',value="True")}
 
                    <span class="help-block">${_('Enable lock-by-pulling on repository.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="buttons">
 
            ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 

	
 
    ##<h3>${_('Groups defaults')}</h3>
 

	
 
</div>
 
</%def>
kallithea/templates/admin/gists/edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Edit Gist')} &middot; ${c.gist.gist_access_id}
 
</%block>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Edit Gist')} &middot; ${c.gist.gist_access_id}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('gists')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="table">
 
        <div id="edit_error" style="display: none" class="flash_msg">
 
            <div class="alert alert-dismissable alert-warning">
 
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true"><i class="icon-cancel-circled"></i></button>
 
              ${h.literal(_('Gist was update since you started editing. Copy your changes and click %(here)s to reload new version.')
 
                             % {'here': h.link_to('here',h.url('edit_gist', gist_id=c.gist.gist_access_id))})}
 
            </div>
 
            <script>
 
            if (typeof jQuery != 'undefined') {
 
                $(".alert").alert();
 
            }
 
            </script>
 
        </div>
 

	
 
        <div id="files_data">
 
          ${h.form(h.url('edit_gist', gist_id=c.gist.gist_access_id), method='post', id='eform')}
 
            <div>
 
                ${h.gravatar_div(c.authuser.email, size=32)}
 
                <input type="hidden" value="${c.file_changeset.raw_id}" name="parent_hash">
 
                <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;"
 
                          id="description" name="description"
 
                          placeholder="${_('Gist description ...')}">${c.gist.gist_description}</textarea>
 
                <div style="padding:0px 0px 0px 42px">
 
                    <label for='lifetime'>${_('Gist lifetime')}</label>
 
                    ${h.select('lifetime', '0', c.lifetime_options)}
 
                    <span class="" style="color: #AAA">
 
                     %if c.gist.gist_expires == -1:
 
                      ${_('Expires')}: ${_('Never')}
 
                     %else:
 
                      ${_('Expires')}: ${h.age(h.time_to_datetime(c.gist.gist_expires))}
 
                     %endif
 
                   </span>
 
                </div>
 
            </div>
 

	
 
            % for cnt, file in enumerate(c.files):
 
                <div id="body" class="codeblock" style="margin-bottom: 4px">
 
                    <div style="padding: 10px 10px 10px 26px;color:#666666">
 
                        <input type="hidden" value="${h.safe_unicode(file.path)}" name="org_files">
 
                        <input id="filename_${h.FID('f',file.path)}" name="files" size="30" type="text" value="${h.safe_unicode(file.path)}">
 
                        <select id="mimetype_${h.FID('f',file.path)}" name="mimetypes"/>
 
                    </div>
 
                    <div class="editor_container">
 
                        <pre id="editor_pre"></pre>
 
                        <textarea id="editor_${h.FID('f',file.path)}" name="contents" style="display:none">${file.content}</textarea>
 
                    </div>
 
                </div>
 

	
 
                ## dynamic edit box.
 
                <script type="text/javascript">
 
                    $(document).ready(function(){
 
                        var myCodeMirror = initCodeMirror("editor_${h.FID('f',file.path)}", "${request.script_name}", '');
 

	
 
                        //inject new modes
 
                        var $mimetype_select = $('#mimetype_${h.FID('f',file.path)}');
 
                        $mimetype_select.each(function(){
 
                            var modes_select = this;
 
                            var index = 1;
 
                            for(var i=0;i<CodeMirror.modeInfo.length;i++) {
 
                                var m = CodeMirror.modeInfo[i];
 
                                var opt = new Option(m.name, m.mime);
 
                                $(opt).attr('mode', m.mode);
 
                                if (m.mime == 'text/plain') {
 
                                    // default plain text
 
                                    $(opt).prop('selected', true);
 
                                    modes_select.options[0] = opt;
 
                                } else {
 
                                    modes_select.options[index++] = opt;
 
                                }
 
                            }
 
                        });
 

	
 
                        var $filename_input = $('#filename_${h.FID('f',file.path)}');
 
                        // on select change set new mode
 
                        $mimetype_select.change(function(e){
 
                            var selected = e.currentTarget;
 
                            var node = selected.options[selected.selectedIndex];
 
                            var detected_mode = CodeMirror.findModeByMIME(node.value);
 
                            setCodeMirrorMode(myCodeMirror, detected_mode);
 

	
 
                            var proposed_ext = CodeMirror.findExtensionByMode(detected_mode);
 
                            var file_data = CodeMirror.getFilenameAndExt($filename_input.val());
 
                            var filename = file_data['filename'] || 'filename1';
 
                            $filename_input.val(filename + '.' + proposed_ext);
 
                        });
 

	
 
                        // on type the new filename set mode
 
                        $filename_input.keyup(function(e){
 
                            var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                            if(file_data['ext'] != null){
 
                                var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
 

	
 
                                if (detected_mode){
kallithea/templates/admin/gists/index.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    %if c.show_private:
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    %if c.show_private:
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
    - ${c.gists_pager.item_count}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('gists')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        %if c.authuser.username != 'default':
 
        <ul class="links">
 
          <li>
 
             <a href="${h.url('new_gist')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Create New Gist')}</a>
 
          </li>
 
        </ul>
 
        %endif
 
    </div>
 
    %if c.gists_pager.item_count>0:
 
        % for gist in c.gists_pager:
 
          <div class="gist-item" style="padding:10px 20px 10px 15px">
 

	
 
            ${h.gravatar_div(gist.owner.email, size=28)}
 
            <div title="${gist.owner.full_contact}" class="user" style="font-size: 16px">
 
                <b>${h.person(gist.owner.full_contact)}</b> /
 
                <b><a href="${h.url('gist',gist_id=gist.gist_access_id)}">gist: ${gist.gist_access_id}</a></b>
 
            </div>
 
            <div style="padding: 4px 0px 0px 0px">
 
                ${_('Created')} ${h.age(gist.created_on)} /
 
                <span style="color: #AAA">
 
                  %if gist.gist_expires == -1:
 
                   ${_('Expires')}: ${_('Never')}
 
                  %else:
 
                   ${_('Expires')}: ${h.age(h.time_to_datetime(gist.gist_expires))}
 
                  %endif
 
                </span>
 
            </div>
 

	
 
            <div style="border:0px;padding:10px 0px 0px 40px;color:#AAA">${gist.gist_description}</div>
 
          </div>
 
        % endfor
 

	
 
        <div class="notification-paginator">
 
          <div class="pagination-wh pagination-left">
 
          ${c.gists_pager.pager('$link_previous ~2~ $link_next', **request.GET.mixed())}
 
          </div>
 
        </div>
 
    %else:
 
        <div class="table">${_('There are no gists yet')}</div>
 
    %endif
 
</div>
 
</%def>
kallithea/templates/admin/gists/new.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('New Gist')}
 
</%block>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('New Gist')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('gists')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="table">
 
        <div id="files_data">
 
          ${h.form(h.url('gists'), method='post',id='eform')}
 
            <div>
 
                ${h.gravatar_div(c.authuser.email, size=32)}
 
                <textarea style="resize:vertical; width:400px;border: 1px solid #ccc;border-radius: 3px;" id="description" name="description" placeholder="${_('Gist description ...')}"></textarea>
 
                <div style="padding:0px 0px 0px 42px">
 
                <label for='lifetime'>${_('Gist lifetime')}</label>
 
                ${h.select('lifetime', '', c.lifetime_options)}
 
                </div>
 
            </div>
 
            <div id="body" class="codeblock">
 
                <div style="padding: 10px 10px 10px 26px;color:#666666">
 
                    ${h.text('filename', size=30, placeholder=_('name this file...'))}
 
                    <select id="mimetype" name="mimetype"/>
 
                </div>
 
                <div id="editor_container">
 
                    <pre id="editor_pre"></pre>
 
                    <textarea id="editor" name="content" style="display:none"></textarea>
 
                </div>
 
            </div>
 
            <div style="padding-top: 5px">
 
            ${h.submit('private',_('Create Private Gist'),class_="btn btn-success btn-xs")}
 
            ${h.submit('public',_('Create Public Gist'),class_="btn btn-default btn-xs")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default btn-xs")}
 
            </div>
 
          ${h.end_form()}
 
          <script type="text/javascript">
 
            $(document).ready(function(){
 
                var myCodeMirror = initCodeMirror('editor', "${request.script_name}", '');
 

	
 
                //inject new modes
 
                var $mimetype_select = $('#mimetype');
 
                $mimetype_select.each(function(){
 
                    var modes_select = this;
 
                    var index = 1;
 
                    for(var i=0;i<CodeMirror.modeInfo.length;i++) {
 
                        var m = CodeMirror.modeInfo[i];
 
                        var opt = new Option(m.name, m.mime);
 
                        $(opt).attr('mode', m.mode);
 
                        if (m.mime == 'text/plain') {
 
                            // default plain text
 
                            $(opt).prop('selected', true);
 
                            modes_select.options[0] = opt;
 
                        } else {
 
                            modes_select.options[index++] = opt;
 
                        }
 
                    }
 
                });
 

	
 
                var $filename_input = $('#filename');
 
                // on select change set new mode
 
                $mimetype_select.change(function(e){
 
                    var selected = e.currentTarget;
 
                    var node = selected.options[selected.selectedIndex];
 
                    var detected_mode = CodeMirror.findModeByMIME(node.value);
 
                    setCodeMirrorMode(myCodeMirror, detected_mode);
 

	
 
                    var proposed_ext = CodeMirror.findExtensionByMode(detected_mode);
 
                    var file_data = CodeMirror.getFilenameAndExt($filename_input.val());
 
                    var filename = file_data['filename'] || 'filename1';
 
                    $filename_input.val(filename + '.' + proposed_ext);
 
                });
 

	
 
                // on type the new filename set mode
 
                $filename_input.keyup(function(e){
 
                    var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                    if(file_data['ext'] != null){
 
                        var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
 
                        if (detected_mode){
 
                            setCodeMirrorMode(myCodeMirror, detected_mode);
 
                            $mimetype_select.val(detected_mode.mime);
 
                        }
 
                    }
 
                });
 
            });
 
          </script>
 
        </div>
 
    </div>
 

	
 
</div>
 
</%def>
kallithea/templates/admin/gists/show.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Gist')} &middot; ${c.gist.gist_access_id}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Gist')} &middot; ${c.gist.gist_access_id}
 
    / ${_('URL')}: ${c.gist.gist_url()}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('gists')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        %if c.authuser.username != 'default':
 
        <ul class="links">
 
          <li>
 
              <a href="${h.url('new_gist')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Create New Gist')}</a>
 
          </li>
 
        </ul>
 
        %endif
 
    </div>
 
    <div class="table">
 
        <div id="files_data">
 
            <div id="body" class="codeblock">
 
                <div class="code-header">
 
                    <div class="stats">
 
                        <div class="left" style="margin: -4px 0px 0px 0px">
 
                          %if c.gist.gist_type == 'public':
 
                            <div class="btn btn-success btn-xs disabled">${_('Public Gist')}</div>
 
                          %else:
 
                            <div class="btn btn-warning btn-xs disabled">${_('Private Gist')}</div>
 
                          %endif
 
                        </div>
 
                        <div class="left item">
 
                            ${c.gist.gist_description}
 
                        </div>
 
                        <div class="left item last" style="color: #AAA">
 
                         %if c.gist.gist_expires == -1:
 
                          ${_('Expires')}: ${_('Never')}
 
                         %else:
 
                          ${_('Expires')}: ${h.age(h.time_to_datetime(c.gist.gist_expires))}
 
                         %endif
 
                       </div>
 

	
 
                       %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.authuser.user_id:
 
                        <div style="float:right">
 
                            ${h.form(url('gist_delete', gist_id=c.gist.gist_id))}
 
                                ${h.submit('remove_gist', _('Delete'),class_="btn btn-danger btn-xs",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")}
 
                            ${h.end_form()}
 
                        </div>
 
                       %endif
 
                        <div class="buttons">
 
                          ## only owner should see that
 
                          %if h.HasPermissionAny('hg.admin')() or c.gist.gist_owner == c.authuser.user_id:
 
                            ${h.link_to(_('Edit'),h.url('edit_gist', gist_id=c.gist.gist_access_id),class_="btn btn-default btn-xs")}
 
                          %endif
 
                          ${h.link_to(_('Show as Raw'),h.url('formatted_gist', gist_id=c.gist.gist_access_id, format='raw'),class_="btn btn-default btn-xs")}
 
                        </div>
 
                    </div>
 

	
 
                    <div class="author">
 
                        ${h.gravatar_div(h.email_or_none(c.file_changeset.author), size=16)}
 
                        <div title="${c.file_changeset.author}" class="user">${h.person(c.file_changeset.author)} - ${_('created')} ${h.age(c.file_changeset.date)}</div>
 
                    </div>
 
                    <div class="commit">${h.urlify_text(c.file_changeset.message,c.repo_name)}</div>
 
                </div>
 
            </div>
 

	
 
               ## iterate over the files
 
               % for file in c.files:
 
               <div style="border: 1px solid #EEE;margin-top:20px">
 
                <div id="${h.FID('G', file.path)}" class="stats" style="border-bottom: 1px solid #DDD;padding: 8px 14px;">
 
                    <a href="${c.gist.gist_url()}">¶</a>
 
                    <b style="margin:0px 0px 0px 4px">${h.safe_unicode(file.path)}</b>
 
                    <div style="float:right; margin: -5px">
 
                       ${h.link_to(_('Show as raw'),h.url('formatted_gist_file', gist_id=c.gist.gist_access_id, format='raw', revision=file.changeset.raw_id, f_path=h.safe_unicode(file.path)),class_="btn btn-default btn-xs")}
 
                    </div>
 
                </div>
 
                <div class="code-body">
 
                    ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
 
                </div>
 
              </div>
 
               %endfor
 
        </div>
 
    </div>
 

	
 

	
 
</div>
 
</%def>
kallithea/templates/admin/my_account/my_account.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('My Account')} ${c.authuser.username}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('My Account')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
        <ul class="nav nav-pills nav-stacked">
 
          <li>
 
           <div class="gravatar_box" style="height: 26px">
 
               ${h.gravatar_div(c.user.email, div_style="float: left")}
 
               <div class="truncate" style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left; width: 100px">
 
                <strong>${c.user.username}</strong>
 
               </div>
 
           </div>
 
          </li>
 
          <li class="${'active' if c.active=='profile' else ''}"><a href="${h.url('my_account')}">${_('Profile')}</a></li>
 
          <li class="${'active' if c.active=='emails' else ''}"><a href="${h.url('my_account_emails')}">${_('Email Addresses')}</a></li>
 
          <li class="${'active' if c.active=='password' else ''}"><a href="${h.url('my_account_password')}">${_('Password')}</a></li>
 
          <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('my_account_api_keys')}">${_('API Keys')}</a></li>
 
          <li class="${'active' if c.active=='repos' else ''}"><a href="${h.url('my_account_repos')}">${_('Owned Repositories')}</a></li>
 
          <li class="${'active' if c.active=='watched' else ''}"><a href="${h.url('my_account_watched')}">${_('Watched Repositories')}</a></li>
 
          <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('my_account_perms')}">${_('Show Permissions')}</a></li>
 
        </ul>
 
    </div>
 

	
 
    <div style="min-width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/my_account/my_account_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/notifications/notifications.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('My Notifications')} ${c.authuser.username}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('My Notifications')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
      <div style="padding:14px 18px;text-align: right;float:left">
 
      <span id='all' class="btn btn-default btn-sm"><a href="${h.url.current()}">${_('All')}</a></span>
 
      <span id='comment' class="btn btn-default btn-sm"><a href="${h.url.current(type=c.comment_type)}">${_('Comments')}</a></span>
 
      <span id='pull_request' class="btn btn-default btn-sm"><a href="${h.url.current(type=c.pull_request_type)}">${_('Pull Requests')}</a></span>
 
      </div>
 
      %if c.notifications:
 
      <div style="padding:14px 18px;text-align: right;float:right">
 
      <span id='mark_all_read' class="btn btn-default btn-sm">${_('Mark All Read')}</span>
 
      </div>
 
      %endif
 
  <div id='notification_data'>
 
    <%include file='notifications_data.html'/>
 
  </div>
 
</div>
 
<script type="text/javascript">
 
var url_delete = "${url('notification_delete', notification_id='__NOTIFICATION_ID__')}";
 
var url_read = "${url('notification_update', notification_id='__NOTIFICATION_ID__')}";
 
var run = function(){
 
  $('.delete-notification').click(function(e){
 
    var notification_id = e.currentTarget.id;
 
    deleteNotification(url_delete,notification_id);
 
  });
 
  $('.read-notification').click(function(e){
 
    var notification_id = e.currentTarget.id;
 
    readNotification(url_read,notification_id);
 
  });
 
}
 
run();
 
$('#mark_all_read').click(function(){
 
    var url = "${h.url('notifications_mark_all_read', **request.GET.mixed())}";
 
    asynchtml(url, $('#notification_data'), function(){run();});
 
});
 

	
 
var current_filter = "${c.current_filter}";
 
$('#'+current_filter).addClass('active');
 
</script>
 
</%def>
kallithea/templates/admin/notifications/show_notification.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Show Notification')} ${c.authuser.username}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Notifications'),h.url('notifications'))}
 
    &raquo;
 
    ${_('Show Notification')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
      <div id="notification_${c.notification.notification_id}">
 
        <div class="notification-header">
 
          ${h.gravatar_div(c.notification.created_by_user.email, size=24)}
 
          <div class="desc">
 
              ${c.notification.description}
 
          </div>
 
          <div class="delete-notifications">
 
            <span id="${c.notification.notification_id}" class="delete-notification action"><i class="icon-minus-circled"></i></span>
 
          </div>
 
        </div>
 
        <div class="notification-body">
 
        <div class="notification-subject">${h.literal(c.notification.subject)}</div>
 
        %if c.notification.body:
 
            ${h.render_w_mentions(c.notification.body)}
 
        %endif
 
        </div>
 
      </div>
 
    </div>
 
</div>
 
<script type="text/javascript">
 
var url = "${url('notification_delete', notification_id='__NOTIFICATION_ID__')}";
 
var main = "${url('notifications')}";
 
   $('.delete-notification').click(function(e){
 
       var notification_id = e.currentTarget.id;
 
       deleteNotification(url,notification_id,[function(){window.location=main}]);
 
   });
 
</script>
 
</%def>
kallithea/templates/admin/permissions/permissions.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Default Permissions')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${_('Default Permissions')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
      <ul class="nav nav-pills nav-stacked">
 
        <li class="${'active' if c.active=='globals' else ''}"><a href="${h.url('admin_permissions')}">${_('Global')}</a></li>
 
        <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('admin_permissions_ips')}">${_('IP Whitelist')}</a></li>
 
        <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('admin_permissions_perms')}">${_('Show Permissions')}</a></li>
 
      </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/permissions/permissions_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/repo_groups/repo_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add Repository Group')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repository Groups'),h.url('repos_groups'))}
 
    &raquo;
 
    ${_('Add Repository Group')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('repos_groups'))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="group_name">${_('Group name')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('group_name',class_='small')}
 
                </div>
 
             </div>
 

	
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="group_description">${_('Description')}:</label>
 
                </div>
 
                <div class="textarea-repo editor">
 
                    ${h.textarea('group_description',cols=23,rows=5,class_="medium")}
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                 <div class="label">
 
                     <label for="group_parent_id">${_('Group parent')}:</label>
 
                 </div>
 
                 <div class="input">
 
                     ${h.select('group_parent_id',request.GET.get('parent_group'),c.repo_groups,class_="medium")}
 
                 </div>
 
            </div>
 

	
 
            <div id="copy_perms" class="field">
 
                <div class="label label-checkbox">
 
                    <label for="group_copy_permissions">${_('Copy parent group permissions')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('group_copy_permissions',value="True")}
 
                    <span class="help-block">${_('Copy permission set from parent repository group.')}</span>
 
                </div>
 
            </div>
 

	
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 
<script>
 
    $(document).ready(function(){
 
        var setCopyPermsOption = function(group_val){
 
            if(group_val != "-1"){
 
                $('#copy_perms').show();
 
            }
 
            else{
 
                $('#copy_perms').hide();
 
            }
 
        }
 
        $("#group_parent_id").select2({
 
            'dropdownAutoWidth': true
 
        });
 
        setCopyPermsOption($('#group_parent_id').val());
 
        $("#group_parent_id").on("change", function(e) {
 
            setCopyPermsOption(e.val);
 
        });
 
        $('#group_name').focus();
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/repo_groups/repo_group_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Repository Group Settings') % c.repo_group.name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repository Groups'),h.url('repos_groups'))}
 
    %if c.repo_group.parent_group:
 
        &raquo; ${h.link_to(c.repo_group.parent_group.name,h.url('repos_group_home',group_name=c.repo_group.parent_group.group_name))}
 
    %endif
 
    &raquo; ${h.link_to(c.repo_group.name,h.url('repos_group_home',group_name=c.repo_group.group_name))}
 
</%def>
 

	
 
<%def name="breadcrumbs_side_links()">
 
    <ul class="links">
 
      <li>
 
          <a href="${h.url('new_repos_group', parent_group=c.repo_group.group_id)}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Add Child Group')}</a>
 
      </li>
 
    </ul>
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        ${self.breadcrumbs_side_links()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
      <ul class="nav nav-pills nav-stacked">
 
        <li class="${'active' if c.active=='settings' else ''}"><a href="${h.url('edit_repo_group', group_name=c.repo_group.group_name)}">${_('Settings')}</a></li>
 
        <li class="${'active' if c.active=='advanced' else ''}"><a href="${h.url('edit_repo_group_advanced', group_name=c.repo_group.group_name)}">${_('Advanced')}</a></li>
 
        <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_repo_group_perms', group_name=c.repo_group.group_name)}">${_('Permissions')}</a></li>
 
      </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/repo_groups/repo_group_edit_${c.active}.html"/>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/admin/repo_groups/repo_groups.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Repository Groups Administration')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="repo_group_count">0</span> ${_('Repository Groups')}
 
</%def>
 

	
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            %if h.HasPermissionAny('hg.admin')():
 
             <li>
 
               <a href="${h.url('new_repos_group')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Add Repository Group')}</a>
 
             </li>
 
            %endif
 
        </ul>
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <table id="datatable_list_wrap"></table>
 
    </div>
 
</div>
 
<script>
 
  var data = ${c.data|n};
 
  var myDataTable = $("#datatable_list_wrap").DataTable({
 
        data: data.records,
 
        columns: [
 
            {data: "raw_name", visible: false, searchable: false},
 
            {data: "group_name", orderData: 0, title: "${_('Name')}"},
 
            {data: "desc", title: "${_('Description')}", searchable: false},
 
            {data: "repos", title: "${_('Number of Top-level Repositories')}", searchable: false},
 
            {data: "owner", title: "${_('Owner')}", searchable: false},
 
            {data: "action", title: "${_('Action')}", sortable: false, searchable: false}
 
        ],
 
        drawCallback: updateRowCountCallback($("#repo_group_count")),
 
        pageLength: 100
 
    });
 

	
 
</script>
 
</%def>
kallithea/templates/admin/repos/repo_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add Repository')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    %if c.authuser.is_admin:
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Repositories'),h.url('repos'))}
 
    %else:
 
    ${_('Admin')}
 
    &raquo;
 
    ${_('Repositories')}
 
    %endif
 
    &raquo;
 
    ${_('Add Repository')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
    <div class="panel panel-primary">
 
        <!-- box / title -->
 
        <div class="title">
 
        <div class="panel-heading">
 
            ${self.breadcrumbs()}
 
        </div>
 
        <%include file="repo_add_base.html"/>
 
    </div>
 
</%def>
kallithea/templates/admin/repos/repo_creating.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
## don't trigger flash messages on this page
 
<%def name="flash_msg()">
 
</%def>
 

	
 
<%block name="title">
 
    ${_('%s Creating Repository') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Creating repository')} ${c.repo}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div style="display:table; padding: 10px 0px; font-size: 14px;font-weight: bold;margin-right: auto;margin-left: auto">
 
        ${_('Repository "%(repo_name)s" is being created, you will be redirected when this process is finished.' % {'repo_name':c.repo_name})}
 
    </div>
 

	
 
    <div id="progress" style="width: 500px;margin-left: auto; margin-right: auto">
 
        <div class="progress progress-striped active">
 
          <div class="progress-bar progress-bar" role="progressbar"
 
               aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
 
          </div>
 
        </div>
 
    </div>
 
    <div id="progress_error" style="display: none;">
 
        <div style="font-weight: bold; color:#aa1111">
 
        ${_("We're sorry but error occurred during this operation. Please check your Kallithea server logs, or contact administrator.")}
 
        </div>
 
    </div>
 
</div>
 

	
 
<script>
 
(function worker() {
 
  $.ajax({
 
    url: '${h.url('repo_check_home', repo_name=c.repo_name, repo=c.repo, task_id=c.task_id)}',
 
    success: function(data) {
 
      if(data.result === true){
 
          //redirect to created fork if our ajax loop tells us to do so.
 
          window.location = "${h.url('summary_home', repo_name = c.repo)}";
 
      }
 
    },
 
    complete: function(resp, status) {
 
      if (resp.status == 200){
 
          // Schedule the next request when the current one's complete
 
          setTimeout(worker, 1000);
 
      }
 
      else{
 
          $("#progress").html($('#progress_error').html());
 
      }
 
    }
 
  });
 
})();
 
</script>
 
</%def>
kallithea/templates/admin/repos/repo_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
##
 
## See also repo_settings.html
 
##
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Repository Settings') % c.repo_info.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Settings')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('options')}
 
<div class="panel panel-primary" style="overflow:auto">
 
    <!--<div class="title">-->
 
    <!--<div class="panel-heading">-->
 
        <!--${self.breadcrumbs()}-->
 
    <!--</div>-->
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
        <ul class="nav nav-pills nav-stacked">
 
          <!--<li>-->
 
           <!--<div class="gravatar_box" style="height: 26px">-->
 
             <!--<div class="gravatar" style="float: left">-->
 
                <!--<i class="icon-users" style="font-size: 26px"></i>-->
 
             <!--</div>-->
 
               <!--<div style="margin:10px 0px 10px 0px; color:#5f5f5f; float:left">-->
 
                <!--<strong>${'repo-info'}</strong>-->
 
               <!--</div>-->
 
           <!--</div>-->
 
          <!--</li>-->
 
          <li class="${'active' if c.active=='settings' else ''}">
 
              <a href="${h.url('edit_repo', repo_name=c.repo_name)}">${_('Settings')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='permissions' else ''}">
 
              <a href="${h.url('edit_repo_perms', repo_name=c.repo_name)}">${_('Permissions')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='advanced' else ''}">
 
              <a href="${h.url('edit_repo_advanced', repo_name=c.repo_name)}">${_('Advanced')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='fields' else ''}">
 
              <a href="${h.url('edit_repo_fields', repo_name=c.repo_name)}">${_('Extra Fields')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='caches' else ''}">
 
              <a href="${h.url('edit_repo_caches', repo_name=c.repo_name)}">${_('Caches')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='remote' else ''}">
 
              <a href="${h.url('edit_repo_remote', repo_name=c.repo_name)}">${_('Remote')}</a>
 
          </li>
 
          <li class="${'active' if c.active=='statistics' else ''}">
 
              <a href="${h.url('edit_repo_statistics', repo_name=c.repo_name)}">${_('Statistics')}</a>
 
          </li>
 
        </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/repos/repo_edit_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/repos/repos.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Repositories Administration')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <span id="repo_count">0</span> ${_('Repositories')}
 
</%def>
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 
<%def name="main()">
 
<div class="panel panel-primary">
 

	
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
         %if h.HasPermissionAny('hg.admin','hg.create.repository')():
 
          <li>
 
            <a href="${h.url('new_repo')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Add Repository')}</a>
 
          </li>
 
         %endif
 
        </ul>
 
    </div>
 
    <div class="table">
 
        <table id="datatable_list_wrap"></table>
 
    </div>
 

	
 
</div>
 
<script>
 
  var data = ${c.data|n};
 
  var myDataTable = $("#datatable_list_wrap").DataTable({
 
        data: data.records,
 
        columns: [
 
            {data: "raw_name", visible: false, searchable: false},
 
            {data: "name", orderData: 1, title: "${_('Name')}"},
 
            {data: "desc", title: "${_('Description')}", searchable: false},
 
            {data: "last_rev_raw", visible: false, searchable: false},
 
            {data: "last_changeset", orderData: 4, title: "${_('Tip')}", searchable: false},
 
            {data: "owner", title: "${_('Owner')}", searchable: false},
 
            {data: "state", title: "${_('State')}", searchable: false},
 
            {data: "action", title: "${_('Action')}", sortable: false, searchable: false}
 
        ],
 
        drawCallback: updateRowCountCallback($("#repo_count")),
 
        pageLength: 100
 
    });
 
</script>
 

	
 
</%def>
kallithea/templates/admin/settings/settings.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Settings Administration')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${_('Settings')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
      <ul class="nav nav-pills nav-stacked">
 
        <li class="${'active' if c.active=='vcs' else ''}"><a href="${h.url('admin_settings')}">${_('VCS')}</a></li>
 
        <li class="${'active' if c.active=='mapping' else ''}"><a href="${h.url('admin_settings_mapping')}">${_('Remap and Rescan')}</a></li>
 
        <li class="${'active' if c.active=='global' else ''}"><a href="${h.url('admin_settings_global')}">${_('Global')}</a></li>
 
        <li class="${'active' if c.active=='visual' else ''}"><a href="${h.url('admin_settings_visual')}">${_('Visual')}</a></li>
 
        <li class="${'active' if c.active=='email' else ''}"><a href="${h.url('admin_settings_email')}">${_('Email')}</a></li>
 
        <li class="${'active' if c.active=='hooks' else ''}"><a href="${h.url('admin_settings_hooks')}">${_('Hooks')}</a></li>
 
        <li class="${'active' if c.active=='search' else ''}"><a href="${h.url('admin_settings_search')}">${_('Full Text Search')}</a></li>
 
        <li class="${'active' if c.active=='system' else ''}"><a href="${h.url('admin_settings_system')}">${_('System Info')}</a></li>
 
      </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/settings/settings_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/user_groups/user_group_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add user group')}
 
</%block>
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('User Groups'),h.url('users_groups'))}
 
    &raquo;
 
    ${_('Add User Group')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('users_groups'))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="users_group_name">${_('Group name')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('users_group_name',class_='small')}
 
                </div>
 
             </div>
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="user_group_description">${_('Description')}:</label>
 
                </div>
 
                <div class="textarea text-area editor">
 
                    ${h.textarea('user_group_description')}
 
                    <span class="help-block">${_('Short, optional description for this user group.')}</span>
 
                </div>
 
             </div>
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="users_group_active">${_('Active')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('users_group_active',value=True, checked='checked')}
 
                </div>
 
             </div>
 

	
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<script>
 
    $(document).ready(function(){
 
        $('#users_group_name').focus();
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/user_groups/user_group_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s user group settings') % c.user_group.users_group_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('User Groups'),h.url('users_groups'))}
 
    &raquo;
 
    ${c.user_group.users_group_name}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
      <ul class="nav nav-pills nav-stacked">
 
        <li class="${'active' if c.active=='settings' else ''}"><a href="${h.url('edit_users_group', id=c.user_group.users_group_id)}">${_('Settings')}</a></li>
 
        <li class="${'active' if c.active=='advanced' else ''}"><a href="${h.url('edit_user_group_advanced', id=c.user_group.users_group_id)}">${_('Advanced')}</a></li>
 
        <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_user_group_perms', id=c.user_group.users_group_id)}">${_('Permissions')}</a></li>
 
        <li class="${'active' if c.active=='default_perms' else ''}"><a href="${h.url('edit_user_group_default_perms', id=c.user_group.users_group_id)}">${_('Show Permissions')}</a></li>
 
        <li class="${'active' if c.active=='members' else ''}"><a href="${h.url('edit_user_group_members', id=c.user_group.users_group_id)}">${_('Show Members')}</a></li>
 
      </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/user_groups/user_group_edit_${c.active}.html"/>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/admin/user_groups/user_groups.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('User Groups Administration')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <input class="q_filter_box" id="q_filter" size="15" type="text" name="filter" placeholder="${_('quick filter...')}" value=""/>
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_group_count">0</span> ${_('User Groups')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
        %if h.HasPermissionAny('hg.admin', 'hg.usergroup.create.true')():
 
          <li>
 
            <a href="${h.url('new_users_group')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Add User Group')}</a>
 
          </li>
 
        %endif
 
        </ul>
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <table id="datatable_list_wrap"></table>
 
    </div>
 
</div>
 
<script>
 
    var data = ${c.data|n};
 
    var $dataTable = $("#datatable_list_wrap").DataTable({
 
        data: data.records,
 
        columns: [
 
            {data: "raw_name", visible: false, searchable: false},
 
            {data: "group_name", title: "${_('Name')}", orderData: 0},
 
            {data: "desc", title: "${_('Description')}", searchable: false},
 
            {data: "members", title: "${_('Members')}", searchable: false},
 
            {data: "active", title: "${_('Active')}", searchable: false, 'sType': 'str'},
 
            {data: "owner", title: "${_('Owner')}", searchable: false},
 
            {data: "action", title: "${_('Action')}", searchable: false, sortable: false}
 
        ],
 
        order: [[1, "asc"]],
 
        pageLength: 100
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/users/user_add.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Add user')}
 
</%block>
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Users'),h.url('users'))}
 
    &raquo;
 
    ${_('Add User')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    ${h.form(url('new_user'))}
 
    <div class="form">
 
        <!-- fields -->
 
        <div class="fields">
 
             <div class="field">
 
                <div class="label">
 
                    <label for="username">${_('Username')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('username',class_='small')}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="password">${_('Password')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.password('password',class_='small')}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="password_confirmation">${_('Password confirmation')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.password('password_confirmation',class_="small")}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="firstname">${_('First Name')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('firstname',class_='small')}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="lastname">${_('Last Name')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('lastname',class_='small')}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="email">${_('Email')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('email',class_='small')}
 
                </div>
 
             </div>
 

	
 
             <div class="field">
 
                <div class="label label-checkbox">
 
                    <label for="active">${_('Active')}:</label>
 
                </div>
 
                <div class="checkboxes">
 
                    ${h.checkbox('active',value=True,checked='checked')}
 
                </div>
 
             </div>
 

	
 
            ${h.hidden('extern_type', c.default_extern_type)}
 
            ${h.hidden('extern_name', c.default_extern_name)}
 
            <div class="buttons">
 
              ${h.submit('save',_('Save'),class_="btn btn-default")}
 
            </div>
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
</div>
 

	
 
<script>
 
    $(document).ready(function(){
 
        $('#username').focus();
 
    });
 
</script>
 
</%def>
kallithea/templates/admin/users/user_edit.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s user settings') % c.user.username}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))}
 
    &raquo;
 
    ${h.link_to(_('Users'),h.url('users'))}
 
    &raquo;
 
    ${c.user.username}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary" style="overflow:auto">
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ##main
 
    <div style="width: 150px; float:left">
 
      <ul class="nav nav-pills nav-stacked">
 
        <li class="${'active' if c.active=='profile' else ''}"><a href="${h.url('edit_user', id=c.user.user_id)}">${_('Profile')}</a></li>
 
        <li class="${'active' if c.active=='emails' else ''}"><a href="${h.url('edit_user_emails', id=c.user.user_id)}">${_('Emails')}</a></li>
 
        <li class="${'active' if c.active=='api_keys' else ''}"><a href="${h.url('edit_user_api_keys', id=c.user.user_id)}">${_('API Keys')}</a></li>
 
        <li class="${'active' if c.active=='ips' else ''}"><a href="${h.url('edit_user_ips', id=c.user.user_id)}">${_('IP Whitelist')}</a></li>
 
        <li class="${'active' if c.active=='advanced' else ''}"><a href="${h.url('edit_user_advanced', id=c.user.user_id)}">${_('Advanced')}</a></li>
 
        <li class="${'active' if c.active=='perms' else ''}"><a href="${h.url('edit_user_perms', id=c.user.user_id)}">${_('Show Permissions')}</a></li>
 
      </ul>
 
    </div>
 

	
 
    <div style="width:750px; float:left; padding: 10px 0px 0px 20px;margin: 0px 0px 0px 10px; border-left: 1px solid #DDDDDD">
 
        <%include file="/admin/users/user_edit_${c.active}.html"/>
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/admin/users/users.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('Users Administration')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${h.link_to(_('Admin'),h.url('admin_home'))} &raquo; <span id="user_count">0</span> ${_('Users')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('admin')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
          <li>
 
            <a href="${h.url('new_user')}" class="btn btn-success btn-sm"><i class="icon-plus"></i> ${_('Add User')}</a>
 
          </li>
 
        </ul>
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <table id="datatable_list_wrap"></table>
 
    </div>
 
</div>
 

	
 
<script>
 
    var data = ${c.data|n};
 
    var $dataTable = $("#datatable_list_wrap").DataTable({
 
        data: data.records,
 
        columns: [
 
            {data: "gravatar", sortable: false, searchable: false},
 
            {data: "username", title: "${_('Username')}"},
 
            {data: "firstname", title: "${_('First Name')}"},
 
            {data: "lastname", title: "${_('Last Name')}"},
 
            {data: "last_login_raw", visible: false, searchable: false},
 
            {data: "last_login", title: "${_('Last Login')}", orderData: 4, searchable: false},
 
            {data: "active", title: "${_('Active')}", searchable: false, 'sType': 'str'},
 
            {data: "admin", title: "${_('Admin')}", searchable: false, 'sType': 'str'},
 
            {data: "extern_type", title: "${_('Auth Type')}", searchable: false},
 
            {data: "action", title: "${_('Action')}", searchable: false, sortable: false}
 
        ],
 
        order: [[1, "asc"]],
 
        drawCallback: updateRowCountCallback($("#user_count")),
 
        pageLength: 100
 
    });
 
</script>
 

	
 
</%def>
kallithea/templates/changelog/changelog.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Changelog') % c.repo_name}
 
    %if c.changelog_for_path:
 
      /${c.changelog_for_path}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <% size = c.size if c.size <= c.total_cs else c.total_cs %>
 
    ${_('Changelog')}
 
    %if c.changelog_for_path:
 
     - /${c.changelog_for_path}
 
    %endif
 
    %if c.revision:
 
    @ ${h.short_id(c.first_revision.raw_id)}
 
    %endif
 
    - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog', c.first_revision.raw_id if c.first_revision else None)}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        % if c.pagination:
 
            <div>
 
                <div style="overflow:auto; ${'display:none' if c.changelog_for_path else ''}">
 
                    <div class="container_header">
 
                        <div style="float:left; margin-left:20px;">
 
                          ${h.form(h.url.current(),method='get',style="display:inline")}
 
                            ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")}
 
                            ${h.text('size',size=3,value=c.size)}
 
                            ${_('revisions')}
 
                            %if c.branch_name:
 
                            ${h.hidden('branch', c.branch_name)}
 
                            %endif
 
                          ${h.end_form()}
 
                          <a href="#" class="btn btn-default btn-sm" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 
                        </div>
 
                        <div style="float: right; margin: 0px 0px 0px 4px">
 
                            <a href="#" class="btn btn-default btn-sm" id="rev_range_container" style="display:none"></a>
 
                            %if c.revision:
 
                                <a class="btn btn-default btn-sm" href="${h.url('changelog_home', repo_name=c.repo_name)}">
 
                                    ${_('Go to tip of repository')}
 
                                </a>
 
                            %endif
 
                            %if c.db_repo.fork:
 
                                <a id="compare_fork"
 
                                   title="${_('Compare fork with %s' % c.db_repo.fork.repo_name)}"
 
                                   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)}"
 
                                   class="btn btn-default btn-sm"><i class="icon-git-compare"></i> ${_('Compare fork with parent repository (%s)' % c.db_repo.fork.repo_name)}</a>
 
                            %endif
 
                            ## text and href of open_new_pr is controlled from javascript
 
                            <a id="open_new_pr" class="btn btn-default btn-sm"></a>
 
                            ${_("Branch filter:")} ${h.select('branch_filter',c.branch_name,c.branch_filters)}
 
                        </div>
 
                    </div>
 
                </div>
 

	
 
                <div id="changelog" style="clear:both">
 

	
 
                <div id="graph_nodes">
 
                    <canvas id="graph_canvas" style="width:0"></canvas>
 
                </div>
 
                <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
 

	
 
                <table id="changesets">
 
                <tbody>
 
                %for cnt,cs in enumerate(c.pagination):
 
                    <tr id="chg_${cnt+1}" class="container ${'mergerow' if len(cs.parents) > 1 else ''}">
 
                        <td class="checkbox">
 
                            %if c.changelog_for_path:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range", disabled="disabled")}
 
                            %else:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range")}
 
                            %endif
 
                        <td class="status">
 
                          %if c.statuses.get(cs.raw_id):
 
                            <div class="changeset-status-ico">
 
                            %if c.statuses.get(cs.raw_id)[2]:
 
                              <a class="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
 
                                <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %else:
 
                              <a class="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}"
 
                                 href="${c.comments[cs.raw_id][0].url()}">
 
                                  <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %endif
 
                            </div>
 
                          %endif
 
                        </td>
 
                        <td class="author">
 
                            ${h.gravatar(h.email_or_none(cs.author), size=16)}
 
                            <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
 
                        </td>
 
                        <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
 
                            ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), class_='changeset_hash')}
 
                        </td>
 
                        <td class="date">
 
                            <div class="date tooltip" title="${h.fmt_date(cs.date)}">${h.age(cs.date,True)}</div>
 
                        </td>
 
                        <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
                            <i class="icon-align-left" style="color:#999"></i>
 
                        </td>
 
                        <td class="mid">
 
                            <div class="log-container">
 
                                <div class="message" id="C-${cs.raw_id}">${h.urlify_text(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
                                <div class="extra-container">
 
                                    %if c.comments.get(cs.raw_id):
 
                                        <div class="comments-container">
 
                                            <div class="comments-cnt" title="${_('Changeset has comments')}">
 
                                                <a href="${c.comments[cs.raw_id][0].url()}">
 
                                                    ${len(c.comments[cs.raw_id])}
 
                                                    <i class="icon-comment-discussion"></i>
 
                                                </a>
 
                                            </div>
kallithea/templates/changeset/changeset.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Changeset')} - <span class='hash'>${h.show_id(c.changeset)}</span>
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog', c.changeset.raw_id)}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${c.users_array|n};
 
    var _GROUPS_AC_DATA = ${c.user_groups_array|n};
 
    AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
 
    AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
 
    </script>
 
    <div class="table">
 
        <div class="diffblock">
 
            <div class="parents">
 
                <div id="parent_link" class="changeset_hash">
 
                    <i style="color:#036185" class="icon-left-open"></i> <a href="#">${_('Parent rev.')}</a>
 
                </div>
 
            </div>
 

	
 
            <div class="children">
 
                <div id="child_link" class="changeset_hash">
 
                    <a href="#">${_('Child rev.')}</a> <i style="color:#036185" class="icon-right-open"></i>
 
                </div>
 
            </div>
 

	
 
            <div class="code-header banner">
 
                <div class="changeset-status-container">
 
                    %if c.statuses:
 
                        <span class="changeset-status-ico"><i class="icon-circle changeset-status-${c.statuses[0]}"></i></span>
 
                        <span title="${_('Changeset status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.statuses[0])}]</span>
 
                    %endif
 
                </div>
 
                <div class="diff-actions">
 
                  <a href="${h.url('changeset_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}"  class="tooltip" title="${_('Raw diff')}">
 
                      <i class="icon-diff"></i>
 
                  </a>
 
                  <a href="${h.url('changeset_patch_home',repo_name=c.repo_name,revision=c.changeset.raw_id)}"  class="tooltip" title="${_('Patch diff')}">
 
                      <i class="icon-file-powerpoint"></i>
 
                  </a>
 
                  <a href="${h.url('changeset_download_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download')}" class="tooltip" title="${_('Download diff')}">
 
                      <i class="icon-floppy"></i>
 
                  </a>
 
                  ${c.ignorews_url(request.GET)}
 
                  ${c.context_url(request.GET)}
 
                </div>
 
                <div class="comments-number" style="float:right;padding-right:5px">
 
                    ${comment.comment_count(c.inline_cnt, len(c.comments))}
 
                </div>
 
            </div>
 
        </div>
 
        <div id="changeset_content">
 
            <div class="container">
 

	
 
                <div class="right">
 
                    <div class="changes">
 
                        % if (len(c.changeset.affected_files) <= c.affected_files_cut_off) or c.fulldiff:
 
                         <span class="removed" title="${_('Removed')}">${len(c.changeset.removed)}</span>
 
                         <span class="changed" title="${_('Changed')}">${len(c.changeset.changed)}</span>
 
                         <span class="added" title="${_('Added')}">${len(c.changeset.added)}</span>
 
                        % else:
 
                         <span class="removed" title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span>
 
                         <span class="changed" title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span>
 
                         <span class="added"   title="${_('Affected %s files') % len(c.changeset.affected_files)}">!</span>
 
                        % endif
 
                    </div>
 

	
 
                    <span class="logtags">
 
                        %if len(c.changeset.parents)>1:
 
                        <span class="merge">${_('Merge')}</span>
 
                        %endif
 

	
 
                        %if h.is_hg(c.db_repo_scm_instance):
 
                          %for book in c.changeset.bookmarks:
 
                          <span class="booktag" title="${_('Bookmark %s') % book}">
 
                             ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
 
                          </span>
 
                          %endfor
 
                        %endif
 

	
 
                        %for tag in c.changeset.tags:
 
                         <span class="tagtag"  title="${_('Tag %s') % tag}">
 
                         ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
 
                        %endfor
 

	
 
                        %if c.changeset.branch:
 
                         <span class="branchtag" title="${_('Branch %s') % c.changeset.branch}">
 
                         ${h.link_to(c.changeset.branch,h.url('changelog_home',repo_name=c.repo_name,branch=c.changeset.branch))}
 
                         </span>
 
                        %endif
 
                    </span>
 
                </div>
 
                <div class="left">
 
                     <div class="author">
 
                         ${h.gravatar_div(h.email_or_none(c.changeset.author), size=20)}
 
                         <span><b>${h.person(c.changeset.author,'full_name_and_username')}</b> - ${h.age(c.changeset.date,True)} ${h.fmt_date(c.changeset.date)}</span><br/>
 
                         <span>${h.email_or_none(c.changeset.author)}</span><br/>
 
                     </div>
 
                     <% rev = c.changeset.extra.get('source') %>
 
                     %if rev:
kallithea/templates/changeset/changeset_range.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Changesets') % c.repo_name} - ${h.show_id(c.cs_ranges[0])} &gt; ${h.show_id(c.cs_ranges[-1])}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Changesets')} -
 
    ${h.link_to(h.show_id(c.cs_ranges[0]),h.url('changeset_home',repo_name=c.repo_name,revision=c.cs_ranges[0]))}</td>
 
    <i class="icon-right"></i>
 
    ${h.link_to(h.show_id(c.cs_ranges[-1]),h.url('changeset_home',repo_name=c.repo_name,revision=c.cs_ranges[-1]))}</td>
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        <div id="body" class="diffblock">
 
            <div class="code-header">
 
                <div>
 
                    ${h.show_id(c.cs_ranges[0])}
 
                    <i class="icon-right"></i>
 
                    ${h.show_id(c.cs_ranges[-1])}
 
                    <a style="font-weight: bold" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref_name=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref_name=c.cs_ranges[-1].raw_id)}" class="btn btn-default btn-sm"><i class="icon-git-compare"></i> Compare Revisions</a>
 
                </div>
 
            </div>
 
        </div>
 
        <div id="changeset_compare_view_content">
 
            <div class="container">
 
            <table class="compare_view_commits noborder">
 
            %for cnt,cs in enumerate(c.cs_ranges):
 
                <tr>
 
                %if c.visual.use_gravatar:
 
                <td>${h.gravatar_div(h.email_or_none(cs.author), size=14)}</td>
 
                %endif
 
                <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</td>
 
                <td><div class="author">${h.person(cs.author)}</div></td>
 
                <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
 
                <td>
 
                  %if c.statuses:
 
                    <div title="${_('Changeset status')}" class="changeset-status-ico"><i class="icon-circle changeset-status-${c.statuses[cnt]}"></i></div>
 
                  %endif
 
                </td>
 
                <td><div class="message">${h.urlify_text(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
 
                </tr>
 
            %endfor
 
            </table>
 
            </div>
 
            <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
 
            <div class="cs_files">
 
                %for cs in c.cs_ranges:
 
                    <div class="cur_cs">${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</div>
 
                    <% a_rev, cs_rev, file_diff_data = c.changes[cs.raw_id] %>
 
                    %for fid, (url_fid, op, a_path, path, diff, stats) in file_diff_data.iteritems():
 
                        <div class="cs_${op}">
 
                            <div class="node">
 
                                <i class="icon-diff-${op}"></i>
 
                                ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                            </div>
 
                            <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                        </div>
 
                    %endfor
 
                %endfor
 
            </div>
 
        </div>
 

	
 
    </div>
 
    <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    %for cs in c.cs_ranges:
 
          ## diff block
 
          <div class="h3">
 
          <a class="tooltip" title="${cs.message}" href="${h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id)}">${h.show_id(cs)}</a>
 
             ${h.gravatar_div(h.email_or_none(cs.author), size=20)}
 
             <div class="right">
 
              <span class="logtags">
 
                %if len(cs.parents)>1:
 
                <span class="merge">${_('Merge')}</span>
 
                %endif
 
                %if h.is_hg(c.db_repo_scm_instance):
 
                  %for book in cs.bookmarks:
 
                  <span class="booktag" title="${_('Bookmark %s') % book}">
 
                     ${h.link_to(book,h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
 
                  </span>
 
                  %endfor
 
                %endif
 
                %for tag in cs.tags:
 
                    <span class="tagtag" title="${_('Tag %s') % tag}">
 
                    ${h.link_to(tag,h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}</span>
 
                %endfor
 
                %if cs.branch:
 
                <span class="branchtag" title="${_('Branch %s') % cs.branch}">
 
                   ${h.link_to(cs.branch,h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
 
                </span>
 
                %endif
 
              </span>
 
            </div>
 
           </div>
 
          <% a_rev, cs_rev, file_diff_data = c.changes[cs.raw_id] %>
 
          ${diff_block.diff_block(c.repo_name, 'rev', a_rev, a_rev,
 
                                  c.repo_name, 'rev', cs_rev, cs_rev, file_diff_data)}
 
    %endfor
 
</div>
 
</%def>
kallithea/templates/compare/compare_diff.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    %if c.compare_home:
 
        ${_('%s Compare') % c.repo_name}
 
    %else:
 
        ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.a_repo.repo_name, c.a_ref_name)} &gt; ${'%s@%s' % (c.cs_repo.repo_name, c.cs_ref_name)}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
  ${_('Compare Revisions')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        <div id="body" class="diffblock">
 
            <div class="compare-revision-selector">
 
                ## divs are "inline-block" and cannot have whitespace between them.
 
                <div>
 
                    ${h.hidden('compare_org')}
 
                </div><div>
 
                    <i class="icon-right"></i>
 
                </div><div>
 
                    ${h.hidden('compare_other')}
 
                </div><div>
 
                    %if not c.compare_home:
 
                        <a class="btn btn-default btn-sm" href="${c.swap_url}"><i class="icon-arrows-cw"></i> ${_('Swap')}</a>
 
                    %endif
 
                    <div id="compare_revs" class="btn btn-default btn-sm"><i class="icon-git-compare"></i> ${_('Compare Revisions')}</div>
 
                </div>
 
            </div>
 
        </div>
 

	
 
    %if c.compare_home:
 
        <div id="changeset_compare_view_content">
 
         <div style="color:#999;font-size: 18px">${_('Compare revisions, branches, bookmarks, or tags.')}</div>
 
        </div>
 
    %else:
 
        <div id="changeset_compare_view_content">
 
                ##CS
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
 
                <%include file="compare_cs.html" />
 

	
 
                ## FILES
 
                <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 

	
 
                % if c.limited_diff:
 
                    ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}:
 
                % else:
 
                    ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}:
 
                %endif
 

	
 
                ${c.ignorews_url(request.GET)}
 
                ${c.context_url(request.GET)}
 

	
 
                </div>
 
                <div class="cs_files">
 
                  %if not c.file_diff_data:
 
                     <span class="empty_data">${_('No files')}</span>
 
                  %endif
 
                  %for fid, (url_fid, op, a_path, path, diff, stats) in c.file_diff_data.iteritems():
 
                    <div class="cs_${op}">
 
                      <div class="node">
 
                          <i class="icon-diff-${op}"></i>
 
                          ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                      </div>
 
                      <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                    </div>
 
                  %endfor
 
                  %if c.limited_diff:
 
                    <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h5>
 
                  %endif
 
                </div>
 
         </div>
 

	
 
        ## diff block
 
        <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
        ${diff_block.diff_block_js()}
 
        ${diff_block.diff_block(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name, c.a_rev,
 
                                c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev, c.file_diff_data)}
 
        % if c.limited_diff:
 
          <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h4>
 
        % endif
 
    %endif
 
    </div>
 

	
 
</div>
 
    <script type="text/javascript">
 

	
 
   $(document).ready(function(){
 
    var cache = {};
 

	
 
    function make_revision_dropdown(css_selector, placeholder, repo_name, cache_key) {
 
      $(css_selector).select2({
 
        placeholder: placeholder,
 
        formatSelection: function(obj){
 
            return '{0}@{1}'.format(repo_name, obj.text);
 
        },
 
        dropdownAutoWidth: true,
 
        maxResults: 50,
 
        query: function(query){
 
          var key = cache_key;
 
          var cached = cache[key] ;
 
          if(cached) {
 
            var data = {results: []};
 
            var queryLower = query.term.toLowerCase();
 
            //filter results
 
            $.each(cached.results, function(){
kallithea/templates/files/diff_2way.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/mergely.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
  <link rel="stylesheet" type="text/css" href="${h.url('/css/mergely.css')}"/>
 
</%block>
 

	
 
<%block name="title">
 
    ${_('%s File side-by-side diff') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('File diff')} ${h.show_id(c.changeset_1)} &rarr; ${h.show_id(c.changeset_2)}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="diff-container">
 
        <div class="diffblock comm twoway">
 
            <div class="code-header">
 
                <div class="changeset_header">
 
                    <div class="changeset_file">
 
                        ${h.link_to(h.safe_unicode(c.node1.path),h.url('files_home',repo_name=c.repo_name,
 
                        revision=c.cs2.raw_id,f_path=h.safe_unicode(c.node1.path)))}
 
                    </div>
 
                    <div class="diff-actions">
 
                      <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),diff2=c.cs2.raw_id,diff1=c.cs1.raw_id,diff='diff',fulldiff=1)}" class="tooltip" title="${_('Show full diff for this file')}">
 
                          <i class="icon-file-code"></i>
 
                      </a>
 
                      <a href="${h.url('files_diff_2way_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),diff2=c.cs2.raw_id,diff1=c.cs1.raw_id,diff='diff',fulldiff=1)}" class="tooltip" title="${_('Show full side-by-side diff for this file')}">
 
                          <i class="icon-docs"></i>
 
                      </a>
 
                      <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),diff2=c.cs2.raw_id,diff1=c.cs1.raw_id,diff='raw')}" class="tooltip" title="${_('Raw diff')}">
 
                          <i class="icon-diff"></i>
 
                      </a>
 
                      <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),diff2=c.cs2.raw_id,diff1=c.cs1.raw_id,diff='download')}" class="tooltip" title="${_('Download diff')}">
 
                          <i class="icon-floppy"></i>
 
                      </a>
 
                      ${h.checkbox('ignorews', label=_('Ignore whitespace'))}
 
                      ${h.checkbox('edit_mode', label=_('Edit'))}
 
                    </div>
 
                </div>
 
            </div>
 
            <div id="compare"></div>
 
        </div>
 
    </div>
 

	
 
<script>
 
var orig1_url = '${h.url('files_raw_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),revision=c.cs1.raw_id)}';
 
var orig2_url = '${h.url('files_raw_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node2.path),revision=c.cs2.raw_id)}';
 

	
 
$(document).ready(function () {
 
    $('#compare').mergely({
 
        width: 'auto',
 
        height: $(window).height() - $('#compare').offset().top - $('#footer').height() - 35,
 
        fgcolor: {a:'#ddffdd',c:'#cccccc',d:'#ffdddd'},
 
        bgcolor: '#fff',
 
        viewport: true,
 
        cmsettings: {mode: 'text/plain', readOnly: true, lineWrapping: false, lineNumbers: true},
 
        lhs: function(setValue) {
 
            if("${c.node1.is_binary}" == "True"){
 
                setValue('Binary file');
 
            }
 
            else{
 
                $.ajax(orig1_url, {dataType: 'text', success: setValue});
 
            }
 

	
 
        },
 
        rhs: function(setValue) {
 
            if("${c.node2.is_binary}" == "True"){
 
                setValue('Binary file');
 
            }
 
            else{
 
                $.ajax(orig2_url, {dataType: 'text', success: setValue});
 
            }
 
        }
 
    });
 
    // recompute width - avoids overflow and horizontal scrollbar
 
    $('#compare').mergely('resize');
 

	
 
    $('#ignorews').change(function(e){
 
        var val = e.currentTarget.checked;
 
        $('#compare').mergely('options', {ignorews: val});
 
        $('#compare').mergely('update');
 
    });
 
    $('#edit_mode').change(function(e){
 
        var val = !e.currentTarget.checked;
 
        $('#compare').mergely('cm', 'lhs').setOption('readOnly', val);
 
        $('#compare').mergely('cm', 'rhs').setOption('readOnly', val);
 
        $('#compare').mergely('update');
 
    });
 
});
 
</script>
 

	
 
</div>
 
</%def>
kallithea/templates/files/file_diff.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s File Diff') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('File diff')} ${h.show_id(c.changeset_1)} &rarr; ${h.show_id(c.changeset_2)}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div>
 
    ## diff block
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    ${diff_block.diff_block(c.repo_name, 'rev', c.a_rev, c.a_rev,
 
                            c.repo_name, 'rev', c.cs_rev, c.cs_rev, c.file_diff_data)}
 
    </div>
 
</div>
 
</%def>
kallithea/templates/files/files.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Files') % c.repo_name}
 
    %if hasattr(c,'file'):
 
        &middot; ${h.safe_unicode(c.file.path) or '/'}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Files')}
 
    %if c.file:
 
        @ ${h.show_id(c.changeset)}
 
    %endif
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files', c.revision)}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li style="color:white">
 
              ${_("Branch filter:")} ${h.select('branch_selector',c.changeset.raw_id,c.revision_options)}
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table">
 
        <div id="files_data">
 
            <%include file='files_ypjax.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
<script type="text/javascript">
 
var CACHE = {};
 
var CACHE_EXPIRE = 5*60*1000; //cache for 5*60s
 
//used to construct links from the search list
 
var url_base = '${h.url("files_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
//send the nodelist request to this url
 
var node_list_url = '${h.url("files_nodelist_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 
// send the node history requst to this url
 
var node_history_url = '${h.url("files_history_home",repo_name=c.repo_name,revision='__REV__',f_path='__FPATH__')}';
 

	
 
## new pyroutes URLs
 
pyroutes.register('files_nodelist_home', "${h.url('files_nodelist_home', repo_name=c.repo_name,revision='%(revision)s',f_path='%(f_path)s')}", ['revision', 'f_path']);
 
pyroutes.register('files_history_home', "${h.url('files_history_home', repo_name=c.repo_name,revision='%(revision)s',f_path='%(f_path)s')}", ['revision', 'f_path']);
 
pyroutes.register('files_authors_home', "${h.url('files_authors_home', repo_name=c.repo_name,revision='%(revision)s',f_path='%(f_path)s')}", ['revision', 'f_path']);
 

	
 
var ypjax_links = function(){
 
    $('.ypjax-link').click(function(e){
 

	
 
        //don't do ypjax on middle click
 
        if(e.which == 2 || !History.enabled){
 
            return true;
 
        }
 

	
 
        var el = e.currentTarget;
 
        var url = el.href;
 

	
 
        var _base_url = '${h.url("files_home",repo_name=c.repo_name,revision='',f_path='')}';
 
        _base_url = _base_url.replace('//','/');
 

	
 
        //extract rev and the f_path from url.
 
        parts = url.split(_base_url);
 
        if(parts.length != 2){
 
            return false;
 
        }
 

	
 
        var parts2 = parts[1].split('/');
 
        var rev = parts2.shift(); // pop the first element which is the revision
 
        var f_path = parts2.join('/');
 

	
 
        //page title - make this consistent with title mako block above
 
        var title = "${_('%s Files') % c.repo_name}" + " \u00B7 " + (f_path || '/') + " \u00B7 " + "${c.site_name}";
 

	
 
        var _node_list_url = node_list_url.replace('__REV__',rev).replace('__FPATH__', f_path);
 
        var _url_base = url_base.replace('__REV__',rev);
 

	
 
        // Change our States and save some data for handling events
 
        var data = {url:url,title:title, url_base:_url_base,
 
                    node_list_url:_node_list_url, rev:rev, f_path:f_path};
 
        History.pushState(data, title, url);
 

	
 
        //now we're sure that we can do ypjax things
 
        e.preventDefault();
 
        return false;
 
    });
 
}
 

	
 
// callbacks needed to process the ypjax filebrowser
 
var callbacks = function(State){
 
    ypjax_links();
 
    tooltip_activate();
 

	
 
    if(State !== undefined){
 
        //initially loaded stuff
 
        var _f_path = State.data.f_path;
 
        var _rev = State.data.rev;
 

	
 
        fileBrowserListeners(State.url, State.data.node_list_url, State.data.url_base);
 
        // Inform Google Analytics of the change
 
        if ( typeof window.pageTracker !== 'undefined' ) {
 
            window.pageTracker._trackPageview(State.url);
 
        }
 
    }
 

	
 
    function highlight_lines(lines){
 
        for(pos in lines){
 
          $('#L'+lines[pos]).css('background-color','#FFFFBE');
 
        }
 
    }
 
    page_highlights = location.href.substring(location.href.indexOf('#')+1).split('L');
 
    if (page_highlights.length == 2){
 
       highlight_ranges  = page_highlights[1].split(",");
 

	
kallithea/templates/files/files_add.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Files Add') % c.repo_name}
 
</%block>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Add New File')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
          ${h.form(h.url.current(),method='post',id='eform',enctype="multipart/form-data", class_="form-horizontal")}
 
          <h3 class="files_location">
 
            ${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)} /
 
              <span id="filename_container" class="file reviewer_ac">
 
                  <input class="input-small" type="text" value="" size="30" name="filename" id="filename" placeholder="${_('Enter filename...')}">
 
                  <input type="hidden" value="${c.f_path}" size="30" name="location" id="location">
 
                  ${_('or')} <div class="btn btn-default btn-sm" id="upload_file_enable">${_('Upload File')}</div>
 
              </span>
 
              <span id="upload_file_container" class="reviewer_ac" style="display:none">
 
                  <input type="file" size="20" name="upload_file" id="upload_file">
 
                  ${_('or')} <div class="btn btn-default btn-sm" id="file_enable">${_('Create New File')}</div>
 
              </span>
 
          </h3>
 
            <div id="body" class="codeblock">
 
            <div class="code-header" id="mimetype_header">
 
                <label class="commit" for="mimetype">${_('New file type')}</label>
 
                <select id="mimetype" name="mimetype"/>
 
            </div>
 
                <div id="editor_container">
 
                    <pre id="editor_pre"></pre>
 
                    <textarea id="editor" name="content" style="display:none"></textarea>
 
                </div>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")}
 
            </div>
 
            ${h.end_form()}
 
            <script type="text/javascript">
 
                $(document).ready(function(){
 
                    var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path)}";
 
                    var myCodeMirror = initCodeMirror('editor', "${request.script_name}", reset_url);
 

	
 
                    //inject new modes, based on codeMirrors modeInfo object
 
                    var $mimetype_select = $('#mimetype');
 
                    $mimetype_select.each(function(){
 
                        var modes_select = this;
 
                        var index = 1;
 
                        for(var i=0;i<CodeMirror.modeInfo.length;i++){
 
                            var m = CodeMirror.modeInfo[i];
 
                            var opt = new Option(m.name, m.mime);
 
                            $(opt).attr('mode', m.mode);
 
                            if (m.mime == 'text/plain') {
 
                                // default plain text
 
                                $(opt).prop('selected', true);
 
                                modes_select.options[0] = opt;
 
                            } else {
 
                                modes_select.options[index++] = opt;
 
                            }
 
                        }
 
                    });
 
                    var $filename_input = $('#filename');
 
                    $mimetype_select.change(function(e){
 
                        var selected = e.currentTarget;
 
                        var node = selected.options[selected.selectedIndex];
 
                        var detected_mode = CodeMirror.findModeByMIME(node.value);
 
                        setCodeMirrorMode(myCodeMirror, detected_mode);
 

	
 
                        var proposed_ext = CodeMirror.findExtensionByMode(detected_mode);
 
                        var file_data = CodeMirror.getFilenameAndExt($filename_input.val());
 
                        var filename = file_data['filename'] || 'filename1';
 
                        $filename_input.val(filename + '.' + proposed_ext);
 
                    });
 

	
 
                    // on type the new filename set mode
 
                    $filename_input.keyup(function(e){
 
                        var file_data = CodeMirror.getFilenameAndExt(this.value);
 
                        if(file_data['ext'] != null){
 
                            var detected_mode = CodeMirror.findModeByExtension(file_data['ext']) || CodeMirror.findModeByMIME('text/plain');
 
                            if (detected_mode){
 
                                setCodeMirrorMode(myCodeMirror, detected_mode);
 
                                $mimetype_select.val(detected_mode.mime);
 
                            }
 
                        }
 
                    });
 
                });
 
            </script>
 
        </div>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/files/files_delete.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Files Delete') % c.repo_name}
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Delete file')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
            ${h.form(h.url.current(),method='post',class_="form-horizontal")}
 
            <h3 class="files_location">
 
                ${_('Delete file')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.f_path)}
 
            </h3>
 

	
 
            <div id="body" class="codeblock">
 
                <div id="editor_container">
 
                    <pre id="editor_pre"></pre>
 
                    <textarea id="editor" name="content" style="display:none"></textarea>
 
                </div>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 100px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
                ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")}
 
                ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")}
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
    </div>
 
</div>
 
</%def>
kallithea/templates/files/files_edit.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s File Edit') % c.repo_name}
 
</%block>
 

	
 
<%block name="js_extra">
 
  <script type="text/javascript" src="${h.url('/codemirror/lib/codemirror.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/js/codemirror_loadmode.js')}"></script>
 
  <script type="text/javascript" src="${h.url('/codemirror/mode/meta.js')}"></script>
 
</%block>
 
<%block name="css_extra">
 
  <link rel="stylesheet" type="text/css" href="${h.url('/codemirror/lib/codemirror.css')}"/>
 
</%block>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Edit file')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
            <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.raw_id,c.file.path)}</h3>
 
            ${h.form(h.url.current(),method='post',id='eform')}
 
            <div id="body" class="codeblock">
 
            <div class="code-header">
 
                <div class="stats">
 
                    <div class="left"><i class="icon-doc-inv"></i></div>
 
                    <div class="left item">${h.link_to(h.show_id(c.file.changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
 
                    <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
 
                    <div class="left item last">${c.file.mimetype}</div>
 
                    <div class="buttons">
 
                      ${h.link_to(_('Show Annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      ${h.link_to(_('Show as Raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      ${h.link_to(_('Download as Raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                      % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
                       % if not c.file.is_binary:
 
                        ${h.link_to(_('Source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-default btn-xs")}
 
                       % endif
 
                      % endif
 
                    </div>
 
                </div>
 
                <label class="commit" for="mimetype">${_('Editing file')}: ${c.file.unicode_path}</label>
 
                <select id="mimetype" name="mimetype"/>
 
            </div>
 
                <pre id="editor_pre"></pre>
 
                <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
            ${h.submit('commit',_('Commit Changes'),class_="btn btn-success btn-sm")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-default btn-sm")}
 
            </div>
 
            ${h.end_form()}
 
        </div>
 
    </div>
 
</div>
 

	
 
<script type="text/javascript">
 
    $(document).ready(function(){
 
        var reset_url = "${h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.file.path)}";
 
        var myCodeMirror = initCodeMirror('editor', "${request.script_name}", reset_url);
 

	
 
       //inject new modes, based on codeMirrors modeInfo object
 
        var $mimetype_select = $('#mimetype');
 
        $mimetype_select.each(function(){
 
            var modes_select = this;
 
            var index = 1;
 
            for(var i=0;i<CodeMirror.modeInfo.length;i++){
 
                var m = CodeMirror.modeInfo[i];
 
                var opt = new Option(m.name, m.mime);
 
                $(opt).attr('mode', m.mode);
 
                if (m.mime == 'text/plain') {
 
                    // default plain text
 
                    $(opt).prop('selected', true);
 
                    modes_select.options[0] = opt;
 
                } else {
 
                    modes_select.options[index++] = opt;
 
                }
 
            }
 
        });
 
        // try to detect the mode based on the file we edit
 
        var detected_mode = CodeMirror.findModeByExtension("${c.file.extension}");
 
        if(detected_mode){
 
            setCodeMirrorMode(myCodeMirror, detected_mode);
 
            $($mimetype_select.find('option[value="'+detected_mode.mime+'"]')[0]).prop('selected', true);
 
        }
 

	
 
        $mimetype_select.on('change', function(e){
 
            var selected = e.currentTarget;
 
            var node = selected.options[selected.selectedIndex];
 
            var detected_mode = CodeMirror.findModeByMIME(node.value);
 
            setCodeMirrorMode(myCodeMirror, detected_mode);
 
        });
 
    });
 
</script>
 
</%def>
kallithea/templates/followers/followers.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Followers') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Followers')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('followers')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <div id="followers">
 
            <%include file='followers_data.html'/>
 
        </div>
 
    </div>
 
</div>
 
<script type="text/javascript">
 
  $(document).ready(function(){
 
    var $followers = $('#followers');
 
    $followers.on('click','.pager_link',function(e){
 
        asynchtml(e.target.href, $followers, function(){
 
            show_more_event();
 
            tooltip_activate();
 
            show_changeset_tooltip();
 
        });
 
        e.preventDefault();
 
    });
 
  });
 
</script>
 
</%def>
kallithea/templates/forks/forks.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Forks') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Forks')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('showforks')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    <div class="table">
 
        <div id="forks">
 
            <%include file='forks_data.html'/>
 
        </div>
 
    </div>
 
</div>
 
<script type="text/javascript">
 
  $(document).ready(function(){
 
      var $forks = $('#forks');
 
      $forks.on('click','.pager_link',function(e){
 
          asynchtml(e.target.href, $forks, function(){
 
              show_more_event();
 
              tooltip_activate();
 
              show_changeset_tooltip();
 
          });
 
          e.preventDefault();
 
      });
 
  });
 
</script>
 
</%def>
kallithea/templates/index_base.html
Show inline comments
 
<%page args="parent,group_name=''" />
 
    <div class="panel panel-primary">
 
        <!-- box / title -->
 
        <div class="title">
 
        <div class="panel-heading">
 
            %if c.authuser.username != 'default':
 
              <ul class="links">
 
                <li>
 
                <%
 
                    gr_name = c.group.group_name if c.group else None
 
                    # create repositories with write permission on group is set to true
 
                    create_on_write = h.HasPermissionAny('hg.create.write_on_repogroup.true')()
 
                    group_admin = h.HasRepoGroupPermissionAny('group.admin')(gr_name, 'can write into group index page')
 
                    group_write = h.HasRepoGroupPermissionAny('group.write')(gr_name, 'can write into group index page')
 
                %>
 
                %if h.HasPermissionAny('hg.admin','hg.create.repository')() or (group_admin or (group_write and create_on_write)):
 
                  %if c.group:
 
                        <a href="${h.url('new_repo',parent_group=c.group.group_id)}" class="btn btn-default btn-sm"><i class="icon-plus"></i> ${_('Add Repository')}</a>
 
                        %if h.HasPermissionAny('hg.admin')() or h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name):
 
                            <a href="${h.url('new_repos_group', parent_group=c.group.group_id)}" class="btn btn-default btn-sm"><i class="icon-plus"></i> ${_('Add Repository Group')}</a>
 
                        %endif
 
                  %else:
 
                    <a href="${h.url('new_repo')}" class="btn btn-default btn-sm"><i class="icon-plus"></i> ${_('Add Repository')}</a>
 
                    %if h.HasPermissionAny('hg.admin')():
 
                        <a href="${h.url('new_repos_group')}" class="btn btn-default btn-sm"><i class="icon-plus"></i> ${_('Add Repository Group')}</a>
 
                    %endif
 
                  %endif
 
                %endif
 
                %if c.group and h.HasRepoGroupPermissionAny('group.admin')(c.group.group_name):
 
                    <a href="${h.url('edit_repo_group',group_name=c.group.group_name)}" title="${_('You have admin right to this group, and can edit it')}" class="btn btn-default btn-sm"><i class="icon-pencil"></i> ${_('Edit Repository Group')}</a>
 
                %endif
 
                </li>
 
              </ul>
 
            %endif
 
        </div>
 
        <!-- end box / title -->
 
        <div class="table">
 
           % if c.groups:
 
            <div id='groups_list_wrap'>
 
              <table id="groups_list">
 
                  <thead>
 
                      <tr>
 
                          <th class="left">${_('Repository Group Name')}</th>
 
                          <th class="left">${_('Description')}</th>
 
                          ##<th class="left">${_('Number of Repositories')}</th>
 
                      </tr>
 
                  </thead>
 

	
 
                  ## REPO GROUPS
 
                  % for gr in c.groups:
 
                    <tr>
 
                        <td>
 
                            <div class="dt_repo">
 
                              <a href="${url('repos_group_home',group_name=gr.group_name)}">
 
                                <i class="icon-folder"></i>
 
                                <span class="dt_repo_name">${gr.name}</span>
 
                              </a>
 
                            </div>
 
                        </td>
 
                        <td>${h.urlify_text(gr.group_description, stylize=c.visual.stylify_metatags)}</td>
 
                        ## this is commented out since for multi nested repos can be HEAVY!
 
                        ## in number of executed queries during traversing uncomment at will
 
                        ##<td><b>${gr.repositories_recursive_count}</b></td>
 
                    </tr>
 
                  % endfor
 
              </table>
 
            </div>
 
            <hr/>
 
            % endif
 

	
 
            <table id="repos_list_wrap"></table>
 
        </div>
 
    </div>
 

	
 
      <script>
 
        $('#groups_list').DataTable({pageLength: 100});
 

	
 
        var data = ${c.data|n},
 
            $dataTable = $("#repos_list_wrap").DataTable({
 
                data: data.records,
 
                columns: [
 
                    {data: "raw_name", visible: false, searchable: false},
 
                    {title: "${_('Repository Name')}", data: "name", orderData: 1, render: {
 
                        filter: function(data) {
 
                            return $(data).find(".dt_repo_name").text();
 
                        }
 
                    }},
 
                    {data: "desc", title: "${_('Description')}", searchable: false},
 
                    {data: "last_change_iso", visible: false, searchable: false},
 
                    {data: "last_change", title: "${_('Last Change')}", orderData: 4, searchable: false},
 
                    {data: "last_rev_raw", visible: false, searchable: false},
 
                    {data: "last_changeset", title: "${_('Tip')}", orderData: 6, searchable: false},
 
                    {data: "owner", title: "${_('Owner')}", searchable: false},
 
                    {data: "atom", sortable: false}
 
                ],
 
                order: [[1, "asc"]],
 
                pageLength: 100
 
            });
 
      </script>
kallithea/templates/journal/journal.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%block name="title">
 
    ${_('Journal')}
 
</%block>
 
<%def name="breadcrumbs()">
 
    <h5>
 
    <form id="filter_form">
 
    <input class="q_filter_box ${'' if c.search_term else 'initial'}" id="j_filter" size="15" type="text" name="filter" value="${c.search_term or _('quick filter...')}"/>
 
    <span class="tooltip" title="${h.journal_filter_help()}">?</span>
 
    <input type='submit' value="${_('Filter')}" class="btn btn-default btn-sm" style="padding:0px 2px 0px 2px;margin:0px"/>
 
    ${_('Journal')} - ${ungettext('%s Entry', '%s Entries', c.journal_pager.item_count) % (c.journal_pager.item_count)}
 
    </form>
 
    ${h.end_form()}
 
    </h5>
 
</%def>
 
<%block name="header_menu">
 
    ${self.menu('journal')}
 
</%block>
 
<%block name="head_extra">
 
  <link href="${h.url('journal_atom', api_key=c.authuser.api_key)}" rel="alternate" title="${_('ATOM journal feed')}" type="application/atom+xml" />
 
  <link href="${h.url('journal_rss', api_key=c.authuser.api_key)}" rel="alternate" title="${_('RSS journal feed')}" type="application/rss+xml" />
 
</%block>
 

	
 
<%def name="main()">
 
    <div class="panel panel-primary">
 
        <!-- box / title -->
 
        <div class="title">
 
        <div class="panel-heading">
 
         ${self.breadcrumbs()}
 
         <ul class="links icon-only-links">
 
           <li>
 
             <a href="${h.url('my_account_watched')}"><i class="icon-eye"></i> ${_('Watched Repositories')}</a>
 
           </li>
 
           <li>
 
             <a href="${h.url('my_account_repos')}"><i class="icon-database"></i> ${_('My Repositories')}</a>
 
           </li>
 
           <li>
 
             <span><a id="refresh" href="${h.url('journal')}"><i class="icon-arrows-cw"></i></a></span>
 
           </li>
 
           <li>
 
             <span><a href="${h.url('journal_atom', api_key=c.authuser.api_key)}"><i class="icon-rss-squared"></i></a></span>
 
           </li>
 
         </ul>
 
        </div>
 
        <div id="journal">
 
            <%include file='journal_data.html'/>
 
        </div>
 
    </div>
 

	
 
<script type="text/javascript">
 

	
 
    $('#j_filter').click(function(){
 
        var $jfilter = $('#j_filter');
 
        if($jfilter.hasClass('initial')){
 
            $jfilter.val('');
 
        }
 
    });
 
    var fix_j_filter_width = function(len){
 
        $('#j_filter').css('width', Math.max(80, len*6.50)+'px');
 
    };
 
    $('#j_filter').keyup(function(){
 
        fix_j_filter_width($('#j_filter').val().length);
 
    });
 
    $('#filter_form').submit(function(e){
 
        e.preventDefault();
 
        var val = $('#j_filter').val();
 
        window.location = "${url.current(filter='__FILTER__')}".replace('__FILTER__',val);
 
    });
 
    fix_j_filter_width($('#j_filter').val().length);
 

	
 
    $('#refresh').click(function(e){
 
        asynchtml("${h.url.current(filter=c.search_term)}", $("#journal"), function(){
 
            show_more_event();
 
            tooltip_activate();
 
            show_changeset_tooltip();
 
            });
 
        e.preventDefault();
 
    });
 

	
 
</script>
 

	
 
<script type="text/javascript">
 
    $(document).ready(function(){
 
        var $journal = $('#journal');
 
        $journal.on('click','.pager_link',function(e){
 
            asynchtml(e.target.href, $journal, function(){
 
                show_more_event();
 
                tooltip_activate();
 
                show_changeset_tooltip();
 
            });
 
            e.preventDefault();
 
        });
 
        $('#journal').on('click','.show_more',function(e){
 
            var el = e.target;
 
            $('#'+el.id.substring(1)).show();
 
            $(el.parentNode).hide();
 
        });
 
    });
 
</script>
 
</%def>
kallithea/templates/journal/public_journal.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 
<%block name="title">
 
    ${_('Public Journal')}
 
</%block>
 
<%def name="breadcrumbs()">
 
    ${c.site_name}
 
</%def>
 
<%block name="header_menu">
 
    ${self.menu('journal')}
 
</%block>
 
<%block name="head_extra">
 
  <link href="${h.url('public_journal_atom')}" rel="alternate" title="${_('ATOM public journal feed')}" type="application/atom+xml" />
 
  <link href="${h.url('public_journal_rss')}" rel="alternate" title="${_('RSS public journal feed')}" type="application/rss+xml" />
 
</%block>
 
<%def name="main()">
 

	
 
<div class="panel panel-primary">
 
  <!-- box / title -->
 
  <div class="title">
 
  <div class="panel-heading">
 
    <h5>${_('Public Journal')}</h5>
 
    <ul class="links icon-only-links">
 
      <li>
 
        <span>
 
          <a href="${h.url('public_journal_atom')}"><i class="icon-rss-squared"></i></a>
 
        </span>
 
      </li>
 
    </ul>
 
  </div>
 

	
 
  <div id="journal">
 
    <%include file='journal_data.html'/>
 
  </div>
 
</div>
 

	
 
</%def>
kallithea/templates/password_reset.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Password Reset')}
 
</%block>
 

	
 
<div id="register">
 
    <%include file="/base/flash_msg.html"/>
 
    <div class="title withlogo">
 
    <div class="panel-heading withlogo">
 
        %if c.site_name:
 
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Reset Your Password')}</h5>
 
        %endif
 
    </div>
 
    <div class="inner">
 
        ${h.form(url('password_reset'))}
 
        <div class="form">
 
            <!-- fields -->
 
            <div class="fields">
 

	
 
                 <div class="field">
 
                    <div class="label">
 
                        <label for="email">${_('Email Address')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('email')}
 
                    </div>
 
                 </div>
 

	
 
                %if c.captcha_active:
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="email">${_('Captcha')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.hidden('recaptcha_field')}
 
                        <div id="recaptcha"></div>
 
                    </div>
 
                </div>
 
                %endif
 

	
 
                <div class="buttons">
 
                    <div class="nohighlight">
 
                      ${h.submit('send',_('Send Password Reset Email'),class_="btn btn-default")}
 
                          <div class="activation_msg">${_('A password reset link will be sent to the specified email address if it is registered in the system.')}</div>
 
                    </div>
 
                </div>
 
            </div>
 
        </div>
 
        ${h.end_form()}
 
        %if c.captcha_active:
 
        <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
 
        %endif
 
        <script type="text/javascript">
 
         $(document).ready(function(){
 
            $('#email').focus();
 
            %if c.captcha_active:
 
            Recaptcha.create("${c.captcha_public_key}", "recaptcha",
 
                {
 
                  theme: "white"
 
                }
 
            );
 
            %endif
 
         });
 
        </script>
 
    </div>
 
   </div>
kallithea/templates/password_reset_confirmation.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Reset Your Password')}
 
</%block>
 

	
 
<div id="register">
 
    <%include file="/base/flash_msg.html"/>
 
    <div class="title withlogo">
 
    <div class="panel-heading withlogo">
 
        %if c.site_name:
 
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Reset Your Password')}</h5>
 
        %endif
 
    </div>
 
    <div class="inner">
 
        ${h.form(h.url('reset_password_confirmation'), method='post')}
 
        <p>${_('You are about to set a new password for the email address %s.') % c.email}</p>
 
        <p>${_('Note that you must use the same browser session for this as the one used to request the password reset.')}</p>
 
        <div style="display: none;">
 
            ${h.hidden('email')}
 
            ${h.hidden('timestamp')}
 
        </div>
 
        <div class="form">
 
            <!-- fields -->
 
            <div class="fields">
 
                 <div class="field">
 
                    <div class="label">
 
                        <label for="token">${_('Code you received in the email')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('token', class_='focus')}
 
                    </div>
 
                 </div>
 

	
 
                 <div class="field">
 
                    <div class="label">
 
                        <label for="password">${_('New Password')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.password('password',class_='focus')}
 
                    </div>
 
                 </div>
 

	
 
                 <div class="field">
 
                    <div class="label">
 
                        <label for="password_confirm">${_('Confirm New Password')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.password('password_confirm',class_='focus')}
 
                    </div>
 
                 </div>
 
                <div class="buttons">
 
                    <div class="nohighlight">
 
                      ${h.submit('send',_('Confirm'),class_="btn btn-default")}
 
                    </div>
 
                </div>
 
            </div>
 
        </div>
 
        ${h.end_form()}
 
    </div>
 
   </div>
kallithea/templates/pullrequests/pullrequest.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${c.repo_name} ${_('New Pull Request')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('New Pull Request')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('showpullrequest')}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    ${h.form(url('pullrequest', repo_name=c.repo_name), method='post', id='pull_request_form')}
 
    <div class="form">
 
        <!-- fields -->
 

	
 
        <div class="fields" style="float:left;width:50%;padding-right:30px;">
 

	
 
             <div class="field">
 
                <div class="label">
 
                    <label for="pullrequest_title">${_('Title')}:</label>
 
                </div>
 
                <div class="input">
 
                    ${h.text('pullrequest_title',class_="large",placeholder=_('Summarize the changes - or leave empty'))}
 
                </div>
 
             </div>
 

	
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="pullrequest_desc">${_('Description')}:</label>
 
                </div>
 
                <div class="textarea text-area editor">
 
                    ${h.textarea('pullrequest_desc',size=30,placeholder=_('Write a short description on this pull request'))}
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label label-textarea">
 
                    <label for="pullrequest_desc">${_('Changeset flow')}:</label>
 
                </div>
 
                <div class="input">
 
                    ##ORG
 
                    <div>
 
                        <div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Origin repository')}:</b> <span id="org_repo_desc">${c.db_repo.description.split('\n')[0]}</span>
 
                            </div>
 
                            <div>
 
                            ${h.select('org_repo','',c.cs_repos,class_='refs')}:${h.select('org_ref',c.default_cs_ref,c.cs_refs,class_='refs')}
 
                            </div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Revision')}:</b> <span id="org_rev_span">-</span>
 
                            </div>
 
                        </div>
 
                    </div>
 

	
 
                    ##OTHER, most Probably the PARENT OF THIS FORK
 
                    <div style="border-top: 1px solid #EEE; margin: 5px 0px 0px 0px">
 
                        <div>
 
                            ## filled with JS
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Destination repository')}:</b> <span id="other_repo_desc">${c.a_repo.description.split('\n')[0]}</span>
 
                            </div>
 
                            <div>
 
                            ${h.select('other_repo',c.a_repo.repo_name,c.a_repos,class_='refs')}:${h.select('other_ref',c.default_a_ref,c.a_refs,class_='refs')}
 
                            </div>
 
                            <div style="padding:5px 3px 3px 3px;">
 
                            <b>${_('Revision')}:</b> <span id="other_rev_span">-</span>
 
                            </div>
 
                        </div>
 
                    </div>
 
                    <div style="clear:both"></div>
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="buttons">
 
                    ${h.submit('save',_('Create Pull Request'),class_="btn btn-default")}
 
                    ${h.reset('reset',_('Reset'),class_="btn btn-default")}
 
               </div>
 
            </div>
 

	
 
        </div>
 

	
 
        <div style="clear:both;padding: 0 0 30px 0;"></div>
 

	
 
        <h4>${_('Changesets')}</h4>
 
        <div style="float:left;padding:0px 30px 30px 30px">
 
           ## overview pulled by ajax
 
           <div style="float:left" id="pull_request_overview"></div>
 
        </div>
 
        <div style="clear:both;"></div>
 

	
 
    </div>
 

	
 
    ${h.end_form()}
 

	
 
</div>
 

	
 
<script type="text/javascript" src="${h.url('/js/graph.js', ver=c.kallithea_version)}"></script>
 
<script type="text/javascript">
 
  pyroutes.register('pullrequest_repo_info', "${url('pullrequest_repo_info',repo_name='%(repo_name)s')}", ['repo_name']);
 

	
 
  var pendingajax = undefined;
 
  var otherrepoChanged = function(){
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Pull Request %s') % (c.repo_name, c.pull_request.nice_id())}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Pull request %s from %s#%s') % (c.pull_request.nice_id(), c.pull_request.org_repo.repo_name, c.cs_branch_name)}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
<% editable = not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.owner_id == c.authuser.user_id) %>
 
${self.repo_context_bar('showpullrequest')}
 
<div class="panel panel-primary">
 
  <!-- box / title -->
 
  <div class="title">
 
  <div class="panel-heading">
 
    ${self.breadcrumbs()}
 
  </div>
 

	
 
  ${h.form(url('pullrequest_post', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), method='post', id='pull_request_form')}
 
    <div class="form pr-box" style="float: left">
 
      <div class="pr-details-title ${'closed' if c.pull_request.is_closed() else ''}">
 
          ${_('Title')}: ${c.pull_request.title}
 
          %if c.pull_request.is_closed():
 
              (${_('Closed')})
 
          %endif
 
      </div>
 
      <div id="pr-summary" class="fields">
 

	
 
        <div class="field pr-not-edit" style="min-height:37px">
 
          <div class="label-summary">
 
            <label>${_('Description')}:</label>
 
            %if editable:
 
            <div style="margin: 5px">
 
              <a class="btn btn-default btn-sm" onclick="$('.pr-do-edit').show();$('.pr-not-edit').hide()">${_("Edit")}</a>
 
            </div>
 
            %endif
 
          </div>
 
          <div class="input">
 
            <div class="formatted-fixed">${h.urlify_text(c.pull_request.description, c.pull_request.org_repo.repo_name)}</div>
 
          </div>
 
        </div>
 

	
 
        %if editable:
 
        <div class="pr-do-edit" style="display:none">
 
          <div class="field">
 
              <div class="label-summary">
 
                  <label for="pullrequest_title">${_('Title')}:</label>
 
              </div>
 
              <div class="input">
 
                  ${h.text('pullrequest_title',class_="large",value=c.pull_request.title,placeholder=_('Summarize the changes'))}
 
              </div>
 
          </div>
 

	
 
          <div class="field">
 
              <div class="label-summary label-textarea">
 
                  <label for="pullrequest_desc">${_('Description')}:</label>
 
              </div>
 
              <div class="textarea text-area editor">
 
                  ${h.textarea('pullrequest_desc',size=30,content=c.pull_request.description,placeholder=_('Write a short description on this pull request'))}
 
              </div>
 
          </div>
 
        </div>
 
        %endif
 

	
 
        <div class="field">
 
          <div class="label-summary">
 
              <label>${_('Reviewer voting result')}:</label>
 
          </div>
 
          <div class="input">
 
            <div class="changeset-status-container" style="float:none;clear:both">
 
            %if c.current_voting_result:
 
              <span class="changeset-status-ico" style="padding:0px 4px 0px 0px">
 
                  <i class="icon-circle changeset-status-${c.current_voting_result}" title="${_('Pull request status calculated from votes')}"></i></span>
 
              <span class="changeset-status-lbl tooltip" title="${_('Pull request status calculated from votes')}">
 
                %if c.pull_request.is_closed():
 
                    ${_('Closed')},
 
                %endif
 
                ${h.changeset_status_lbl(c.current_voting_result)}
 
              </span>
 
            %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div class="field">
 
          <div class="label-summary">
 
              <label>${_('Still not reviewed by')}:</label>
 
          </div>
 
          <div class="input">
 
            % if len(c.pull_request_pending_reviewers) > 0:
 
                <div class="tooltip" title="${', '.join([x.username for x in c.pull_request_pending_reviewers])}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
 
            % elif len(c.pull_request_reviewers) > 0:
 
                <div>${_('Pull request was reviewed by all reviewers')}</div>
 
            %else:
 
                <div>${_('There are no reviewers')}</div>
 
            %endif
 
          </div>
 
        </div>
 
        <div class="field">
 
          <div class="label-summary">
 
              <label>${_('Origin')}:</label>
 
          </div>
 
          <div class="input">
 
            <div>
 
              ${h.link_to_ref(c.pull_request.org_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)}
 
              %if c.cs_ref_type != 'branch':
 
                ${_('on')} ${h.link_to_ref(c.pull_request.org_repo.repo_name, 'branch', c.cs_branch_name)}
 
              %endif
 
            </div>
 
          </div>
 
        </div>
 
        <div class="field">
 
@@ -208,193 +208,193 @@ ${self.repo_context_bar('showpullrequest
 
                          <div class="message" style="white-space:normal; height:1.1em; max-width: 500px; padding:0">${h.urlify_text(cs.message, c.repo_name)}</div>
 
                        </td>
 
                      %endif
 
                    </tr>
 
                  %endfor
 
                </table>
 
              </div>
 
              <div class="msg-div">(${_("Pull request iterations do not change content once created. Select a revision and save to make a new iteration.")})</div>
 
              %endif
 
              <div class="msg-div">${c.update_msg_other}</div>
 
            </div>
 
        </div>
 
      </div>
 
    </div>
 
    ## REVIEWERS
 
    <div style="float:left; border-left:1px dashed #eee">
 
        <div class="pr-details-title">${_('Pull Request Reviewers')}</div>
 
        <div id="reviewers" style="padding:0px 0px 5px 10px">
 
          ## members goes here !
 
          <div>
 
            <ul id="review_members">
 
            %for member,status in c.pull_request_reviewers:
 
              ## WARNING: the HTML below is duplicate with
 
              ## kallithea/public/js/base.js
 
              ## If you change something here it should be reflected in the template too.
 
              <li id="reviewer_${member.user_id}">
 
                <div class="reviewers_member">
 
                    <div class="reviewer_status tooltip" title="${h.changeset_status_lbl(status)}">
 
                      <i class="icon-circle changeset-status-${status}"></i>
 
                    </div>
 
                  ${h.gravatar_div(member.email, size=14, div_class="reviewer_gravatar gravatar")}
 
                  <div style="float:left;">
 
                    ${member.full_name_and_username}
 
                    %if c.pull_request.owner_id == member.user_id:
 
                      (${_('Owner')})
 
                    %endif
 
                  </div>
 
                  <input type="hidden" value="${member.user_id}" name="review_members" />
 
                  %if editable:
 
                  <div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id})" title="${_('Remove reviewer')}">
 
                      <i class="icon-minus-circled"></i>
 
                  </div>
 
                  %endif
 
                </div>
 
              </li>
 
            %endfor
 
            </ul>
 
          </div>
 
          %if editable:
 
          <div class='ac'>
 
            <div class="reviewer_ac">
 
               ${h.text('user', class_='yui-ac-input',placeholder=_('Type name of reviewer to add'))}
 
               <div id="reviewers_container"></div>
 
            </div>
 
          </div>
 
          %endif
 
        </div>
 

	
 
        %if not c.pull_request_reviewers:
 
        <div class="pr-details-title">${_('Potential Reviewers')}</div>
 
        <div style="margin: 10px 0 10px 10px; max-width: 250px">
 
          <div>
 
            ${_('Click to add the repository owner as reviewer:')}
 
          </div>
 
          <ul style="margin-top: 10px">
 
            %for u in [c.pull_request.other_repo.owner]:
 
              <li>
 
                <a class="missing_reviewer missing_reviewer_${u.user_id}"
 
                  user_id="${u.user_id}"
 
                  fname="${u.name}"
 
                  lname="${u.lastname}"
 
                  nname="${u.username}"
 
                  gravatar_lnk="${h.gravatar_url(u.email, size=28, default='default')}"
 
                  gravatar_size="14"
 
                  title="Click to add reviewer to the list, then Save Changes.">${u.full_name}</a>
 
              </li>
 
            %endfor
 
          </ul>
 
        </div>
 
        %endif
 
    </div>
 
    <div class="form" style="clear:both">
 
      <div class="fields">
 
        %if editable:
 
          <div class="buttons">
 
            ${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")}
 
            ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')}
 
            ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
 
          </div>
 
        %endif
 
      </div>
 
    </div>
 
  ${h.end_form()}
 
</div>
 

	
 
<div class="panel panel-primary">
 
    <div class="title">
 
    <div class="panel-heading">
 
      <div class="breadcrumbs">${_('Pull Request Content')}</div>
 
    </div>
 
    <div class="table">
 
          <div id="changeset_compare_view_content">
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
                  ${comment.comment_count(c.inline_cnt, len(c.comments))}
 
              </div>
 
              ##CS
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
                ${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}
 
              </div>
 
              <%include file="/compare/compare_cs.html" />
 

	
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
              ${_('Common ancestor')}:
 
              ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev), class_="changeset_hash")}
 
              </div>
 

	
 
              ## FILES
 
              <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 

	
 
              % if c.limited_diff:
 
                  ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}:
 
              % else:
 
                  ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}:
 
              %endif
 

	
 
              </div>
 
              <div class="cs_files">
 
                %if not c.file_diff_data:
 
                   <span class="empty_data">${_('No files')}</span>
 
                %endif
 
                %for fid, (url_fid, op, a_path, path, diff, stats) in c.file_diff_data.iteritems():
 
                    <div class="cs_${op}">
 
                      <div class="node">
 
                          <i class="icon-diff-${op}"></i>
 
                          ${h.link_to(h.safe_unicode(path), '#%s' % fid)}
 
                      </div>
 
                      <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                    </div>
 
                %endfor
 
                %if c.limited_diff:
 
                  <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h5>
 
                %endif
 
              </div>
 
          </div>
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${c.users_array|n};
 
    var _GROUPS_AC_DATA = ${c.user_groups_array|n};
 
    // TODO: switch this to pyroutes
 
    AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
 
    AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
 

	
 
    pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']);
 
    pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']);
 

	
 
    </script>
 

	
 
    ## diff block
 
    <div class="commentable-diff">
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    ${diff_block.diff_block(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name, c.a_rev,
 
                            c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev, c.file_diff_data)}
 
    % if c.limited_diff:
 
      <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h4>
 
    % endif
 
    </div>
 

	
 
    ## template for inline comment form
 
    ${comment.comment_inline_form()}
 

	
 
    ## render comments and inlines
 
    ${comment.generate_comments()}
 

	
 
    ## main comment form and it status
 
    ${comment.comments(change_status=c.allowed_to_change_status)}
 

	
 
    <script type="text/javascript">
 
      $(document).ready(function(){
 
          PullRequestAutoComplete($('#user'), $('#reviewers_container'), _USERS_AC_DATA);
 
          SimpleUserAutoComplete($('#owner'), $('#owner_completion_container'), _USERS_AC_DATA);
 

	
 
          $('.code-difftable').on('click', '.add-bubble', function(e){
 
              show_comment_form($(this));
 
          });
 

	
 
          var avail_jsdata = ${c.avail_jsdata|n};
 
          var avail_r = new BranchRenderer('avail_graph_canvas', 'updaterevs-table', 'chg_available_');
 
          avail_r.render(avail_jsdata,40);
 

	
 
          move_comments($(".comments .comments-list-chunk"));
 

	
 
          $('#updaterevs input').change(function(e){
 
              var update = !!e.target.value;
kallithea/templates/pullrequests/pullrequest_show_all.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%namespace name="pullrequest_data" file="pullrequest_data.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Pull Requests') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
%if c.from_:
 
    ${_("Pull Requests from '%s'") % c.repo_name}
 
%else:
 
    ${_("Pull Requests to '%s'") % c.repo_name}
 
%endif
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('showpullrequest')}
 

	
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
          <li>
 
             %if c.authuser.username != 'default':
 
              <span>
 
                  <a id="open_new_pr" class="btn btn-success btn-sm" href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-plus"></i> ${_('Open New Pull Request')}</a>
 
              </span>
 
             %endif
 
              <span>
 
                %if c.from_:
 
                    <a class="btn btn-default btn-sm" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed)}"><i class="icon-git-compare"></i> ${_('Show Pull Requests to %s') % c.repo_name}</a>
 
                %else:
 
                    <a class="btn btn-default btn-sm" href="${h.url('pullrequest_show_all',repo_name=c.repo_name,closed=c.closed,from_=1)}"><i class="icon-git-compare"></i> ${_("Show Pull Requests from '%s'") % c.repo_name}</a>
 
                %endif
 
              </span>
 
          </li>
 
        </ul>
 
    </div>
 

	
 
    <div class="normal-indent">
 
        <div>
 
        %if c.closed:
 
            ${h.link_to(_('Hide closed pull requests (only show open pull requests)'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_))}
 
        %else:
 
            ${h.link_to(_('Show closed pull requests (in addition to open pull requests)'), h.url('pullrequest_show_all',repo_name=c.repo_name,from_=c.from_,closed=1))}
 
        %endif
 
        </div>
 
    </div>
 

	
 
    ${pullrequest_data.pullrequest_overview(c.pullrequests_pager)}
 

	
 
</div>
 
</%def>
kallithea/templates/pullrequests/pullrequest_show_my.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%namespace name="pullrequest_data" file="pullrequest_data.html"/>
 

	
 
<%block name="title">
 
    ${_('My Pull Requests')}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('My Pull Requests')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('my_pullrequests')}
 
</%block>
 

	
 
<%def name="main()">
 

	
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="normal-indent">
 
        <div>
 
        %if c.closed:
 
            ${h.link_to(_('Hide closed pull requests (only show open pull requests)'), h.url('my_pullrequests'))}
 
        %else:
 
            ${h.link_to(_('Show closed pull requests (in addition to open pull requests)'), h.url('my_pullrequests',closed=1))}
 
        %endif
 
        </div>
 
    </div>
 

	
 
    <div class="pullrequests_section_head">${_('Pull Requests Created by Me')}</div>
 
    ${pullrequest_data.pullrequest_overview(c.my_pull_requests)}
 

	
 
    <div class="pullrequests_section_head" style="clear:both">${_('Pull Requests Needing My Review')}</div>
 
    ${pullrequest_data.pullrequest_overview(c.participate_in_pull_requests_todo)}
 

	
 
    <div class="pullrequests_section_head" style="clear:both">${_('Pull Requests I Participate In')}</div>
 
    ${pullrequest_data.pullrequest_overview(c.participate_in_pull_requests)}
 

	
 
</div>
 
</%def>
kallithea/templates/register.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="base/root.html"/>
 

	
 
<%block name="title">
 
    ${_('Sign Up')}
 
</%block>
 

	
 
<div id="register">
 
    <%include file="/base/flash_msg.html"/>
 
    <div class="title withlogo">
 
    <div class="panel-heading withlogo">
 
        %if c.site_name:
 
            <h5>${_('Sign Up to %s') % c.site_name}</h5>
 
        %else:
 
            <h5>${_('Sign Up')}</h5>
 
        %endif
 
    </div>
 
    <div class="inner">
 
        ${h.form(url('register'))}
 
        <div class="form">
 
            <!-- fields -->
 
            <div class="fields">
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="username">${_('Username')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('username',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="password">${_('Password')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.password('password',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="password_confirmation">${_('Re-enter password')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.password('password_confirmation',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="firstname">${_('First Name')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('firstname',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="lastname">${_('Last Name')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('lastname',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="email">${_('Email')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.text('email',class_="medium")}
 
                    </div>
 
                </div>
 

	
 
                %if c.captcha_active:
 
                <div class="field">
 
                    <div class="label">
 
                        <label for="email">${_('Captcha')}:</label>
 
                    </div>
 
                    <div class="input">
 
                        ${h.hidden('recaptcha_field')}
 
                        <div id="recaptcha"></div>
 
                    </div>
 
                </div>
 
                %endif
 

	
 
                <div class="buttons">
 
                    <div class="nohighlight">
 
                      ${h.submit('sign_up',_('Sign Up'),class_="btn btn-default")}
 
                      %if c.auto_active:
 
                          <div class="activation_msg">${_('Registered accounts are ready to use and need no further action.')}</div>
 
                      %else:
 
                          <div class="activation_msg">${_('Please wait for an administrator to activate your account.')}</div>
 
                      %endif
 
                    </div>
 
                </div>
 
            </div>
 
        </div>
 
        ${h.end_form()}
 
        %if c.captcha_active:
 
        <script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
 
        %endif
 
        <script type="text/javascript">
 
        $(document).ready(function(){
 
            $('#username').focus();
kallithea/templates/search/search.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    %if c.repo_name:
 
        ${_('%s Search') % c.repo_name}
 
    %else:
 
        ${_('Search in All Repositories')}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
  %if c.repo_name:
 
    ${_('Search')}
 
  %else:
 
    ${_('Search in All Repositories')}
 
  %endif
 
  %if c.cur_query:
 
    &raquo;
 
    ${c.cur_query}
 
  %endif
 
</%def>
 

	
 
<%block name="header_menu">
 
    %if c.repo_name:
 
    ${self.menu('repositories')}
 
    %else:
 
    ${self.menu('search')}
 
    %endif
 
</%block>
 
<%def name="main()">
 
%if c.repo_name:
 
${self.repo_context_bar('options')}
 
%endif
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    %if c.repo_name:
 
        ${h.form(h.url('search_repo',repo_name=c.repo_name),method='get')}
 
    %else:
 
        ${h.form(h.url('search'),method='get')}
 
    %endif
 
    <div class="form">
 
        <div class="fields">
 
            <div class="field field-first field-noborder">
 
             <div class="label">
 
                 <label for="q">${_('Search term')}:</label>
 
             </div>
 
                <div class="input">${h.text('q',c.cur_query,class_="small")}
 
                    <div class="button highlight">
 
                        <input type="submit" value="${_('Search')}" class="btn"/>
 
                    </div>
 
                </div>
 
                <div style="font-weight: bold;clear:both;margin-left:200px">${c.runtime}</div>
 
            </div>
 

	
 
            <div class="field">
 
                <div class="label">
 
                    <label for="type">${_('Search in')}:</label>
 
                </div>
 
                <div class="select">
 
                    ${h.select('type',c.cur_type,[('content',_('File contents')),
 
                        ('commit',_('Commit messages')),
 
                        ('path',_('File names')),
 
                        ##('repository',_('Repository names')),
 
                        ])}
 
                </div>
 
             </div>
 

	
 
        </div>
 
    </div>
 
    ${h.end_form()}
 
    <div class="search">
 
    %if c.cur_type == 'content':
 
        <%include file='search_content.html'/>
 
    %elif c.cur_type == 'path':
 
        <%include file='search_path.html'/>
 
    %elif c.cur_type == 'commit':
 
        <%include file='search_commit.html'/>
 
    %elif c.cur_type == 'repository':
 
        <%include file='search_repository.html'/>
 
    %endif
 
    </div>
 
</div>
 

	
 
</%def>
kallithea/templates/summary/statistics.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Statistics') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Statistics')}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%block name="head_extra">
 
  <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
 
  <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('summary')}
 
    <%
 
    summary = lambda n:{False:'summary-short'}.get(n)
 
    %>
 
    <div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div class="graph">
 
         <div style="padding:0 10px 10px 17px;">
 
         %if c.no_data:
 
           ${c.no_data_msg}
 
           %if h.HasPermissionAny('hg.admin')('enable stats on from summary'):
 
                ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name),class_="btn btn-default btn-xs")}
 
           %endif
 
        %else:
 
            ${_('Stats gathered: ')} ${c.stats_percentage}%
 
        %endif
 
        </div>
 
        <div id="commit_history" style="width:450px;height:300px;float:left"></div>
 

	
 
        <div id="legend_data" style="float: left;">
 
            <div id="legend_container"></div>
 
            <div id="legend_choices">
 
                <table id="legend_choices_tables" class="noborder" style="font-size:smaller;color:#545454"></table>
 
            </div>
 
        </div>
 

	
 
        <div style="clear: both; height: 10px;"></div>
 
        <div id="overview" style="width: 450px; height: 100px; float: left;"></div>
 
    </div>
 
</div>
 

	
 
<script type="text/javascript">
 
var data = ${c.trending_languages|n};
 
var total = 0;
 
var no_data = true;
 
var tbl = document.createElement('table');
 
tbl.setAttribute('class','trending_language_tbl');
 
var cnt = 0;
 
for (var i=0;i<data.length;i++){
 
    total+= data[i][1].count;
 
}
 
for (var i=0;i<data.length;i++){
 
    cnt += 1;
 
    no_data = false;
 

	
 
    var hide = cnt>2;
 
    var tr = document.createElement('tr');
 
    if (hide){
 
        tr.setAttribute('style','display:none');
 
        tr.setAttribute('class','stats_hidden');
 
    }
 
    var k = data[i][0];
 
    var obj = data[i][1];
 
    var percentage = Math.round((obj.count/total*100),2);
 

	
 
    var td1 = document.createElement('td');
 
    td1.width = 150;
 
    var trending_language_label = document.createElement('div');
 
    trending_language_label.innerHTML = obj.desc+" ("+k+")";
 
    td1.appendChild(trending_language_label);
 

	
 
    var td2 = document.createElement('td');
 
    td2.setAttribute('style','padding-right:14px !important');
 
    var trending_language = document.createElement('div');
 
    var nr_files = obj.count+" ${_('files')}";
 

	
 
    trending_language.title = k+" "+nr_files;
 

	
 
    if (percentage>22){
 
        trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
 
    }
 
    else{
 
        trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
 
    }
 

	
 
    trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
 
    trending_language.style.width=percentage+"%";
 
    td2.appendChild(trending_language);
 

	
 
    tr.appendChild(td1);
 
    tr.appendChild(td2);
 
    tbl.appendChild(tr);
 
    if(cnt == 3){
 
        var show_more = document.createElement('tr');
 
        var td = document.createElement('td');
 
        lnk = document.createElement('a');
 

	
 
        lnk.href='#';
 
        lnk.innerHTML = "${_('Show more')}";
 
        lnk.id='code_stats_show_more';
 
        td.appendChild(lnk);
 

	
 
        show_more.appendChild(td);
 
        show_more.appendChild(document.createElement('td'));
 
        tbl.appendChild(show_more);
 
    }
 

	
 
}
 

	
kallithea/templates/summary/summary.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    ${_('%s Summary') % c.repo_name}
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Summary')}
 

	
 
    ## locking icon
 
    %if c.db_repo.enable_locking:
 
     %if c.db_repo.locked[0]:
 
       <span class="locking_locked tooltip icon-block" title="${_('Repository locked by %s') % h.person_by_id(c.db_repo.locked[0])}"></span>
 
     %else:
 
       <span class="locking_unlocked tooltip icon-ok" title="${_('Repository unlocked')}"></span>
 
     %endif
 
    %endif
 

	
 
    ##FORK
 
    %if c.db_repo.fork:
 
    <span>
 
        - <i class="icon-fork"></i> ${_('Fork of')} "<a href="${h.url('summary_home',repo_name=c.db_repo.fork.repo_name)}">${c.db_repo.fork.repo_name}</a>"
 
    </span>
 
    %endif
 

	
 
    ##REMOTE
 
    %if c.db_repo.clone_uri:
 
    <span>
 
       - <i class="icon-fork"></i> ${_('Clone from')} "<a href="${h.url(str(h.hide_credentials(c.db_repo.clone_uri)))}">${h.hide_credentials(c.db_repo.clone_uri)}</a>"
 
    <span>
 
    %endif
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('repositories')}
 
</%block>
 

	
 
<%block name="head_extra">
 
  <link href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
 
  <link href="${h.url('rss_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />
 

	
 
  <script>
 
  redirect_hash_branch = function(){
 
    var branch = window.location.hash.replace(/^#(.*)/, '$1');
 
    if (branch){
 
      window.location = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"
 
        .replace('__BRANCH__',branch);
 
    }
 
  }
 
  redirect_hash_branch();
 
  window.onhashchange = function() {
 
    redirect_hash_branch();
 
  };
 
  </script>
 
</%block>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('summary')}
 
<%
 
summary = lambda n:{False:'summary-short'}.get(n)
 
%>
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="title">
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <!-- end box / title -->
 
    <div class="form">
 
        <div id="summary" class="fields">
 
            <div class="field">
 
                <div class="label-summary">
 
                  <label>${_('Clone URL')}:</label>
 
                </div>
 
                <div class="input ${summary(c.show_stats)}">
 
                  ${self.repotag(c.db_repo)}
 
                  <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
 
                  <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
 
                  <div style="display:none" id="clone_by_name" class="btn btn-default btn-sm">${_('Show by Name')}</div>
 
                  <div id="clone_by_id" class="btn btn-default btn-sm">${_('Show by ID')}</div>
 
                </div>
 
            </div>
 

	
 
            <div class="field">
 
              <div class="label-summary">
 
                  <label>${_('Description')}:</label>
 
              </div>
 
              <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.db_repo.description, stylize=c.visual.stylify_metatags)}</div>
 
            </div>
 

	
 
            <div class="field">
 
              <div class="label-summary">
 
                  <label>${_('Trending files')}:</label>
 
              </div>
 
              <div class="input ${summary(c.show_stats)}">
 
                %if c.show_stats:
 
                <div id="lang_stats"></div>
 
                %else:
 
                   ${_('Statistics are disabled for this repository')}
 
                   %if h.HasPermissionAny('hg.admin')('enable stats on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'),class_="btn btn-default btn-xs")}
 
                   %endif
 
                %endif
 
              </div>
 
            </div>
 

	
 
            <div class="field">
 
              <div class="label-summary">
 
                  <label>${_('Download')}:</label>
 
              </div>
 
              <div class="input ${summary(c.show_stats)}">
 
                %if len(c.db_repo_scm_instance.revisions) == 0:
 
                  ${_('There are no downloads yet')}
 
                %elif not c.enable_downloads:
 
                  ${_('Downloads are disabled for this repository')}
 
                    %if h.HasPermissionAny('hg.admin')('enable downloads on from summary'):
 
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'),class_="btn btn-default btn-xs")}
 
                    %endif
 
                %else:
 
                    <span id="${'zip_link'}">
 
                        <a class="btn btn-default btn-sm" href="${h.url('files_archive_home',repo_name=c.db_repo.repo_name,fname='tip.zip')}"><i class="icon-file-zip"></i> ${_('Download as zip')}</a>
 
                    </span>
 
                    ${h.hidden('download_options')}
 
                    <span style="vertical-align: bottom">
 
                      <input id="archive_subrepos" type="checkbox" name="subrepos" />
 
                      <label for="archive_subrepos" class="tooltip" title="${_('Check this to download archive with subrepos')}" >${_('With subrepos')}</label>
 
                    </span>
 
                %endif
 
              </div>
 
            </div>
 
        </div>
 
        <div id="summary-menu-stats">
 
          <ul>
 
            <li>
 
               <a title="${_('Owner')} ${c.db_repo.owner.email}">
 
                <i class="icon-user"></i> ${c.db_repo.owner.username}
 
                ${h.gravatar_div(c.db_repo.owner.email, size=18, div_style="float: right; margin: 0px 0px 0px 0px", div_title=c.db_repo.owner.full_name)}
 
              </a>
 
            </li>
 
            <li>
 
               <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
 
                <i class="icon-heart"></i> ${_('Followers')}
 
                <span class="badge" id="current_followers_count">${c.repository_followers}</span>
 
              </a>
 
            </li>
 
            <li>
 
              <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
 
                <i class="icon-fork"></i> ${_('Forks')}
 
                <span class="badge">${c.repository_forks}</span>
 
              </a>
 
            </li>
 

	
 
            %if c.authuser.username != 'default':
 
            <li class="repo_size">
 
              <a href="#" onclick="javascript:showRepoSize('repo_size_2','${c.db_repo.repo_name}')"><i class="icon-ruler"></i> ${_('Repository Size')}</a>
 
              <span  class="stats-bullet" id="repo_size_2"></span>
 
            </li>
 
            %endif
 

	
 
            <li>
 
            %if c.authuser.username != 'default':
 
              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name,api_key=c.authuser.api_key)}"><i class="icon-rss-squared"></i> ${_('Feed')}</a>
 
            %else:
 
              <a href="${h.url('atom_feed_home',repo_name=c.db_repo.repo_name)}"><i class="icon-rss-squared"></i> ${_('Feed')}</a>
 
            %endif
 
            </li>
 

	
 
            %if c.show_stats:
 
            <li>
 
              <a title="${_('Statistics')}" href="${h.url('repo_stats_home',repo_name=c.repo_name)}">
 
                <i class="icon-graph"></i> ${_('Statistics')}
 
              </a>
 
            </li>
 
            %endif
 
          </ul>
 
        </div>
 
    </div>
 
</div>
 

	
 

	
 
<div class="panel panel-primary">
 
    <div class="title">
 
    <div class="panel-heading">
 
        <div class="breadcrumbs">
 
        %if c.repo_changesets:
 
            ${h.link_to(_('Latest Changes'),h.url('changelog_home',repo_name=c.repo_name))}
 
        %else:
 
            ${_('Quick Start')}
 
         %endif
 
        </div>
 
    </div>
 
    <div class="table">
 
        <div id="shortlog_data">
 
            <%include file='../changelog/changelog_summary_data.html'/>
 
        </div>
 
    </div>
 
</div>
 

	
 
%if c.readme_data:
 
<div id="readme" class="anchor">
 
<div class="panel panel-primary" style="background-color: #FAFAFA">
 
    <div class="title" title="${_('Readme file from revision %s:%s') % (c.db_repo.landing_rev[0], c.db_repo.landing_rev[1])}">
 
    <div class="panel-heading" title="${_('Readme file from revision %s:%s') % (c.db_repo.landing_rev[0], c.db_repo.landing_rev[1])}">
 
        <div class="breadcrumbs">
 
            <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
 
        </div>
 
    </div>
 
    <div class="readme">
 
      <div class="readme_box">
 
        ${c.readme_data|n}
 
      </div>
 
    </div>
 
</div>
 
</div>
 
%endif
 

	
 
<script type="text/javascript">
 
$(document).ready(function(){
 
    var $clone_url = $('#clone_url');
 
    var $clone_url_id = $('#clone_url_id');
 
    var $clone_by_name = $('#clone_by_name');
 
    var $clone_by_id = $('#clone_by_id');
 
    $clone_url.click(function(e){
 
        if($clone_url.hasClass('selected')){
 
            return ;
 
        }else{
 
            $clone_url.addClass('selected');
 
            $clone_url.select();
 
        }
 
    });
 

	
 
    $clone_by_name.click(function(e){
 
        // show url by name and hide name button
 
        $clone_url.show();
 
        $clone_by_name.hide();
 

	
 
        // hide url by id and show name button
 
        $clone_by_id.show();
 
        $clone_url_id.hide();
 
    });
 

	
 
    $clone_by_id.click(function(e){
 
        // show url by id and hide id button
 
        $clone_by_id.hide();
 
        $clone_url_id.show();
 

	
 
        // hide url by name and show id button
 
        $clone_by_name.show();
 
        $clone_url.hide();
 
    });
 

	
 
    var cache = {}
 
    $("#download_options").select2({
 
        placeholder: _TM['Select changeset'],
 
        dropdownAutoWidth: true,
 
        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});
 
                    }
 
                });
 
                data.results.push({'text': section, 'children': children});
 
            });
 
            query.callback(data);
 
          }else{
 
              $.ajax({
 
                url: pyroutes.url('repo_refs_data', {'repo_name': '${c.repo_name}'}),
 
                data: {},
 
                dataType: 'json',
 
                type: 'GET',
 
                success: function(data) {
 
                  cache[key] = data;
 
                  query.callback({results: data.results});
 
                }
 
              });
 
          }
 
        }
 
    });
 
    // on change of download options
 
    $('#download_options').change(function(e){
 
       var new_cs = e.added
 

	
 
       for(k in tmpl_links){
 
           var s = $('#'+k+'_link');
 
           if(s){
 
             var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
 
             title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
 
             title_tmpl = title_tmpl.replace('__CS_EXT__',k);
 
             title_tmpl = '<i class="icon-file-zip"></i> '+ title_tmpl;
 
             var url = tmpl_links[k].replace('__CS__',new_cs.id);
 
             var subrepos = $('#archive_subrepos').is(':checked');
0 comments (0 inline, 0 general)