mirror of https://github.com/go-gitea/gitea.git
Merge pull request #2121 from nanoant/patch/less-n-template-indent
Consistent tab indentation for all source files
This commit is contained in:
commit
14080dd61d
|
@ -11,7 +11,7 @@
|
|||
|
||||
thead {
|
||||
th:last-child {
|
||||
padding-right: 5px !important;
|
||||
padding-right: 5px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@
|
|||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
dl.admin-dl-horizontal {
|
||||
padding: 20px;
|
||||
|
||||
dl.admin-dl-horizontal {
|
||||
padding: 20px;
|
||||
margin: 0;
|
||||
|
||||
dd{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@footer-margin: 40px;
|
||||
|
||||
|
||||
body {
|
||||
font-family: 'Helvetica Neue',Arial,Helvetica,sans-serif,'微软雅黑';
|
||||
background-color: #FAFAFA;
|
||||
|
@ -10,20 +10,20 @@ img {
|
|||
pre {
|
||||
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
&.raw {
|
||||
padding: 7px 12px;
|
||||
margin: 10px 0;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
overflow: auto;
|
||||
padding: 7px 12px;
|
||||
margin: 10px 0;
|
||||
background-color: #f8f8f8;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 3px;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
.full.height {
|
||||
padding: 0;
|
||||
margin: 0 0 -@footer-margin*2 0;
|
||||
min-height: 100%;
|
||||
margin: 0 0 -@footer-margin*2 0;
|
||||
min-height: 100%;
|
||||
}
|
||||
.following.bar {
|
||||
z-index: 900;
|
||||
|
@ -65,24 +65,24 @@ pre {
|
|||
margin-right: 0;
|
||||
}
|
||||
.searchbox {
|
||||
background-color: rgb(244, 244, 244) !important;
|
||||
&:focus {
|
||||
background-color: rgb(233, 233, 233) !important;
|
||||
}
|
||||
background-color: rgb(244, 244, 244) !important;
|
||||
&:focus {
|
||||
background-color: rgb(233, 233, 233) !important;
|
||||
}
|
||||
}
|
||||
.text .octicon {
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.right.menu {
|
||||
.menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.right.menu {
|
||||
.menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.dropdown .menu {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ui {
|
||||
|
@ -96,21 +96,21 @@ pre {
|
|||
.text {
|
||||
&.red {
|
||||
color: #d95c5c !important;
|
||||
a {
|
||||
color: #d95c5c !important;
|
||||
&:hover {
|
||||
color: #E67777 !important;
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: #d95c5c !important;
|
||||
&:hover {
|
||||
color: #E67777 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.blue {
|
||||
color: #428bca !important;
|
||||
a {
|
||||
color: #15c !important;
|
||||
&:hover {
|
||||
color: #428bca !important;
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: #15c !important;
|
||||
&:hover {
|
||||
color: #428bca !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.black {
|
||||
color: #444;
|
||||
|
@ -119,13 +119,13 @@ pre {
|
|||
}
|
||||
}
|
||||
&.grey {
|
||||
color: #767676 !important;
|
||||
a {
|
||||
color: #444 !important;
|
||||
&:hover {
|
||||
color: #000 !important;
|
||||
}
|
||||
}
|
||||
color: #767676 !important;
|
||||
a {
|
||||
color: #444 !important;
|
||||
&:hover {
|
||||
color: #000 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
&.light.grey {
|
||||
color: #888 !important;
|
||||
|
@ -189,10 +189,10 @@ pre {
|
|||
.warning {
|
||||
&.header {
|
||||
background-color: #F9EDBE !important;
|
||||
border-color: #F0C36D;
|
||||
border-color: #F0C36D;
|
||||
}
|
||||
&.segment {
|
||||
border-color: #F0C36D;
|
||||
border-color: #F0C36D;
|
||||
}
|
||||
}
|
||||
.info {
|
||||
|
@ -269,9 +269,9 @@ pre {
|
|||
font-weight: 700;
|
||||
}
|
||||
&:hover {
|
||||
background: rgba(0,0,0,.05);
|
||||
color: rgba(0,0,0,.8);
|
||||
z-index: 13;
|
||||
background: rgba(0,0,0,.05);
|
||||
color: rgba(0,0,0,.8);
|
||||
z-index: 13;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ pre {
|
|||
|
||||
.scrolling.menu {
|
||||
.item.selected {
|
||||
font-weight: 700 !important;
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,8 +295,8 @@ footer {
|
|||
padding-top: 10px;
|
||||
.fa {
|
||||
width: 16px;
|
||||
text-align: center;
|
||||
color: #428bca;
|
||||
text-align: center;
|
||||
color: #428bca;
|
||||
}
|
||||
.links >* {
|
||||
border-left: 1px solid #d6d6d6;
|
||||
|
@ -318,11 +318,11 @@ footer {
|
|||
|
||||
.generate-img(16);
|
||||
.generate-img(@n, @i: 1) when (@i =< @n) {
|
||||
.img-@{i} {
|
||||
width: (2px * @i) !important;
|
||||
height: (2px * @i) !important;
|
||||
}
|
||||
.generate-img(@n, (@i + 1));
|
||||
.img-@{i} {
|
||||
width: (2px * @i) !important;
|
||||
height: (2px * @i) !important;
|
||||
}
|
||||
.generate-img(@n, (@i + 1));
|
||||
}
|
||||
|
||||
// ensure Semantic UI .icon font family and 14px size does not apply to .icon.octicon
|
||||
|
@ -335,27 +335,27 @@ footer {
|
|||
|
||||
// Accessibility
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
.sr-only-focusable:active,
|
||||
.sr-only-focusable:focus {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 991px) and (min-width: 768px) {
|
||||
.ui.container {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
z-index: 101;
|
||||
min-width: 200px;
|
||||
.ui.header {
|
||||
font-size: 1rem;
|
||||
text-transform: none;
|
||||
font-size: 1rem;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
.filter.menu {
|
||||
|
@ -17,8 +17,8 @@
|
|||
text-align: left;
|
||||
.text {
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
&.truncate {
|
||||
vertical-align: middle;
|
||||
&.truncate {
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
|||
// Sort
|
||||
.jump.item {
|
||||
margin: 1px;
|
||||
padding-right: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.menu {
|
||||
max-height: 300px;
|
||||
|
@ -96,24 +96,24 @@
|
|||
padding-left: 0;
|
||||
|
||||
li {
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid #EAEAEA;
|
||||
}
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px solid #EAEAEA;
|
||||
}
|
||||
|
||||
&.private {
|
||||
background-color: #fcf8e9;
|
||||
}
|
||||
|
||||
a {
|
||||
padding: 6px 1.2em;
|
||||
display: block;
|
||||
|
||||
.octicon {
|
||||
margin-right: 6px;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
a {
|
||||
padding: 6px 1.2em;
|
||||
display: block;
|
||||
|
||||
.octicon {
|
||||
margin-right: 6px;
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.emoji {
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
display: inline-block;
|
||||
background-size: contain;
|
||||
width: 1.5em;
|
||||
height: 1.5em;
|
||||
display: inline-block;
|
||||
background-size: contain;
|
||||
}
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
}
|
||||
}
|
||||
.time {
|
||||
font-size: 12px;
|
||||
color: #808080;
|
||||
font-size: 12px;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,4 +110,4 @@
|
|||
padding-left: 40px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
}
|
||||
.octicon {
|
||||
color: #d9453d;
|
||||
font-size: 40px;
|
||||
width: 50px;
|
||||
font-size: 40px;
|
||||
width: 50px;
|
||||
}
|
||||
&.header {
|
||||
font-size: 20px;
|
||||
|
@ -36,4 +36,4 @@
|
|||
.signup {
|
||||
padding-top: 15px;
|
||||
padding-bottom: @footer-margin * 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,4 +28,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,481 +1,481 @@
|
|||
.markdown {
|
||||
overflow: hidden;
|
||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.6 !important;
|
||||
word-wrap: break-word;
|
||||
|
||||
&.file-view {
|
||||
padding: 5px 2em 2em !important;
|
||||
}
|
||||
|
||||
>*:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
>*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.absent {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
.anchor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
padding-right: 6px;
|
||||
padding-left: 30px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
|
||||
.anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
position: relative;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h1 .octicon-link,
|
||||
h2 .octicon-link,
|
||||
h3 .octicon-link,
|
||||
h4 .octicon-link,
|
||||
h5 .octicon-link,
|
||||
h6 .octicon-link {
|
||||
display:none;
|
||||
color:#000;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
h1:hover .anchor,
|
||||
h2:hover .anchor,
|
||||
h3:hover .anchor,
|
||||
h4:hover .anchor,
|
||||
h5:hover .anchor,
|
||||
h6:hover .anchor {
|
||||
padding-left:8px;
|
||||
margin-left:-30px;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
h1:hover .anchor .octicon-link,
|
||||
h2:hover .anchor .octicon-link,
|
||||
h3:hover .anchor .octicon-link,
|
||||
h4:hover .anchor .octicon-link,
|
||||
h5:hover .anchor .octicon-link,
|
||||
h6:hover .anchor .octicon-link {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
h1 tt,
|
||||
h1 code,
|
||||
h2 tt,
|
||||
h2 code,
|
||||
h3 tt,
|
||||
h3 code,
|
||||
h4 tt,
|
||||
h4 code,
|
||||
h5 tt,
|
||||
h5 code,
|
||||
h6 tt,
|
||||
h6 code {
|
||||
font-size:inherit;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom:0.3em;
|
||||
font-size:2.25em;
|
||||
line-height:1.2;
|
||||
border-bottom:1px solid #eee;
|
||||
}
|
||||
|
||||
h1 .anchor {
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-bottom:0.3em;
|
||||
font-size:1.75em;
|
||||
line-height:1.225;
|
||||
border-bottom:1px solid #eee;
|
||||
}
|
||||
|
||||
h2 .anchor {
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size:1.5em;
|
||||
line-height:1.43;
|
||||
}
|
||||
|
||||
h3 .anchor {
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size:1.25em;
|
||||
}
|
||||
|
||||
h4 .anchor {
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
h5 .anchor {
|
||||
line-height:1.1;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size:1em;color:#777;
|
||||
}
|
||||
|
||||
h6 .anchor {
|
||||
line-height:1.1;
|
||||
}
|
||||
|
||||
p,
|
||||
blockquote,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
table,
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
height:4px;
|
||||
padding:0;
|
||||
margin:16px 0;
|
||||
background-color:#e7e7e7;
|
||||
border:0 none;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
padding-left:2em;
|
||||
}
|
||||
|
||||
ul.no-list,
|
||||
ol.no-list {
|
||||
padding:0;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ol,
|
||||
ol ul {
|
||||
margin-top:0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
li>p {
|
||||
margin-top:16px;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
padding:0;
|
||||
margin-top:16px;
|
||||
font-size:1em;
|
||||
font-style:italic;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
padding:0 16px;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding:0 15px;
|
||||
color:#777;
|
||||
border-left:4px solid #ddd;
|
||||
}
|
||||
|
||||
blockquote>:first-child {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
blockquote>:last-child {
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
table {
|
||||
display:block;
|
||||
width:100%;
|
||||
overflow:auto;
|
||||
word-break:normal;
|
||||
word-break:keep-all;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding:6px 13px !important;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
table tr {
|
||||
background-color:#fff;
|
||||
border-top:1px solid #ccc;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width:100%;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.emoji {
|
||||
max-width:none;
|
||||
}
|
||||
|
||||
span.frame {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.frame>span {
|
||||
display:block;
|
||||
float:left;
|
||||
width:auto;
|
||||
padding:7px;
|
||||
margin:13px 0 0;
|
||||
overflow:hidden;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
span.frame span img {
|
||||
display:block;
|
||||
float:left;
|
||||
}
|
||||
|
||||
span.frame span span {
|
||||
display:block;
|
||||
padding:5px 0 0;
|
||||
clear:both;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
span.align-center {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
span.align-center>span {
|
||||
display:block;
|
||||
margin:13px auto 0;
|
||||
overflow:hidden;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
span.align-center span img {
|
||||
margin:0 auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
span.align-right {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
span.align-right>span {
|
||||
display:block;
|
||||
margin:13px 0 0;
|
||||
overflow:hidden;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
span.align-right span img {
|
||||
margin:0;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
span.float-left {
|
||||
display:block;
|
||||
float:left;
|
||||
margin-right:13px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.float-left span {
|
||||
margin:13px 0 0;
|
||||
}
|
||||
|
||||
span.float-right {
|
||||
display:block;
|
||||
float:right;
|
||||
margin-left:13px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.float-right>span {
|
||||
display:block;
|
||||
margin:13px auto 0;
|
||||
overflow:hidden;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
code,
|
||||
tt {
|
||||
padding:0;
|
||||
padding-top:0.2em;
|
||||
padding-bottom:0.2em;
|
||||
margin:0;
|
||||
font-size:85%;
|
||||
background-color:rgba(0,0,0,0.04);
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
code:before,
|
||||
code:after,
|
||||
tt:before,
|
||||
tt:after {
|
||||
letter-spacing:-0.2em;
|
||||
content:"\00a0";
|
||||
}
|
||||
|
||||
code br,
|
||||
tt br {
|
||||
display:none;
|
||||
}
|
||||
|
||||
del code {
|
||||
text-decoration:inherit;
|
||||
}
|
||||
|
||||
pre>code {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-size:100%;
|
||||
word-break:normal;
|
||||
white-space:pre;
|
||||
background:transparent;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.highlight pre,
|
||||
pre {
|
||||
padding:16px;
|
||||
overflow:auto;
|
||||
font-size:85%;
|
||||
line-height:1.45;
|
||||
background-color:#f7f7f7;
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
margin-bottom:0;
|
||||
word-break:normal;
|
||||
}
|
||||
|
||||
pre {
|
||||
word-wrap:normal;
|
||||
}
|
||||
|
||||
pre code,
|
||||
pre tt {
|
||||
display:inline;
|
||||
max-width:initial;
|
||||
padding:0;
|
||||
margin:0;
|
||||
overflow:initial;
|
||||
line-height:inherit;
|
||||
word-wrap:normal;
|
||||
background-color:transparent;
|
||||
border:0;
|
||||
}
|
||||
|
||||
pre code:before,
|
||||
pre code:after,
|
||||
pre tt:before,
|
||||
pre tt:after {
|
||||
content:normal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display:inline-block;
|
||||
padding:3px 5px;
|
||||
font-size:11px;
|
||||
line-height:10px;
|
||||
color:#555;
|
||||
vertical-align:middle;
|
||||
background-color:#fcfcfc;
|
||||
border:solid 1px #ccc;
|
||||
border-bottom-color:#bbb;
|
||||
border-radius:3px;
|
||||
box-shadow:inset 0 -1px 0 #bbb;
|
||||
}
|
||||
|
||||
.csv-data td,
|
||||
.csv-data th {
|
||||
padding:5px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
line-height:1;
|
||||
text-align:left;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.csv-data .blob-num {
|
||||
padding:10px 8px 9px;
|
||||
text-align:right;
|
||||
background:#fff;border:0;
|
||||
}
|
||||
|
||||
.csv-data tr {
|
||||
border-top:0;
|
||||
}
|
||||
|
||||
.csv-data th {
|
||||
font-weight:bold;
|
||||
background:#f8f8f8;border-top:0;
|
||||
}
|
||||
}
|
||||
overflow: hidden;
|
||||
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif;
|
||||
font-size: 16px;
|
||||
line-height: 1.6 !important;
|
||||
word-wrap: break-word;
|
||||
|
||||
&.file-view {
|
||||
padding: 5px 2em 2em !important;
|
||||
}
|
||||
|
||||
>*:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
>*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.absent {
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
.anchor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
padding-right: 6px;
|
||||
padding-left: 30px;
|
||||
margin-left: -30px;
|
||||
}
|
||||
|
||||
.anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
position: relative;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
h1 .octicon-link,
|
||||
h2 .octicon-link,
|
||||
h3 .octicon-link,
|
||||
h4 .octicon-link,
|
||||
h5 .octicon-link,
|
||||
h6 .octicon-link {
|
||||
display:none;
|
||||
color:#000;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
h1:hover .anchor,
|
||||
h2:hover .anchor,
|
||||
h3:hover .anchor,
|
||||
h4:hover .anchor,
|
||||
h5:hover .anchor,
|
||||
h6:hover .anchor {
|
||||
padding-left:8px;
|
||||
margin-left:-30px;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
h1:hover .anchor .octicon-link,
|
||||
h2:hover .anchor .octicon-link,
|
||||
h3:hover .anchor .octicon-link,
|
||||
h4:hover .anchor .octicon-link,
|
||||
h5:hover .anchor .octicon-link,
|
||||
h6:hover .anchor .octicon-link {
|
||||
display:inline-block;
|
||||
}
|
||||
|
||||
h1 tt,
|
||||
h1 code,
|
||||
h2 tt,
|
||||
h2 code,
|
||||
h3 tt,
|
||||
h3 code,
|
||||
h4 tt,
|
||||
h4 code,
|
||||
h5 tt,
|
||||
h5 code,
|
||||
h6 tt,
|
||||
h6 code {
|
||||
font-size:inherit;
|
||||
}
|
||||
|
||||
h1 {
|
||||
padding-bottom:0.3em;
|
||||
font-size:2.25em;
|
||||
line-height:1.2;
|
||||
border-bottom:1px solid #eee;
|
||||
}
|
||||
|
||||
h1 .anchor {
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
h2 {
|
||||
padding-bottom:0.3em;
|
||||
font-size:1.75em;
|
||||
line-height:1.225;
|
||||
border-bottom:1px solid #eee;
|
||||
}
|
||||
|
||||
h2 .anchor {
|
||||
line-height:1;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size:1.5em;
|
||||
line-height:1.43;
|
||||
}
|
||||
|
||||
h3 .anchor {
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size:1.25em;
|
||||
}
|
||||
|
||||
h4 .anchor {
|
||||
line-height:1.2;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
h5 .anchor {
|
||||
line-height:1.1;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size:1em;color:#777;
|
||||
}
|
||||
|
||||
h6 .anchor {
|
||||
line-height:1.1;
|
||||
}
|
||||
|
||||
p,
|
||||
blockquote,
|
||||
ul,
|
||||
ol,
|
||||
dl,
|
||||
table,
|
||||
pre {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
blockquote {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
hr {
|
||||
height:4px;
|
||||
padding:0;
|
||||
margin:16px 0;
|
||||
background-color:#e7e7e7;
|
||||
border:0 none;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
padding-left:2em;
|
||||
}
|
||||
|
||||
ul.no-list,
|
||||
ol.no-list {
|
||||
padding:0;
|
||||
list-style-type:none;
|
||||
}
|
||||
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ol,
|
||||
ol ul {
|
||||
margin-top:0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
ol ol,
|
||||
ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
li>p {
|
||||
margin-top:16px;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
dl dt {
|
||||
padding:0;
|
||||
margin-top:16px;
|
||||
font-size:1em;
|
||||
font-style:italic;
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
dl dd {
|
||||
padding:0 16px;
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding:0 15px;
|
||||
color:#777;
|
||||
border-left:4px solid #ddd;
|
||||
}
|
||||
|
||||
blockquote>:first-child {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
blockquote>:last-child {
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
table {
|
||||
display:block;
|
||||
width:100%;
|
||||
overflow:auto;
|
||||
word-break:normal;
|
||||
word-break:keep-all;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
table th,
|
||||
table td {
|
||||
padding:6px 13px !important;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
table tr {
|
||||
background-color:#fff;
|
||||
border-top:1px solid #ccc;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width:100%;
|
||||
box-sizing:border-box;
|
||||
}
|
||||
|
||||
.emoji {
|
||||
max-width:none;
|
||||
}
|
||||
|
||||
span.frame {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.frame>span {
|
||||
display:block;
|
||||
float:left;
|
||||
width:auto;
|
||||
padding:7px;
|
||||
margin:13px 0 0;
|
||||
overflow:hidden;
|
||||
border:1px solid #ddd;
|
||||
}
|
||||
|
||||
span.frame span img {
|
||||
display:block;
|
||||
float:left;
|
||||
}
|
||||
|
||||
span.frame span span {
|
||||
display:block;
|
||||
padding:5px 0 0;
|
||||
clear:both;
|
||||
color:#333;
|
||||
}
|
||||
|
||||
span.align-center {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
span.align-center>span {
|
||||
display:block;
|
||||
margin:13px auto 0;
|
||||
overflow:hidden;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
span.align-center span img {
|
||||
margin:0 auto;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
span.align-right {
|
||||
display:block;
|
||||
overflow:hidden;
|
||||
clear:both;
|
||||
}
|
||||
|
||||
span.align-right>span {
|
||||
display:block;
|
||||
margin:13px 0 0;
|
||||
overflow:hidden;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
span.align-right span img {
|
||||
margin:0;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
span.float-left {
|
||||
display:block;
|
||||
float:left;
|
||||
margin-right:13px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.float-left span {
|
||||
margin:13px 0 0;
|
||||
}
|
||||
|
||||
span.float-right {
|
||||
display:block;
|
||||
float:right;
|
||||
margin-left:13px;
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
span.float-right>span {
|
||||
display:block;
|
||||
margin:13px auto 0;
|
||||
overflow:hidden;
|
||||
text-align:right;
|
||||
}
|
||||
|
||||
code,
|
||||
tt {
|
||||
padding:0;
|
||||
padding-top:0.2em;
|
||||
padding-bottom:0.2em;
|
||||
margin:0;
|
||||
font-size:85%;
|
||||
background-color:rgba(0,0,0,0.04);
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
code:before,
|
||||
code:after,
|
||||
tt:before,
|
||||
tt:after {
|
||||
letter-spacing:-0.2em;
|
||||
content:"\00a0";
|
||||
}
|
||||
|
||||
code br,
|
||||
tt br {
|
||||
display:none;
|
||||
}
|
||||
|
||||
del code {
|
||||
text-decoration:inherit;
|
||||
}
|
||||
|
||||
pre>code {
|
||||
padding:0;
|
||||
margin:0;
|
||||
font-size:100%;
|
||||
word-break:normal;
|
||||
white-space:pre;
|
||||
background:transparent;
|
||||
border:0;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
margin-bottom:16px;
|
||||
}
|
||||
|
||||
.highlight pre,
|
||||
pre {
|
||||
padding:16px;
|
||||
overflow:auto;
|
||||
font-size:85%;
|
||||
line-height:1.45;
|
||||
background-color:#f7f7f7;
|
||||
border-radius:3px;
|
||||
}
|
||||
|
||||
.highlight pre {
|
||||
margin-bottom:0;
|
||||
word-break:normal;
|
||||
}
|
||||
|
||||
pre {
|
||||
word-wrap:normal;
|
||||
}
|
||||
|
||||
pre code,
|
||||
pre tt {
|
||||
display:inline;
|
||||
max-width:initial;
|
||||
padding:0;
|
||||
margin:0;
|
||||
overflow:initial;
|
||||
line-height:inherit;
|
||||
word-wrap:normal;
|
||||
background-color:transparent;
|
||||
border:0;
|
||||
}
|
||||
|
||||
pre code:before,
|
||||
pre code:after,
|
||||
pre tt:before,
|
||||
pre tt:after {
|
||||
content:normal;
|
||||
}
|
||||
|
||||
kbd {
|
||||
display:inline-block;
|
||||
padding:3px 5px;
|
||||
font-size:11px;
|
||||
line-height:10px;
|
||||
color:#555;
|
||||
vertical-align:middle;
|
||||
background-color:#fcfcfc;
|
||||
border:solid 1px #ccc;
|
||||
border-bottom-color:#bbb;
|
||||
border-radius:3px;
|
||||
box-shadow:inset 0 -1px 0 #bbb;
|
||||
}
|
||||
|
||||
.csv-data td,
|
||||
.csv-data th {
|
||||
padding:5px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
line-height:1;
|
||||
text-align:left;
|
||||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.csv-data .blob-num {
|
||||
padding:10px 8px 9px;
|
||||
text-align:right;
|
||||
background:#fff;border:0;
|
||||
}
|
||||
|
||||
.csv-data tr {
|
||||
border-top:0;
|
||||
}
|
||||
|
||||
.csv-data th {
|
||||
font-weight:bold;
|
||||
background:#f8f8f8;border-top:0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
}
|
||||
.ui.button {
|
||||
margin-left: 5px;
|
||||
margin-top: -3px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,4 +154,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
.metas {
|
||||
.menu {
|
||||
max-height: 300px;
|
||||
overflow-x: auto;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.ui.list {
|
||||
.hide {
|
||||
|
@ -82,13 +82,13 @@
|
|||
.menu {
|
||||
max-height: 300px;
|
||||
overflow-x: auto;
|
||||
right: 0!important;
|
||||
left: auto!important;
|
||||
}
|
||||
.dropdown.item {
|
||||
margin: 1px;
|
||||
padding-right: 0;
|
||||
}
|
||||
right: 0!important;
|
||||
left: auto!important;
|
||||
}
|
||||
.dropdown.item {
|
||||
margin: 1px;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ui.tabs {
|
||||
|
@ -110,15 +110,15 @@
|
|||
width: 100%;
|
||||
|
||||
input {
|
||||
border-radius: 0;
|
||||
padding: 5px 10px;
|
||||
border-radius: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.clone.button {
|
||||
font-size: 13px;
|
||||
padding: 0 5px;
|
||||
&:first-child {
|
||||
border-radius: .28571429rem 0 0 .28571429rem;
|
||||
border-radius: .28571429rem 0 0 .28571429rem;
|
||||
}
|
||||
}
|
||||
.icon.button {
|
||||
|
@ -168,7 +168,7 @@
|
|||
padding-bottom: 8px;
|
||||
}
|
||||
tr:hover {
|
||||
background-color: #ffffEE;
|
||||
background-color: #ffffEE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
.header {
|
||||
.icon {
|
||||
font-size: 1em;
|
||||
margin-top: -2px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
}
|
||||
.view-raw {
|
||||
|
@ -199,26 +199,26 @@
|
|||
width: 100%;
|
||||
}
|
||||
.lines-num {
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
background: #f5f5f5;
|
||||
width: 1%;
|
||||
vertical-align: top;
|
||||
text-align: right;
|
||||
color: #999;
|
||||
background: #f5f5f5;
|
||||
width: 1%;
|
||||
|
||||
span {
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
line-height: 20px;
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
span {
|
||||
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
line-height: 20px;
|
||||
padding: 0 10px;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
.lines-num,
|
||||
.lines-code {
|
||||
padding: 0;
|
||||
|
||||
|
||||
pre,
|
||||
pre,
|
||||
ol,
|
||||
.hljs {
|
||||
background-color: white;
|
||||
|
@ -227,7 +227,7 @@
|
|||
li {
|
||||
padding-left: 5px;
|
||||
&.active {
|
||||
background: #ffffdd;
|
||||
background: #ffffdd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
&.options {
|
||||
#interval {
|
||||
width: 100px!important;
|
||||
|
@ -291,12 +291,12 @@
|
|||
font-size: 3rem;
|
||||
margin-bottom: 5px;
|
||||
.ui.input {
|
||||
font-size: 0.5em;
|
||||
font-size: 0.5em;
|
||||
vertical-align: top;
|
||||
width: 50%;
|
||||
min-width: 600px;
|
||||
input {
|
||||
font-size: 1.5em;
|
||||
font-size: 1.5em;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +310,7 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
.edit-zone {
|
||||
margin-top: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
.pull-desc {
|
||||
|
@ -327,10 +327,10 @@
|
|||
}
|
||||
&.tab.segment {
|
||||
border: none;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
box-shadow: none;
|
||||
background-color: inherit;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
box-shadow: none;
|
||||
background-color: inherit;
|
||||
}
|
||||
.merge.box {
|
||||
.avatar {
|
||||
|
@ -345,7 +345,7 @@
|
|||
content: "";
|
||||
position: absolute;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 14px;
|
||||
margin-bottom: 14px;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 96px;
|
||||
|
@ -357,13 +357,13 @@
|
|||
.avatar {
|
||||
width: @comment-avatar-width;
|
||||
}
|
||||
.tag {
|
||||
.tag {
|
||||
color: #767676;
|
||||
margin-top: 3px;
|
||||
padding: 2px 5px;
|
||||
font-size: 12px;
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
border-radius: 3px;
|
||||
padding: 2px 5px;
|
||||
font-size: 12px;
|
||||
border: 1px solid rgba(0,0,0,0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.actions {
|
||||
.item {
|
||||
|
@ -386,8 +386,8 @@
|
|||
border-top-right-radius: 3px;
|
||||
.text {
|
||||
max-width: 78%;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.markdown {
|
||||
|
@ -411,8 +411,8 @@
|
|||
}
|
||||
.tab.segment {
|
||||
border: none;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
}
|
||||
textarea {
|
||||
height: 200px;
|
||||
|
@ -425,41 +425,41 @@
|
|||
}
|
||||
.event {
|
||||
position: relative;
|
||||
margin: 15px 0 15px 79px;
|
||||
padding-left: 25px;
|
||||
.octicon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
margin-left: -36px;
|
||||
text-align: center;
|
||||
&.octicon-circle-slash {
|
||||
margin-top: 5px;
|
||||
font-size: 20px;
|
||||
color: #bd2c00;
|
||||
}
|
||||
&.octicon-primitive-dot {
|
||||
font-size: 30px;
|
||||
color: #6cc644;
|
||||
}
|
||||
&.octicon-bookmark {
|
||||
margin-top: 3px;
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
.detail {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 5px;
|
||||
margin-left: 35px;
|
||||
.octicon {
|
||||
&.octicon-git-commit {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
margin: 15px 0 15px 79px;
|
||||
padding-left: 25px;
|
||||
.octicon {
|
||||
width: 30px;
|
||||
float: left;
|
||||
margin-left: -36px;
|
||||
text-align: center;
|
||||
&.octicon-circle-slash {
|
||||
margin-top: 5px;
|
||||
font-size: 20px;
|
||||
color: #bd2c00;
|
||||
}
|
||||
&.octicon-primitive-dot {
|
||||
font-size: 30px;
|
||||
color: #6cc644;
|
||||
}
|
||||
&.octicon-bookmark {
|
||||
margin-top: 3px;
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
.detail {
|
||||
font-size: 0.9rem;
|
||||
margin-top: 5px;
|
||||
margin-left: 35px;
|
||||
.octicon {
|
||||
&.octicon-git-commit {
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ui.segment.metas {
|
||||
margin-top: -3px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
.comment.form {
|
||||
|
@ -473,8 +473,8 @@
|
|||
}
|
||||
.tab.segment {
|
||||
border: none;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
}
|
||||
textarea {
|
||||
height: 200px;
|
||||
|
@ -595,7 +595,7 @@
|
|||
}
|
||||
.sha {
|
||||
font-size: 13px;
|
||||
padding: 6px 40px 4px 35px;
|
||||
padding: 6px 40px 4px 35px;
|
||||
}
|
||||
}
|
||||
&.ui.basic.striped.table tbody tr:nth-child(2n) {
|
||||
|
@ -604,143 +604,143 @@
|
|||
}
|
||||
|
||||
.diff-detail-box {
|
||||
margin: 15px 0;
|
||||
line-height: 30px;
|
||||
ol {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 28px;
|
||||
li {
|
||||
list-style: none;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 4px;
|
||||
border-bottom: 1px dashed #DDD;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
span.status{
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
&.modify {
|
||||
background-color: #f0db88;
|
||||
}
|
||||
&.add {
|
||||
background-color: #b4e2b4;
|
||||
}
|
||||
&.del {
|
||||
background-color: #e9aeae;
|
||||
}
|
||||
&.rename {
|
||||
background-color: #dad8ff;
|
||||
}
|
||||
}
|
||||
margin: 15px 0;
|
||||
line-height: 30px;
|
||||
ol {
|
||||
clear: both;
|
||||
padding-left: 0;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 28px;
|
||||
li {
|
||||
list-style: none;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 4px;
|
||||
border-bottom: 1px dashed #DDD;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
span.status{
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
&.modify {
|
||||
background-color: #f0db88;
|
||||
}
|
||||
&.add {
|
||||
background-color: #b4e2b4;
|
||||
}
|
||||
&.del {
|
||||
background-color: #e9aeae;
|
||||
}
|
||||
&.rename {
|
||||
background-color: #dad8ff;
|
||||
}
|
||||
}
|
||||
}
|
||||
.diff-box {
|
||||
.count {
|
||||
margin-right: 12px;
|
||||
.bar {
|
||||
background-color: #e75316;
|
||||
height: 12px;
|
||||
width: 40px;
|
||||
display: inline-block;
|
||||
margin: 2px 4px 0 4px;
|
||||
vertical-align: text-top;
|
||||
.add {
|
||||
background-color: #77c64a;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.file {
|
||||
color: #888;
|
||||
}
|
||||
.count {
|
||||
margin-right: 12px;
|
||||
.bar {
|
||||
background-color: #e75316;
|
||||
height: 12px;
|
||||
width: 40px;
|
||||
display: inline-block;
|
||||
margin: 2px 4px 0 4px;
|
||||
vertical-align: text-top;
|
||||
.add {
|
||||
background-color: #77c64a;
|
||||
height: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.file {
|
||||
color: #888;
|
||||
}
|
||||
}
|
||||
.diff-file-box {
|
||||
.header {
|
||||
border-bottom: 1px solid #d4d4d5!important;
|
||||
}
|
||||
.file-body.file-code {
|
||||
.lines-num {
|
||||
text-align: right;
|
||||
color: #999;
|
||||
background: #fafafa;
|
||||
width: 1%;
|
||||
}
|
||||
.lines-num-old {
|
||||
border-right: 1px solid #DDD;
|
||||
}
|
||||
}
|
||||
.code-diff {
|
||||
font-size: 13px;
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
}
|
||||
pre {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.lines-num {
|
||||
border-right: 1px solid #d4d4d5;
|
||||
padding: 0 5px;
|
||||
}
|
||||
tbody {
|
||||
tr {
|
||||
&.tag-code {
|
||||
td, pre {
|
||||
background-color: #E0E0E0 !important;
|
||||
border-color: #ADADAD!important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
// &.same-code {
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
// }
|
||||
&.del-code {
|
||||
td, pre {
|
||||
background-color: #ffe2dd !important;
|
||||
border-color: #e9aeae !important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
&.add-code {
|
||||
td, pre {
|
||||
background-color: #d1ffd6 !important;
|
||||
border-color: #b4e2b4 !important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
&:hover {
|
||||
td {
|
||||
background-color: #FFF8D2 !important;
|
||||
border-color: #F0DB88 !important;
|
||||
}
|
||||
pre {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.file-content {
|
||||
img {
|
||||
max-width: 100%;
|
||||
padding: 5px 5px 0 5px;
|
||||
}
|
||||
}
|
||||
.file-body.file-code {
|
||||
.lines-num {
|
||||
text-align: right;
|
||||
color: #999;
|
||||
background: #fafafa;
|
||||
width: 1%;
|
||||
}
|
||||
.lines-num-old {
|
||||
border-right: 1px solid #DDD;
|
||||
}
|
||||
}
|
||||
.code-diff {
|
||||
font-size: 13px;
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
border-top: none;
|
||||
}
|
||||
pre {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
.lines-num {
|
||||
border-right: 1px solid #d4d4d5;
|
||||
padding: 0 5px;
|
||||
}
|
||||
tbody {
|
||||
tr {
|
||||
&.tag-code {
|
||||
td, pre {
|
||||
background-color: #E0E0E0 !important;
|
||||
border-color: #ADADAD!important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
// &.same-code {
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
// }
|
||||
&.del-code {
|
||||
td, pre {
|
||||
background-color: #ffe2dd !important;
|
||||
border-color: #e9aeae !important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
&.add-code {
|
||||
td, pre {
|
||||
background-color: #d1ffd6 !important;
|
||||
border-color: #b4e2b4 !important;
|
||||
}
|
||||
// td.selected-line, td.selected-line pre {
|
||||
// background-color: #ffffdd !important;
|
||||
// }
|
||||
}
|
||||
&:hover {
|
||||
td {
|
||||
background-color: #FFF8D2 !important;
|
||||
border-color: #F0DB88 !important;
|
||||
}
|
||||
pre {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.file-content {
|
||||
img {
|
||||
max-width: 100%;
|
||||
padding: 5px 5px 0 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.code-view {
|
||||
overflow: auto;
|
||||
|
@ -759,7 +759,7 @@
|
|||
.clone.button:first-child {
|
||||
border-radius: .28571429rem 0 0 .28571429rem;
|
||||
}
|
||||
.ui.action.small.input {
|
||||
.ui.action.small.input {
|
||||
width: 100%;
|
||||
}
|
||||
#repo-clone-url {
|
||||
|
@ -822,23 +822,23 @@
|
|||
li {
|
||||
list-style: none;
|
||||
display: block;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dot {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #ccc;
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: -5px;
|
||||
top: 40px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FFF;
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #ccc;
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: -5px;
|
||||
top: 40px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -847,7 +847,7 @@
|
|||
&.new.release {
|
||||
.target {
|
||||
min-width: 500px;
|
||||
|
||||
|
||||
.at {
|
||||
margin-left: -5px;
|
||||
margin-right: 5px;
|
||||
|
@ -858,7 +858,7 @@
|
|||
}
|
||||
.selection.dropdown {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.prerelease.field {
|
||||
|
@ -874,15 +874,15 @@
|
|||
list-style: none;
|
||||
width: 32%;
|
||||
margin: 10px 10px 10px 0;
|
||||
padding-bottom: 14px;
|
||||
float: left;
|
||||
padding-bottom: 14px;
|
||||
float: left;
|
||||
|
||||
.avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
float: left;
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
display: block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.name {
|
||||
margin-top: 0;
|
||||
|
@ -948,13 +948,13 @@
|
|||
text-transform: none;
|
||||
}
|
||||
.markdown {
|
||||
padding: 15px 30px;
|
||||
padding: 15px 30px;
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
&:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
&:first-of-type {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -981,7 +981,7 @@
|
|||
}
|
||||
.ui.button {
|
||||
margin-left: 5px;
|
||||
margin-top: -3px;
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1002,7 +1002,7 @@
|
|||
|
||||
&:hover {
|
||||
background: rgba(0,0,0,.05)!important;
|
||||
color: rgba(0,0,0,.95)!important;
|
||||
color: rgba(0,0,0,.95)!important;
|
||||
}
|
||||
img {
|
||||
margin-right: 8px;
|
||||
|
@ -1055,7 +1055,7 @@
|
|||
|
||||
.ui.comments {
|
||||
.dropzone {
|
||||
width: 100%;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border: 2px dashed #0087F7;
|
||||
box-shadow: none!important;
|
||||
|
@ -1081,10 +1081,10 @@
|
|||
float: left;
|
||||
color: gray;
|
||||
padding-left: 10px;
|
||||
padding-top: 10px;
|
||||
&.active {
|
||||
color: #6cc644;
|
||||
}
|
||||
padding-top: 10px;
|
||||
&.active {
|
||||
color: #6cc644;
|
||||
}
|
||||
}
|
||||
.meta {
|
||||
padding-top: 5px;
|
||||
|
@ -1129,19 +1129,19 @@
|
|||
}
|
||||
.tab.segment {
|
||||
border: none;
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
box-shadow: none;
|
||||
> * {
|
||||
color: #666;
|
||||
}
|
||||
pre {
|
||||
padding: 0;
|
||||
padding-top: 10px;
|
||||
box-shadow: none;
|
||||
> * {
|
||||
color: #666;
|
||||
}
|
||||
pre {
|
||||
word-wrap: break-word;
|
||||
.hljs {
|
||||
padding: 0;
|
||||
background-color: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1198,4 +1198,4 @@
|
|||
.ui.message {
|
||||
width: 100%!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,4 +47,4 @@
|
|||
margin-top: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
@import "_user";
|
||||
@import "_dashboard";
|
||||
@import "_admin";
|
||||
@import "_explore";
|
||||
@import "_explore";
|
||||
|
|
|
@ -1,164 +1,164 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin edit authentication">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.edit"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{.Source.ID}}">
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<input type="hidden" name="type" value="{{.Source.Type}}">
|
||||
<span>{{.Source.TypeName}}</span>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.Source.Name}}" autofocus required>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.edit"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="id" value="{{.Source.ID}}">
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<input type="hidden" name="type" value="{{.Source.Type}}">
|
||||
<span>{{.Source.TypeName}}</span>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.Source.Name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<!-- LDAP and DLDAP -->
|
||||
{{if or .Source.IsLDAP .Source.IsDLDAP}}
|
||||
{{ $cfg:=.Source.LDAP }}
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required>
|
||||
</div>
|
||||
{{if .Source.IsLDAP}}
|
||||
<div class="required field">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required field">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}" required>
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Source.IsDLDAP}}
|
||||
<div class="required field">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
|
||||
</div>
|
||||
{{end}}
|
||||
<!-- LDAP and DLDAP -->
|
||||
{{if or .Source.IsLDAP .Source.IsDLDAP}}
|
||||
{{ $cfg:=.Source.LDAP }}
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required>
|
||||
</div>
|
||||
{{if .Source.IsLDAP}}
|
||||
<div class="required field">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required field">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}" required>
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Source.IsDLDAP}}
|
||||
<div class="required field">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- SMTP -->
|
||||
{{if .Source.IsSMTP}}
|
||||
{{ $cfg:=.Source.SMTP }}
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
|
||||
<div class="text">{{$cfg.Auth}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SMTPAuths}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
|
||||
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<!-- SMTP -->
|
||||
{{if .Source.IsSMTP}}
|
||||
{{ $cfg:=.Source.SMTP }}
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required>
|
||||
<div class="text">{{$cfg.Auth}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SMTPAuths}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||
<input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||
<input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}">
|
||||
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<!-- PAM -->
|
||||
{{if .Source.IsPAM}}
|
||||
{{ $cfg:=.Source.PAM }}
|
||||
<div class="required field">
|
||||
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
|
||||
</div>
|
||||
{{end}}
|
||||
<!-- PAM -->
|
||||
{{if .Source.IsPAM}}
|
||||
{{ $cfg:=.Source.PAM }}
|
||||
<div class="required field">
|
||||
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
|
||||
<input name="tls" type="checkbox" {{if .Source.UseTLS}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
|
||||
<input name="is_active" type="checkbox" {{if .Source.IsActived}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
|
||||
<input name="tls" type="checkbox" {{if .Source.UseTLS}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if not (or (or .Source.IsLDAP .Source.IsDLDAP) .Source.IsSMTP)}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||
<input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
|
||||
<input name="is_active" type="checkbox" {{if .Source.IsActived}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.auths.update"}}</button>
|
||||
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.i18n.Tr "admin.auths.delete"}}</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.auths.update"}}</button>
|
||||
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.i18n.Tr "admin.auths.delete"}}</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "admin.auths.delete_auth_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "admin.auths.delete_auth_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin authentication">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.auths.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.enabled"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.updated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Sources}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
|
||||
<td>{{.TypeName}}</td>
|
||||
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.auths.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.enabled"}}</th>
|
||||
<th>{{.i18n.Tr "admin.auths.updated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Sources}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}">{{.Name}}</a></td>
|
||||
<td>{{.TypeName}}</td>
|
||||
<td><i class="fa fa{{if .IsActived}}-check{{end}}-square-o"></i></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Updated}}" data-variation="tiny">{{DateFmtShort .Updated}}</span></td>
|
||||
<td><span class="poping up" data-content="{{DateFmtLong .Created}}" data-variation="tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/auths/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,159 +1,159 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin new authentication">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.new"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||
<div class="text">{{.CurTypeName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .AuthSources}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.new"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_Type}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="auth_type" name="type" value="{{.type}}">
|
||||
<div class="text">{{.CurTypeName}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .AuthSources}}
|
||||
<div class="item" data-value="{{.Type}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required inline field {{if .Err_Name}}error{{end}}">
|
||||
<label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label>
|
||||
<input id="name" name="name" value="{{.name}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<!-- LDAP and DLDAP -->
|
||||
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
|
||||
</div>
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
|
||||
</div>
|
||||
</div>
|
||||
<!-- LDAP and DLDAP -->
|
||||
<div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}">
|
||||
<div class="required field">
|
||||
<label for="host">{{.i18n.Tr "admin.auths.host"}}</label>
|
||||
<input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="port">{{.i18n.Tr "admin.auths.port"}}</label>
|
||||
<input id="port" name="port" value="{{.port}}" placeholder="e.g. 636">
|
||||
</div>
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label>
|
||||
<input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label>
|
||||
<input id="bind_password" name="bind_password" type="password" value="{{.bind_password}}">
|
||||
<p class="help text red">{{.i18n.Tr "admin.auths.bind_password_helper"}}</p>
|
||||
</div>
|
||||
<div class="ldap required field {{if not (eq .type 2)}}hide{{end}}">
|
||||
<label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label>
|
||||
<input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="dldap required field {{if not (eq .type 5)}}hide{{end}}">
|
||||
<label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label>
|
||||
<input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label>
|
||||
<input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label>
|
||||
<input id="admin_filter" name="admin_filter" value="{{.admin_filter}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label>
|
||||
<input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label>
|
||||
<input id="attribute_name" name="attribute_name" value="{{.attribute_name}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label>
|
||||
<input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label>
|
||||
<input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- SMTP -->
|
||||
<div class="smtp field {{if not (eq .type 3)}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
|
||||
<div class="text">{{.smtp_auth}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SMTPAuths}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||
<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||
<input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
|
||||
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- SMTP -->
|
||||
<div class="smtp field {{if not (eq .type 3)}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}">
|
||||
<div class="text">{{.smtp_auth}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .SMTPAuths}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
|
||||
<input id="smtp_port" name="smtp_port" value="{{.smtp_port}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label>
|
||||
<input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}">
|
||||
<p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PAM -->
|
||||
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
|
||||
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
|
||||
</div>
|
||||
<!-- PAM -->
|
||||
<div class="pam required field {{if not (eq .type 4)}}hide{{end}}">
|
||||
<label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
|
||||
<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
|
||||
</div>
|
||||
|
||||
<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
|
||||
<input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
|
||||
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label>
|
||||
<input name="tls" type="checkbox" {{if .tls}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label>
|
||||
<input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label>
|
||||
<input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.tips"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<h5>GMail Setting:</h5>
|
||||
<p>Host: smtp.gmail.com, Post: 587, Enable TLS Encryption: true</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.auths.tips"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<h5>GMail Setting:</h5>
|
||||
<p>Host: smtp.gmail.com, Post: 587, Enable TLS Encryption: true</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,190 +1,190 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin monitor">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.server_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||
<dd>{{AppName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||
<dd>{{AppVer}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||
<dd>{{.AppUrl}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||
<dd>{{.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||
<dd>{{.RunUser}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||
<dd>{{.RunMode}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||
<dd>{{.RepoRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||
<dd>{{.StaticRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||
<dd>{{.LogRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||
<dd>{{.ScriptType}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.db_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||
<dd>{{.DbCfg.Type}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||
<dd>{{.DbCfg.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||
<dd>{{.DbCfg.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||
<dd>{{.DbCfg.User}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||
<dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||
<dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.service_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||
<dd>{{.Webhook.QueueLength}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.mailer_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||
<dd>{{.Mailer.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||
<dd>{{.Mailer.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||
<dd>{{.Mailer.User}}</dd>{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.cache_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||
<dd>{{.CacheAdapter}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||
<dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||
<dd><pre>{{.CacheConn}}</pre></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.session_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||
<dd>{{.SessionConfig.Provider}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||
<dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
|
||||
<dd>{{.PictureService}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.log_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
{{range .Loggers}}
|
||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||
<dd>{{.Mode}}</dd>
|
||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||
<dd><pre>{{.Config}}</pre></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.server_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||
<dd>{{AppName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||
<dd>{{AppVer}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||
<dd>{{.AppUrl}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||
<dd>{{.Domain}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||
<dd>{{.RunUser}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||
<dd>{{.RunMode}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||
<dd>{{.RepoRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||
<dd>{{.StaticRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||
<dd>{{.LogRootPath}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||
<dd>{{.ScriptType}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.db_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||
<dd>{{.DbCfg.Type}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||
<dd>{{.DbCfg.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||
<dd>{{.DbCfg.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||
<dd>{{.DbCfg.User}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||
<dd>{{.DbCfg.SSLMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||
<dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.service_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_key_size_check"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.DisableMinimumKeySizeCheck}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_captcha"}}</dt>
|
||||
<dd><i class="fa fa{{if .Service.EnableCaptcha}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||
<dd>{{.Webhook.QueueLength}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.mailer_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||
{{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||
<dd>{{.Mailer.Name}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
|
||||
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||
<dd>{{.Mailer.Host}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||
<dd>{{.Mailer.User}}</dd>{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.cache_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||
<dd>{{.CacheAdapter}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||
<dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||
<dd><pre>{{.CacheConn}}</pre></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.session_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||
<dd>{{.SessionConfig.Provider}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||
<dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
|
||||
<dd>{{.PictureService}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.log_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
{{range .Loggers}}
|
||||
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||
<dd>{{.Mode}}</dd>
|
||||
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||
<dd><pre>{{.Config}}</pre></dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,121 +1,121 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin dashboard">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.statistic"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>
|
||||
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
|
||||
</p>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.operations"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.statistic"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>
|
||||
{{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}}
|
||||
</p>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.operations"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_repo_archives"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_missing_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=3">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=4">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=5">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="{{AppSubUrl}}/admin?op=6">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.system_status"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||
<dd>{{.SysStatus.LastGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.dashboard.system_status"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||
<dd>{{.SysStatus.LastGC}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,65 +1,65 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin monitor">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.cron"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
<tr>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Spec}}</td>
|
||||
<td>{{DateFmtLong .Next}}</td>
|
||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||
<td>{{.ExecTimes}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.cron"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Entries}}
|
||||
<tr>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Spec}}</td>
|
||||
<td>{{DateFmtLong .Next}}</td>
|
||||
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
|
||||
<td>{{.ExecTimes}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pid</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Processes}}
|
||||
<tr>
|
||||
<td>{{.Pid}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.monitor.process"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pid</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Processes}}
|
||||
<tr>
|
||||
<td>{{.Pid}}</td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{DateFmtLong .Start}}</td>
|
||||
<td>{{TimeSince .Start $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "admin_panel"}}</strong></p>
|
||||
<div class="panel-body">
|
||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
||||
<li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="{{AppSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
|
||||
<li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
|
||||
<li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
|
||||
<li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
|
||||
<li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
|
||||
<li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
|
||||
<li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li>
|
||||
<li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "admin_panel"}}</strong></p>
|
||||
<div class="panel-body">
|
||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
||||
<li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="{{AppSubUrl}}/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
|
||||
<li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
|
||||
<li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
|
||||
<li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
|
||||
<li {{if .PageIsAdminAuthentications}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
|
||||
<li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
|
||||
<li {{if .PageIsAdminNotices}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/notices">{{.i18n.Tr "admin.notices"}}</a></li>
|
||||
<li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="{{AppSubUrl}}/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "admin_panel"}}</div>
|
||||
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
{{.i18n.Tr "admin.dashboard"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||
{{.i18n.Tr "admin.users"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||
{{.i18n.Tr "admin.organizations"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||
{{.i18n.Tr "admin.repositories"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||
{{.i18n.Tr "admin.authentication"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||
{{.i18n.Tr "admin.config"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||
{{.i18n.Tr "admin.notices"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||
{{.i18n.Tr "admin.monitor"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
{{.i18n.Tr "admin.dashboard"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
|
||||
{{.i18n.Tr "admin.users"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
|
||||
{{.i18n.Tr "admin.organizations"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
|
||||
{{.i18n.Tr "admin.repositories"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
|
||||
{{.i18n.Tr "admin.authentication"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
|
||||
{{.i18n.Tr "admin.config"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
|
||||
{{.i18n.Tr "admin.notices"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
|
||||
{{.i18n.Tr "admin.monitor"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,104 +1,104 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin notice">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic select selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
||||
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Notices}}
|
||||
<tr>
|
||||
<td class="collapsing">
|
||||
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
||||
<input type="checkbox"> <label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>{{$.i18n.Tr .TrStr}}</td>
|
||||
<td>{{SubStr .Description 0 120}}...</td>
|
||||
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
<tfoot class="full-width">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="5">
|
||||
<div class="ui right">
|
||||
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
|
||||
</div>
|
||||
<div class="ui floating upward dropdown small button">
|
||||
<span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
|
||||
<div class="menu">
|
||||
<div class="item select action" data-action="select-all">
|
||||
{{.i18n.Tr "admin.notices.select_all"}}
|
||||
</div>
|
||||
<div class="item select action" data-action="deselect-all">
|
||||
{{.i18n.Tr "admin.notices.deselect_all"}}
|
||||
</div>
|
||||
<div class="item select action" data-action="inverse">
|
||||
{{.i18n.Tr "admin.notices.inverse_selection"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
|
||||
{{.i18n.Tr "admin.notices.delete_selected"}}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.notices.system_notice_list"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic select selectable table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.notices.type"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.desc"}}</th>
|
||||
<th width="100px">{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Notices}}
|
||||
<tr>
|
||||
<td class="collapsing">
|
||||
<div class="ui fitted checkbox" data-id="{{.ID}}">
|
||||
<input type="checkbox"> <label></label>
|
||||
</div>
|
||||
</td>
|
||||
<td>{{.ID}}</td>
|
||||
<td>{{$.i18n.Tr .TrStr}}</td>
|
||||
<td>{{SubStr .Description 0 120}}...</td>
|
||||
<td><span class="poping up" data-content="{{.Created}}" data-variation="inverted tiny">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a href="#"><i class="browser icon view-detail" data-content="{{.Description}}"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
<tfoot class="full-width">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="5">
|
||||
<div class="ui right">
|
||||
<a class="ui red small button" href="{{AppSubUrl}}/admin/notices/empty">{{.i18n.Tr "admin.notices.delete_all"}}</a>
|
||||
</div>
|
||||
<div class="ui floating upward dropdown small button">
|
||||
<span class="text">{{.i18n.Tr "admin.notices.actions"}}</span>
|
||||
<div class="menu">
|
||||
<div class="item select action" data-action="select-all">
|
||||
{{.i18n.Tr "admin.notices.select_all"}}
|
||||
</div>
|
||||
<div class="item select action" data-action="deselect-all">
|
||||
{{.i18n.Tr "admin.notices.deselect_all"}}
|
||||
</div>
|
||||
<div class="item select action" data-action="inverse">
|
||||
{{.i18n.Tr "admin.notices.inverse_selection"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui small teal button" id="delete-selection" data-link="{{.Link}}/delete" data-redirect="{{.Link}}?page={{.Page.Current}}">
|
||||
{{.i18n.Tr "admin.notices.delete_selected"}}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui modal" id="detail-modal">
|
||||
<i class="close icon"></i>
|
||||
<div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div>
|
||||
<div class="content">
|
||||
<p></p>
|
||||
</div>
|
||||
<i class="close icon"></i>
|
||||
<div class="header">{{$.i18n.Tr "admin.notices.view_detail_header"}}</div>
|
||||
<div class="content">
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,65 +1,65 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin user">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.orgs.org_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.teams"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.members"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.teams"}}</th>
|
||||
<th>{{.i18n.Tr "admin.orgs.members"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
</tr>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Orgs}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
|
||||
<td>{{.NumTeams}}</td>
|
||||
<td>{{.NumMembers}}</td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{range .Orgs}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td><a href="{{.HomeLink}}">{{.Name}}</a></td>
|
||||
<td>{{.NumTeams}}</td>
|
||||
<td>{{.NumMembers}}</td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
{{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
|
@ -20,49 +20,49 @@
|
|||
<th>{{.i18n.Tr "admin.repos.stars"}}</th>
|
||||
<th>{{.i18n.Tr "admin.repos.issues"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
<th>{{.i18n.Tr "admin.notices.op"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Repos}}
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumWatches}}</td>
|
||||
<td>{{.NumStars}}</td>
|
||||
<td>{{.NumIssues}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.ID}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a></td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><i class="fa fa{{if .IsPrivate}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumWatches}}</td>
|
||||
<td>{{.NumStars}}</td>
|
||||
<td>{{.NumIssues}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created}}</span></td>
|
||||
<td><a class="delete-button" href="" data-url="{{$.Link}}/delete?page={{$.Page.Current}}" data-id="{{.ID}}"><i class="trash icon text red"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -70,17 +70,17 @@
|
|||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.delete"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.delete"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.delete_desc"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_2"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_1"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_2"}}</p>
|
||||
<p>{{.i18n.Tr "repo.settings.delete_notices_fork_3"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,106 +1,106 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin edit user">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.edit_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<span>{{.User.Name}}</span>
|
||||
</div>
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type}}-{{.LoginSource.ID}}" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.User.FullName}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (eq .User.LoginSource 0)}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password">
|
||||
<p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com">
|
||||
</div>
|
||||
<div class="field {{if .Err_Location}}error{{end}}">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.User.Location}}">
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.edit_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<span>{{.User.Name}}</span>
|
||||
</div>
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.LoginSource.Type}}-{{.LoginSource.ID}}" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .User.LoginSource 0}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.User.LoginName}}" autofocus>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.User.FullName}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="local field {{if .Err_Password}}error{{end}} {{if not (eq .User.LoginSource 0)}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password">
|
||||
<p class="help">{{.i18n.Tr "admin.users.password_helper"}}</p>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.User.Website}}" placeholder="e.g. http://mydomain.com or https://mydomain.com">
|
||||
</div>
|
||||
<div class="field {{if .Err_Location}}error{{end}}">
|
||||
<label for="location">{{.i18n.Tr "settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.User.Location}}">
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.is_activated"}}</strong></label>
|
||||
<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.is_admin"}}</strong></label>
|
||||
<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
|
||||
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.allow_import_local"}}</strong></label>
|
||||
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.is_activated"}}</strong></label>
|
||||
<input name="active" type="checkbox" {{if .User.IsActive}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.is_admin"}}</strong></label>
|
||||
<input name="admin" type="checkbox" {{if .User.IsAdmin}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.allow_git_hook"}}</strong></label>
|
||||
<input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.allow_import_local"}}</strong></label>
|
||||
<input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
|
||||
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.Id}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.users.update_profile"}}</button>
|
||||
<div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.User.Id}}">{{.i18n.Tr "admin.users.delete_account"}}</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "settings.delete_account_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "settings.delete_account_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin user">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.users.name"}}</th>
|
||||
<th>{{.i18n.Tr "email"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.activated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.admin"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><span class="text truncate email">{{.Email}}</span></td>
|
||||
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
|
||||
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.user_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}})
|
||||
<div class="ui right">
|
||||
<a class="ui blue tiny button" href="{{AppSubUrl}}/admin/users/new">{{.i18n.Tr "admin.users.new_account"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>{{.i18n.Tr "admin.users.name"}}</th>
|
||||
<th>{{.i18n.Tr "email"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.activated"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.admin"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.repos"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.created"}}</th>
|
||||
<th>{{.i18n.Tr "admin.users.edit"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .Users}}
|
||||
<tr>
|
||||
<td>{{.Id}}</td>
|
||||
<td><a href="{{AppSubUrl}}/{{.Name}}">{{.Name}}</a></td>
|
||||
<td><span class="text truncate email">{{.Email}}</span></td>
|
||||
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
|
||||
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
|
||||
<td>{{.NumRepos}}</td>
|
||||
<td><span title="{{DateFmtLong .Created}}">{{DateFmtShort .Created }}</span></td>
|
||||
<td><a href="{{AppSubUrl}}/admin/users/{{.Id}}"><i class="fa fa-pencil-square-o"></i></a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if .IsFirst}}disabled{{end}} item" href="{{$.Link}}"><i class="angle double left icon"></i> {{$.i18n.Tr "admin.first_page"}}</a>
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
<a class="{{if .IsLast}}disabled{{end}} item" href="{{$.Link}}?page={{.TotalPages}}">{{$.i18n.Tr "admin.last_page"}} <i class="angle double right icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="admin new user">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.new_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "admin/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.users.new_account"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<!-- Types and name -->
|
||||
<div class="inline required field {{if .Err_LoginType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "admin.users.auth_source"}}</label>
|
||||
<div class="ui selection type dropdown">
|
||||
<input type="hidden" id="login_type" name="login_type" value="{{.login_type}}" data-password="required" required>
|
||||
<div class="text">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="0-0">{{.i18n.Tr "admin.users.local"}}</div>
|
||||
{{range .Sources}}
|
||||
<div class="item" data-value="{{.Type}}-{{.ID}}">{{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="required non-local field {{if .Err_LoginName}}error{{end}} {{if eq .login_type "0-0"}}hide{{end}}">
|
||||
<label for="login_name">{{.i18n.Tr "admin.users.auth_login_name"}}</label>
|
||||
<input id="login_name" name="login_name" value="{{.login_name}}">
|
||||
</div>
|
||||
<div class="required field {{if .Err_UserName}}error{{end}}">
|
||||
<label for="user_name">{{.i18n.Tr "username"}}</label>
|
||||
<input id="user_name" name="user_name" value="{{.user_name}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.email}}" required>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="required local field {{if .Err_Password}}error{{end}} {{if not (eq .login_type "0-0")}}hide{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
|
||||
</div>
|
||||
|
||||
<!-- Send register notify e-mail -->
|
||||
{{if .CanSendEmail}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
|
||||
<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<!-- Send register notify e-mail -->
|
||||
{{if .CanSendEmail}}
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "admin.users.send_register_notify"}}</strong></label>
|
||||
<input name="send_notify" type="checkbox" {{if .send_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{.i18n.Tr "admin.users.new_account"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
{{if .Flash.ErrorMsg}}
|
||||
<div class="ui negative message">
|
||||
<p>{{.Flash.ErrorMsg}}</p>
|
||||
</div>
|
||||
<div class="ui negative message">
|
||||
<p>{{.Flash.ErrorMsg}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Flash.SuccessMsg}}
|
||||
<div class="ui positive message">
|
||||
<p>{{.Flash.SuccessMsg}}</p>
|
||||
</div>
|
||||
<div class="ui positive message">
|
||||
<p>{{.Flash.SuccessMsg}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Flash.InfoMsg}}
|
||||
<div class="ui info message">
|
||||
<p>{{.Flash.InfoMsg}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui info message">
|
||||
<p>{{.Flash.InfoMsg}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
{{/*
|
||||
<html>
|
||||
<body>
|
||||
<div>
|
||||
*/}}
|
||||
</div>
|
||||
<footer>
|
||||
<div class="ui container">
|
||||
|
@ -6,19 +11,19 @@
|
|||
</div>
|
||||
<div class="ui right links">
|
||||
{{if .ShowFooterBranding}}
|
||||
<a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
|
||||
<a target="_blank" href="https://twitter.com/gogitservice"><i class="fa fa-twitter"></i><span class="sr-only">Twitter</span></a>
|
||||
<a target="_blank" href="http://weibo.com/gogschina"><i class="fa fa-weibo"></i><span class="sr-only">Sina Weibo</span></a>
|
||||
<a target="_blank" href="https://github.com/gogits/gogs"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a>
|
||||
<a target="_blank" href="https://twitter.com/gogitservice"><i class="fa fa-twitter"></i><span class="sr-only">Twitter</span></a>
|
||||
<a target="_blank" href="http://weibo.com/gogschina"><i class="fa fa-weibo"></i><span class="sr-only">Sina Weibo</span></a>
|
||||
{{end}}
|
||||
<div class="ui language bottom pointing slide up dropdown link item">
|
||||
<i class="world icon"></i>
|
||||
<div class="text">{{.LangName}}</div>
|
||||
<div class="menu">
|
||||
{{range .AllLangs}}
|
||||
<a class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<i class="world icon"></i>
|
||||
<div class="text">{{.LangName}}</div>
|
||||
<div class="menu">
|
||||
{{range .AllLangs}}
|
||||
<a class="item {{if eq $.Lang .Lang}}active selected{{end}}" href="{{if eq $.Lang .Lang}}#{{else}}{{$.Link}}?lang={{.Lang}}{{end}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<a target="_blank" href="http://gogs.io">{{.i18n.Tr "website"}}</a>
|
||||
{{if (or .ShowFooterVersion .PageIsAdmin)}}<span class="version">{{GoVer}}</span>{{end}}
|
||||
</div>
|
||||
|
@ -26,24 +31,24 @@
|
|||
</footer>
|
||||
</body>
|
||||
|
||||
<!-- Third-party libraries -->
|
||||
{{if .RequireHighlightJS}}
|
||||
<!-- Third-party libraries -->
|
||||
{{if .RequireHighlightJS}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/highlight-8.9.1/github.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/highlight-8.9.1.pack.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireMinicolors}}
|
||||
{{end}}
|
||||
{{if .RequireMinicolors}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors-2.1.12.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/jquery.minicolors-2.1.12.min.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireDatetimepicker}}
|
||||
{{end}}
|
||||
{{if .RequireDatetimepicker}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker-2.4.5.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker-2.4.5.js"></script>
|
||||
{{end}}
|
||||
{{if .RequireDropzone}}
|
||||
{{end}}
|
||||
{{if .RequireDropzone}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone-4.2.0.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/dropzone-4.2.0.js"></script>
|
||||
{{end}}
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script>
|
||||
{{end}}
|
||||
<script src="{{AppSubUrl}}/js/libs/emojify-1.1.0.min.js"></script>
|
||||
<script src="{{AppSubUrl}}/js/libs/clipboard-1.5.5.min.js"></script>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
<meta name="_csrf" content="{{.CsrfToken}}" />
|
||||
<meta name="_suburl" content="{{AppSubUrl}}" />
|
||||
{{if .GoGetImport}}
|
||||
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
|
||||
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
|
||||
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
|
||||
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
|
||||
{{end}}
|
||||
|
||||
<link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
|
||||
|
@ -20,8 +20,8 @@
|
|||
<link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
|
||||
|
||||
{{if .RequireSimpleMDE}}
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/simplemde-1.8.1.min.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/simplemde-1.8.1.min.js"></script>
|
||||
<link rel="stylesheet" href="{{AppSubUrl}}/css/simplemde-1.8.1.min.css">
|
||||
<script src="{{AppSubUrl}}/js/libs/simplemde-1.8.1.min.js"></script>
|
||||
{{end}}
|
||||
|
||||
<!-- Stylesheet -->
|
||||
|
@ -39,110 +39,115 @@
|
|||
<noscript>Please enable JavaScript in your browser!</noscript>
|
||||
|
||||
{{if not .PageIsInstall}}
|
||||
<div class="following bar light">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="column">
|
||||
<div class="ui top secondary menu">
|
||||
<a class="item brand" href="{{AppSubUrl}}/">
|
||||
<img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
|
||||
</a>
|
||||
<div class="following bar light">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="column">
|
||||
<div class="ui top secondary menu">
|
||||
<a class="item brand" href="{{AppSubUrl}}/">
|
||||
<img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
|
||||
</a>
|
||||
|
||||
{{if .IsSigned}}
|
||||
<a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
||||
{{else}}
|
||||
<a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||
{{end}}
|
||||
{{if .IsSigned}}
|
||||
<a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
||||
<a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
|
||||
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
||||
{{else}}
|
||||
<a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||
{{end}}
|
||||
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
|
||||
<!-- <div class="item">
|
||||
<div class="ui icon input">
|
||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
|
||||
{{/*<div class="item">
|
||||
<div class="ui icon input">
|
||||
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
||||
<i class="search icon"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>*/}}
|
||||
|
||||
{{if .IsSigned}}
|
||||
<div class="right menu">
|
||||
<div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<i class="octicon octicon-plus"></i>
|
||||
<i class="octicon octicon-triangle-down"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
<i class="icon octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||
<i class="icon octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||
<i class="icon octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
|
||||
</a>
|
||||
</div><!-- end content create new menu -->
|
||||
</div><!-- end dropdown menu create new -->
|
||||
{{if .IsSigned}}
|
||||
<div class="right menu">
|
||||
<div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||
<span class="text">
|
||||
<i class="octicon octicon-plus"></i>
|
||||
<i class="octicon octicon-triangle-down"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||
<i class="icon octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||
<i class="icon octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
|
||||
</a>
|
||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||
<i class="icon octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
|
||||
</a>
|
||||
</div><!-- end content create new menu -->
|
||||
</div><!-- end dropdown menu create new -->
|
||||
|
||||
<div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||
<span class="text avatar">
|
||||
<img class="ui small rounded image" src="{{.SignedUser.AvatarLink}}">
|
||||
<i class="octicon octicon-triangle-down" tabindex="-1"></i>
|
||||
</span>
|
||||
<div class="menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||
</div>
|
||||
<div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||
<span class="text avatar">
|
||||
<img class="ui small rounded image" src="{{.SignedUser.AvatarLink}}">
|
||||
<i class="octicon octicon-triangle-down" tabindex="-1"></i>
|
||||
</span>
|
||||
<div class="menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||
<i class="icon octicon octicon-person"></i>
|
||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||
</a>
|
||||
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
<i class="icon octicon octicon-settings"></i>
|
||||
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
||||
</a>
|
||||
<a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">
|
||||
<i class="icon octicon octicon-question"></i>
|
||||
{{.i18n.Tr "help"}}<!-- Help -->
|
||||
</a>
|
||||
{{if .IsAdmin}}
|
||||
<div class="divider"></div>
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||
<i class="icon octicon octicon-person"></i>
|
||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||
</a>
|
||||
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||
<i class="icon octicon octicon-settings"></i>
|
||||
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
||||
</a>
|
||||
<a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">
|
||||
<i class="icon octicon octicon-question"></i>
|
||||
{{.i18n.Tr "help"}}<!-- Help -->
|
||||
</a>
|
||||
{{if .IsAdmin}}
|
||||
<div class="divider"></div>
|
||||
|
||||
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
<i class="icon settings"></i>
|
||||
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
|
||||
</a>
|
||||
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||
<i class="icon settings"></i>
|
||||
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/user/logout">
|
||||
<i class="icon octicon octicon-sign-out"></i>
|
||||
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||
</a>
|
||||
</div><!-- end content avatar menu -->
|
||||
</div><!-- end dropdown avatar menu -->
|
||||
</div><!-- end signed user right menu -->
|
||||
|
||||
{{else}}
|
||||
|
||||
<a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">{{.i18n.Tr "help"}}</a>
|
||||
<div class="right menu">
|
||||
{{if .ShowRegistrationButton}}
|
||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||
<i class="icon octicon octicon-person-add"></i> {{.i18n.Tr "register"}}
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
<div class="divider"></div>
|
||||
<a class="item" href="{{AppSubUrl}}/user/logout">
|
||||
<i class="icon octicon octicon-sign-out"></i>
|
||||
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login">
|
||||
<i class="icon octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
|
||||
</a>
|
||||
</div><!-- end content avatar menu -->
|
||||
</div><!-- end dropdown avatar menu -->
|
||||
</div><!-- end signed user right menu -->
|
||||
</div><!-- end anonymous right menu -->
|
||||
|
||||
{{else}}
|
||||
|
||||
<a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">{{.i18n.Tr "help"}}</a>
|
||||
<div class="right menu">
|
||||
{{if .ShowRegistrationButton}}
|
||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||
<i class="icon octicon octicon-person-add"></i> {{.i18n.Tr "register"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login">
|
||||
<i class="icon octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
|
||||
</a>
|
||||
</div><!-- end anonymous right menu -->
|
||||
|
||||
{{end}}
|
||||
</div><!-- end top menu -->
|
||||
</div><!-- end column -->
|
||||
</div><!-- end grid -->
|
||||
</div><!-- end container -->
|
||||
</div><!-- end bar -->
|
||||
</div><!-- end top menu -->
|
||||
</div><!-- end column -->
|
||||
</div><!-- end grid -->
|
||||
</div><!-- end container -->
|
||||
</div><!-- end bar -->
|
||||
{{end}}
|
||||
{{/*
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
*/}}
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
{{.i18n.Tr "explore.repos"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<div class="ui repository list">
|
||||
{{range .Repos}}
|
||||
<div class="item">
|
||||
<div class="ui header">
|
||||
<a href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a>
|
||||
{{if .IsPrivate}}
|
||||
<span class="text gold"><i class="icon octicon octicon-lock"></i></span>
|
||||
{{else if .IsFork}}
|
||||
<span><i class="icon octicon octicon-repo-forked"></i></span>
|
||||
{{else if .IsMirror}}
|
||||
<span><i class="icon octicon octicon-repo-clone"></i></span>
|
||||
{{end}}
|
||||
{{range .Repos}}
|
||||
<div class="item">
|
||||
<div class="ui header">
|
||||
<a href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a>
|
||||
{{if .IsPrivate}}
|
||||
<span class="text gold"><i class="icon octicon octicon-lock"></i></span>
|
||||
{{else if .IsFork}}
|
||||
<span><i class="icon octicon octicon-repo-forked"></i></span>
|
||||
{{else if .IsMirror}}
|
||||
<span><i class="icon octicon octicon-repo-clone"></i></span>
|
||||
{{end}}
|
||||
|
||||
<div class="ui right metas">
|
||||
<span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
|
||||
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Description}}<p>{{.Description}}</p>{{end}}
|
||||
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui right metas">
|
||||
<span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span>
|
||||
<span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{if .Description}}<p>{{.Description}}</p>{{end}}
|
||||
<p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -4,28 +4,28 @@
|
|||
<div class="ui grid">
|
||||
{{template "explore/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "explore/repo_list" .}}
|
||||
{{template "explore/repo_list" .}}
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,127 +3,127 @@
|
|||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="sixteen wide center aligned centered column">
|
||||
<div>
|
||||
<img class="logo" src="{{AppSubUrl}}/img/gogs-lg.png" />
|
||||
<img class="logo" src="{{AppSubUrl}}/img/gogs-lg.png" />
|
||||
</div>
|
||||
<div class="hero">
|
||||
<h1 class="ui icon header title">
|
||||
Gogs - Go Git Service
|
||||
</h1>
|
||||
<h2>{{.i18n.Tr "app_desc"}}</h2>
|
||||
<h1 class="ui icon header title">
|
||||
Gogs - Go Git Service
|
||||
</h1>
|
||||
<h2>{{.i18n.Tr "app_desc"}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if eq .Lang "de-DE"}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> Einfach zu installieren
|
||||
</h1>
|
||||
<p class="large">
|
||||
Starte einfach <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gogs gibt es auch für <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a>, <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> Plattformübergreifend
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs läuft überall. <a target="_blank" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> Leichtgewicht
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs hat minimale Systemanforderungen und kann selbst auf einem günstigen und stromsparenden Raspberry Pi betrieben werden.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> Quelloffen
|
||||
</h1>
|
||||
<p class="large">
|
||||
Der komplette Code befindet sich auf <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> Einfach zu installieren
|
||||
</h1>
|
||||
<p class="large">
|
||||
Starte einfach <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">die Anwendung</a> für deine Plattform. Gogs gibt es auch für <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a>, <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a> oder als <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">Installationspaket</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> Plattformübergreifend
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs läuft überall. <a target="_blank" href="http://golang.org/">Go</a> kompiliert für: Windows, Mac OS X, Linux, ARM, etc. Wähle dasjenige System, was dir am meisten gefällt!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> Leichtgewicht
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs hat minimale Systemanforderungen und kann selbst auf einem günstigen und stromsparenden Raspberry Pi betrieben werden.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> Quelloffen
|
||||
</h1>
|
||||
<p class="large">
|
||||
Der komplette Code befindet sich auf <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Unterstütze uns bei der Verbesserung dieses Projekts. Trau dich!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else if eq .Lang "zh-CN"}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> 易安装
|
||||
</h1>
|
||||
<p class="large">
|
||||
您除了可以根据操作系统平台通过 <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> 或 <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">包管理</a> 安装。
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> 跨平台
|
||||
</h1>
|
||||
<p class="large">
|
||||
任何 <a target="_blank" href="http://golang.org/">Go 语言</a> 支持的平台都可以运行 Gogs,包括 Windows、Mac、Linux 以及 ARM。挑一个您喜欢的就行!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> 轻量级
|
||||
</h1>
|
||||
<p class="large">
|
||||
一个廉价的树莓派的配置足以满足 Gogs 的最低系统硬件要求。最大程度上节省您的服务器资源!
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> 开源化
|
||||
</h1>
|
||||
<p class="large">
|
||||
所有的代码都开源在 <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a> 上,赶快加入我们来共同发展这个伟大的项目!还等什么?成为贡献者吧!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> Easy to install
|
||||
</h1>
|
||||
<p class="large">
|
||||
Simply <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gogs with <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> or <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">packaged</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> Cross-platform
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs runs anywhere <a target="_blank" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> Lightweight
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy!
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> Open Source
|
||||
</h1>
|
||||
<p class="large">
|
||||
It's all on <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Join us by contributing to make this project even better. Don't be shy to be a contributor!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> 易安装
|
||||
</h1>
|
||||
<p class="large">
|
||||
您除了可以根据操作系统平台通过 <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">二进制运行</a>,还可以通过 <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> 或 <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>,以及 <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">包管理</a> 安装。
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> 跨平台
|
||||
</h1>
|
||||
<p class="large">
|
||||
任何 <a target="_blank" href="http://golang.org/">Go 语言</a> 支持的平台都可以运行 Gogs,包括 Windows、Mac、Linux 以及 ARM。挑一个您喜欢的就行!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> 轻量级
|
||||
</h1>
|
||||
<p class="large">
|
||||
一个廉价的树莓派的配置足以满足 Gogs 的最低系统硬件要求。最大程度上节省您的服务器资源!
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> 开源化
|
||||
</h1>
|
||||
<p class="large">
|
||||
所有的代码都开源在 <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a> 上,赶快加入我们来共同发展这个伟大的项目!还等什么?成为贡献者吧!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-flame"></i> Easy to install
|
||||
</h1>
|
||||
<p class="large">
|
||||
Simply <a target="_blank" href="http://gogs.io/docs/installation/install_from_binary.html">run the binary</a> for your platform. Or ship Gogs with <a target="_blank" href="https://github.com/gogits/gogs/tree/master/docker">Docker</a> or <a target="_blank" href="https://github.com/geerlingguy/ansible-vagrant-examples/tree/master/gogs">Vagrant</a>, or get it <a target="_blank" href="http://gogs.io/docs/installation/install_from_packages.html">packaged</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-device-desktop"></i> Cross-platform
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs runs anywhere <a target="_blank" href="http://golang.org/">Go</a> can compile for: Windows, Mac OS X, Linux, ARM, etc. Choose the one you love!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui stackable middle very relaxed page grid">
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-rocket"></i> Lightweight
|
||||
</h1>
|
||||
<p class="large">
|
||||
Gogs has low minimal requirements and can run on an inexpensive Raspberry Pi. Save your machine energy!
|
||||
</p>
|
||||
</div>
|
||||
<div class="eight wide center column">
|
||||
<h1 class="hero ui icon header">
|
||||
<i class="octicon octicon-code"></i> Open Source
|
||||
</h1>
|
||||
<p class="large">
|
||||
It's all on <a target="_blank" href="https://github.com/gogits/gogs/">GitHub</a>! Join us by contributing to make this project even better. Don't be shy to be a contributor!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -3,228 +3,228 @@
|
|||
<div class="ui middle very relaxed page grid">
|
||||
<div class="sixteen wide center aligned centered column">
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "install.title"}}
|
||||
{{.i18n.Tr "install.title"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
{{template "base/alert" .}}
|
||||
|
||||
<p>{{.i18n.Tr "install.docker_helper" "https://github.com/gogits/gogs/tree/master/docker" | Safe}}</p>
|
||||
<p>{{.i18n.Tr "install.docker_helper" "https://github.com/gogits/gogs/tree/master/docker" | Safe}}</p>
|
||||
|
||||
<form class="ui form" action="{{AppSubUrl}}/install" method="post">
|
||||
<!-- Dtabase Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.db_title"}}</h4>
|
||||
<p>{{.i18n.Tr "install.requite_db_desc"}}</p>
|
||||
<div class="inline required field {{if .Err_DbType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "install.db_type"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" id="db_type" name="db_type" value="{{.CurDbOption}}">
|
||||
<div class="text">{{.CurDbOption}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .DbOptions}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form class="ui form" action="{{AppSubUrl}}/install" method="post">
|
||||
<!-- Dtabase Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.db_title"}}</h4>
|
||||
<p>{{.i18n.Tr "install.requite_db_desc"}}</p>
|
||||
<div class="inline required field {{if .Err_DbType}}error{{end}}">
|
||||
<label>{{.i18n.Tr "install.db_type"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" id="db_type" name="db_type" value="{{.CurDbOption}}">
|
||||
<div class="text">{{.CurDbOption}}</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .DbOptions}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sql_settings" class="{{if or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB")}}hide{{end}}">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_host">{{.i18n.Tr "install.host"}}</label>
|
||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_user">{{.i18n.Tr "install.user"}}</label>
|
||||
<input id="db_user" name="db_user" value="{{.db_user}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_passwd">{{.i18n.Tr "install.password"}}</label>
|
||||
<input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_name">{{.i18n.Tr "install.db_name"}}</label>
|
||||
<input id="db_name" name="db_name" value="{{.db_name}}">
|
||||
<span class="help">{{.i18n.Tr "install.db_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sql_settings" class="{{if or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB")}}hide{{end}}">
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_host">{{.i18n.Tr "install.host"}}</label>
|
||||
<input id="db_host" name="db_host" value="{{.db_host}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_user">{{.i18n.Tr "install.user"}}</label>
|
||||
<input id="db_user" name="db_user" value="{{.db_user}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_passwd">{{.i18n.Tr "install.password"}}</label>
|
||||
<input id="db_passwd" name="db_passwd" type="password" value="{{.db_passwd}}">
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_name">{{.i18n.Tr "install.db_name"}}</label>
|
||||
<input id="db_name" name="db_name" value="{{.db_name}}">
|
||||
<span class="help">{{.i18n.Tr "install.db_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="pgsql_settings" class="{{if not (eq .CurDbOption "PostgreSQL")}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "install.ssl_mode"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}">
|
||||
<div class="default text">disable</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="disable">Disable</div>
|
||||
<div class="item" data-value="require">Require</div>
|
||||
<div class="item" data-value="verify-full">Verify Full</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pgsql_settings" class="{{if not (eq .CurDbOption "PostgreSQL")}}hide{{end}}">
|
||||
<div class="inline required field">
|
||||
<label>{{.i18n.Tr "install.ssl_mode"}}</label>
|
||||
<div class="ui selection database type dropdown">
|
||||
<input type="hidden" name="ssl_mode" value="{{if .ssl_mode}}{{.ssl_mode}}{{else}}disable{{end}}">
|
||||
<div class="default text">disable</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="disable">Disable</div>
|
||||
<div class="item" data-value="require">Require</div>
|
||||
<div class="item" data-value="verify-full">Verify Full</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sqlite_settings" class="{{if not (or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB"))}}hide{{end}}">
|
||||
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_path">{{.i18n.Tr "install.path"}}</label>
|
||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||
<span class="help">{{.i18n.Tr "install.sqlite_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sqlite_settings" class="{{if not (or (eq .CurDbOption "SQLite3") (eq .CurDbOption "TiDB"))}}hide{{end}}">
|
||||
<div class="inline required field {{if or .Err_DbPath .Err_DbSetting}}error{{end}}">
|
||||
<label for="db_path">{{.i18n.Tr "install.path"}}</label>
|
||||
<input id="db_path" name="db_path" value="{{.db_path}}">
|
||||
<span class="help">{{.i18n.Tr "install.sqlite_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- General Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.general_title"}}</h4>
|
||||
<div class="inline required field {{if .Err_AppName}}error{{end}}">
|
||||
<label for="app_name">{{.i18n.Tr "install.app_name"}}</label>
|
||||
<input id="app_name" name="app_name" value="{{.app_name}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.app_name_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoRootPath}}error{{end}}">
|
||||
<label for="repo_root_path">{{.i18n.Tr "install.repo_path"}}</label>
|
||||
<input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.repo_path_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RunUser}}error{{end}}">
|
||||
<label for="run_user">{{.i18n.Tr "install.run_user"}}</label>
|
||||
<input id="run_user" name="run_user" value="{{.run_user}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.run_user_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="domain">{{.i18n.Tr "install.domain"}}</label>
|
||||
<input id="domain" name="domain" value="{{.domain}}" placeholder="e.g. try.gogs.io" required>
|
||||
<span class="help">{{.i18n.Tr "install.domain_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="ssh_port">{{.i18n.Tr "install.ssh_port"}}</label>
|
||||
<input id="ssh_port" name="ssh_port" value="{{.ssh_port}}">
|
||||
<span class="help">{{.i18n.Tr "install.ssh_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="http_port">{{.i18n.Tr "install.http_port"}}</label>
|
||||
<input id="http_port" name="http_port" value="{{.http_port}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.http_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="app_url">{{.i18n.Tr "install.app_url"}}</label>
|
||||
<input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gogs.io" required>
|
||||
<span class="help">{{.i18n.Tr "install.app_url_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_AppName}}error{{end}}">
|
||||
<label for="app_name">{{.i18n.Tr "install.app_name"}}</label>
|
||||
<input id="app_name" name="app_name" value="{{.app_name}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.app_name_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoRootPath}}error{{end}}">
|
||||
<label for="repo_root_path">{{.i18n.Tr "install.repo_path"}}</label>
|
||||
<input id="repo_root_path" name="repo_root_path" value="{{.repo_root_path}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.repo_path_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RunUser}}error{{end}}">
|
||||
<label for="run_user">{{.i18n.Tr "install.run_user"}}</label>
|
||||
<input id="run_user" name="run_user" value="{{.run_user}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.run_user_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="domain">{{.i18n.Tr "install.domain"}}</label>
|
||||
<input id="domain" name="domain" value="{{.domain}}" placeholder="e.g. try.gogs.io" required>
|
||||
<span class="help">{{.i18n.Tr "install.domain_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="ssh_port">{{.i18n.Tr "install.ssh_port"}}</label>
|
||||
<input id="ssh_port" name="ssh_port" value="{{.ssh_port}}">
|
||||
<span class="help">{{.i18n.Tr "install.ssh_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="http_port">{{.i18n.Tr "install.http_port"}}</label>
|
||||
<input id="http_port" name="http_port" value="{{.http_port}}" required>
|
||||
<span class="help">{{.i18n.Tr "install.http_port_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline required field">
|
||||
<label for="app_url">{{.i18n.Tr "install.app_url"}}</label>
|
||||
<input id="app_url" name="app_url" value="{{.app_url}}" placeholder="e.g. https://try.gogs.io" required>
|
||||
<span class="help">{{.i18n.Tr "install.app_url_helper"}}</span>
|
||||
</div>
|
||||
|
||||
<!-- Optional Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.optional_title"}}</h4>
|
||||
<!-- Optional Settings -->
|
||||
<h4 class="ui dividing header">{{.i18n.Tr "install.optional_title"}}</h4>
|
||||
|
||||
<!-- Email -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_SMTP}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.email_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_SMTPFrom}}error{{end}}">
|
||||
<label for="smtp_from">{{.i18n.Tr "install.smtp_from"}}</label>
|
||||
<input id="smtp_from" name="smtp_from" value="{{.smtp_from}}">
|
||||
<span class="help">{{.i18n.Tr "install.smtp_from_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_SMTPEmail}}error{{end}}">
|
||||
<label for="smtp_email">{{.i18n.Tr "install.mailer_user"}}</label>
|
||||
<input id="smtp_email" name="smtp_email" value="{{.smtp_email}}">
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label for="smtp_passwd">{{.i18n.Tr "install.mailer_password"}}</label>
|
||||
<input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}">
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.register_confirm"}}</strong></label>
|
||||
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.mail_notify"}}</strong></label>
|
||||
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Email -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_SMTP}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.email_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<label for="smtp_host">{{.i18n.Tr "install.smtp_host"}}</label>
|
||||
<input id="smtp_host" name="smtp_host" value="{{.smtp_host}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_SMTPFrom}}error{{end}}">
|
||||
<label for="smtp_from">{{.i18n.Tr "install.smtp_from"}}</label>
|
||||
<input id="smtp_from" name="smtp_from" value="{{.smtp_from}}">
|
||||
<span class="help">{{.i18n.Tr "install.smtp_from_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_SMTPEmail}}error{{end}}">
|
||||
<label for="smtp_email">{{.i18n.Tr "install.mailer_user"}}</label>
|
||||
<input id="smtp_email" name="smtp_email" value="{{.smtp_email}}">
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label for="smtp_passwd">{{.i18n.Tr "install.mailer_password"}}</label>
|
||||
<input id="smtp_passwd" name="smtp_passwd" type="password" value="{{.smtp_passwd}}">
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.register_confirm"}}</strong></label>
|
||||
<input name="register_confirm" type="checkbox" {{if .register_confirm}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label><strong>{{.i18n.Tr "install.mail_notify"}}</strong></label>
|
||||
<input name="mail_notify" type="checkbox" {{if .mail_notify}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Server and other services -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Services}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.server_service_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="offline-mode">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label>
|
||||
<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="disable-gravatar">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.disable_gravatar_popup"}}"><strong>{{.i18n.Tr "install.disable_gravatar"}}</strong></label>
|
||||
<input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="disable-registration">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label>
|
||||
<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="enable-captcha">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.enable_captcha_popup"}}"><strong>{{.i18n.Tr "install.enable_captcha"}}</strong></label>
|
||||
<input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.require_sign_in_view_popup"}}"><strong>{{.i18n.Tr "install.require_sign_in_view"}}</strong></label>
|
||||
<input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Server and other services -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Services}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.server_service_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="offline-mode">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label>
|
||||
<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="disable-gravatar">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.disable_gravatar_popup"}}"><strong>{{.i18n.Tr "install.disable_gravatar"}}</strong></label>
|
||||
<input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="disable-registration">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label>
|
||||
<input name="disable_registration" type="checkbox" {{if .disable_registration}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="enable-captcha">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.enable_captcha_popup"}}"><strong>{{.i18n.Tr "install.enable_captcha"}}</strong></label>
|
||||
<input name="enable_captcha" type="checkbox" {{if .enable_captcha}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<label class="poping up" data-content="{{.i18n.Tr "install.require_sign_in_view_popup"}}"><strong>{{.i18n.Tr "install.require_sign_in_view"}}</strong></label>
|
||||
<input name="require_sign_in_view" type="checkbox" {{if .require_sign_in_view}}checked{{end}}>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Admin -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Admin}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.admin_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="center">{{.i18n.Tr "install.admin_setting_desc"}}</p>
|
||||
<div class="inline field {{if .Err_AdminName}}error{{end}}">
|
||||
<label for="admin_name">{{.i18n.Tr "install.admin_name"}}</label>
|
||||
<input id="admin_name" name="admin_name" value="{{.admin_name}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
||||
<input id="admin_passwd" name="admin_passwd" type="password" value="{{.admin_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
||||
<input id="admin_confirm_passwd" name="admin_confirm_passwd" type="password" value="{{.admin_confirm_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
|
||||
<label for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
||||
<input id="admin_email" name="admin_email" type="email" value="{{.admin_email}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Admin -->
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Admin}}text red{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "install.admin_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p class="center">{{.i18n.Tr "install.admin_setting_desc"}}</p>
|
||||
<div class="inline field {{if .Err_AdminName}}error{{end}}">
|
||||
<label for="admin_name">{{.i18n.Tr "install.admin_name"}}</label>
|
||||
<input id="admin_name" name="admin_name" value="{{.admin_name}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_passwd">{{.i18n.Tr "install.admin_password"}}</label>
|
||||
<input id="admin_passwd" name="admin_passwd" type="password" value="{{.admin_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminPasswd}}error{{end}}">
|
||||
<label for="admin_confirm_passwd">{{.i18n.Tr "install.confirm_password"}}</label>
|
||||
<input id="admin_confirm_passwd" name="admin_confirm_passwd" type="password" value="{{.admin_confirm_passwd}}">
|
||||
</div>
|
||||
<div class="inline field {{if .Err_AdminEmail}}error{{end}}">
|
||||
<label for="admin_email">{{.i18n.Tr "install.admin_email"}}</label>
|
||||
<input id="admin_email" name="admin_email" type="email" value="{{.admin_email}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui primary button">{{.i18n.Tr "install.install_gogs"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="ui divider"></div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui primary button">{{.i18n.Tr "install.install_gogs"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, please activate your account</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, please activate your account</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Hi <b>{{.User.Name}}</b>, thanks for registering at {{.AppName}}!</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/activate?code={{.Code}}">{{.AppUrl}}user/activate?code={{.Code}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
<p>Hi <b>{{.User.Name}}</b>, thanks for registering at {{.AppName}}!</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/activate?code={{.Code}}">{{.AppUrl}}user/activate?code={{.Code}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, please verify your e-mail address</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, please verify your e-mail address</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Hi <b>{{.User.Name}}</b>,</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}">{{.AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
<p>Hi <b>{{.User.Name}}</b>,</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}">{{.AppUrl}}user/activate_email?code={{.Code}}&email={{.Email}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, welcome to {{.AppName}}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, welcome to {{.AppName}}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Hi <b>{{.User.Name}}</b>, this is your registration confirmation email for {{.AppName}}!</p>
|
||||
<p>You can now login via username: {{.User.Name}}.</p>
|
||||
<p><a href="{{.AppUrl}}user/login">{{.AppUrl}}user/login</a></p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
<p>Hi <b>{{.User.Name}}</b>, this is your registration confirmation email for {{.AppName}}!</p>
|
||||
<p>You can now login via username: {{.User.Name}}.</p>
|
||||
<p><a href="{{.AppUrl}}user/login">{{.AppUrl}}user/login</a></p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, you have requested to reset your password</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.User.Name}}, you have requested to reset your password</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Hi <b>{{.User.Name}}</b>,</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/reset_password?code={{.Code}}">{{.AppUrl}}user/reset_password?code={{.Code}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
<p>Hi <b>{{.User.Name}}</b>,</p>
|
||||
<p>Please click the following link to verify your e-mail address within <b>{{.ActiveCodeLives}} hours</b>:</p>
|
||||
<p><a href="{{.AppUrl}}user/reset_password?code={{.Code}}">{{.AppUrl}}user/reset_password?code={{.Code}}</a></p>
|
||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||
<p>© 2015 <a target="_blank" href="http://gogs.io">Gogs: Go Git Service</a></p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.Subject}}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.Subject}}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>You are now a collaborator of this repository.</p>
|
||||
<p>
|
||||
---
|
||||
<br>
|
||||
View it on Gogs: <a href="{{.AppUrl}}{{.RepoLink}}">{{.RepoLink}}</a>
|
||||
</p>
|
||||
<p>You are now a collaborator of this repository.</p>
|
||||
<p>
|
||||
---
|
||||
<br>
|
||||
View it on Gogs: <a href="{{.AppUrl}}{{.RepoLink}}">{{.RepoLink}}</a>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.Subject}}</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{.Subject}}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>@{{.ActUserName}} mentioned you:</p>
|
||||
<p>{{.Content | Str2html}}</p>
|
||||
<p>
|
||||
---
|
||||
<br>
|
||||
<a href="{{.AppUrl}}{{.IssueLink}}">View it on Gogs</a>.
|
||||
</p>
|
||||
<p>@{{.ActUserName}} mentioned you:</p>
|
||||
<p>{{.Content | Str2html}}</p>
|
||||
<p>
|
||||
---
|
||||
<br>
|
||||
<a href="{{.AppUrl}}{{.IssueLink}}">View it on Gogs</a>.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization new org">
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_org"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
|
||||
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}</label>
|
||||
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required>
|
||||
<span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
|
||||
</div>
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_org"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
|
||||
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}</label>
|
||||
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required>
|
||||
<span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "org.create_org"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "org.create_org"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{{with .Org}}
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header">
|
||||
<img class="ui image" src="{{.AvatarLink}}?s=100">
|
||||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
<div class="ui container">
|
||||
<div class="ui vertically grid head">
|
||||
<div class="column">
|
||||
<div class="ui header">
|
||||
<img class="ui image" src="{{.AvatarLink}}?s=100">
|
||||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
|
||||
|
||||
<div class="ui right">
|
||||
<div class="ui menu">
|
||||
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
|
||||
<i class="octicon octicon-organization"></i> {{$.i18n.Tr "org.people"}}
|
||||
<div class="floating ui black label">{{.NumMembers}}</div>
|
||||
</a>
|
||||
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
|
||||
<i class="octicon octicon-jersey"></i> {{$.i18n.Tr "org.teams"}}
|
||||
<div class="floating ui black label">{{.NumTeams}}</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui right">
|
||||
<div class="ui menu">
|
||||
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
|
||||
<i class="octicon octicon-organization"></i> {{$.i18n.Tr "org.people"}}
|
||||
<div class="floating ui black label">{{.NumMembers}}</div>
|
||||
</a>
|
||||
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
|
||||
<i class="octicon octicon-jersey"></i> {{$.i18n.Tr "org.teams"}}
|
||||
<div class="floating ui black label">{{.NumTeams}}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,85 +1,85 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization profile">
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="ui sixteen wide column">
|
||||
<img class="ui left" id="org-avatar" src="{{.Org.AvatarLink}}?s=140"/>
|
||||
<div id="org-info">
|
||||
<div class="ui header">
|
||||
{{.Org.FullName}}
|
||||
{{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="icon octicon octicon-gear"></span></a>{{end}}
|
||||
</div>
|
||||
{{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
|
||||
<div class="text grey meta">
|
||||
{{if .Org.Location}}<div class="item"><span class="icon octicon octicon-location"></span> <span>{{.Org.Location}}</span></div>{{end}}
|
||||
{{if .Org.Website}}<div class="item"><span class="icon octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="ui sixteen wide column">
|
||||
<img class="ui left" id="org-avatar" src="{{.Org.AvatarLink}}?s=140"/>
|
||||
<div id="org-info">
|
||||
<div class="ui header">
|
||||
{{.Org.FullName}}
|
||||
{{if .IsOrganizationOwner}}<a class="text grey" href="{{.OrgLink}}/settings"><span class="icon octicon octicon-gear"></span></a>{{end}}
|
||||
</div>
|
||||
{{if .Org.Description}}<p class="desc">{{.Org.Description}}</p>{{end}}
|
||||
<div class="text grey meta">
|
||||
{{if .Org.Location}}<div class="item"><span class="icon octicon octicon-location"></span> <span>{{.Org.Location}}</span></div>{{end}}
|
||||
{{if .Org.Website}}<div class="item"><span class="icon octicon octicon-link"></span> <a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></div>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="ui eleven wide column">
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="text right">
|
||||
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
{{template "explore/repo_list" .}}
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="ui eleven wide column">
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="text right">
|
||||
<a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.Id}}"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
{{template "explore/repo_list" .}}
|
||||
</div>
|
||||
|
||||
<div class="ui five wide column">
|
||||
<h4 class="ui top attached header">
|
||||
<strong>{{.i18n.Tr "org.people"}}</strong>
|
||||
{{if .IsOrganizationMember}}
|
||||
<div class="ui right">
|
||||
<a class="text grey" href="{{.OrgLink}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="ui attached segment members">
|
||||
{{$isMember := .IsOrganizationMember}}
|
||||
{{range .Members}}
|
||||
{{if or $isMember (.IsPublicMember $.Org.Id)}}
|
||||
<a href="{{.HomeLink}}" title="{{.Name}}"><img class="ui avatar" src="{{.AvatarLink}}"></a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui blue small button" href="{{.OrgLink}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui five wide column">
|
||||
<h4 class="ui top attached header">
|
||||
<strong>{{.i18n.Tr "org.people"}}</strong>
|
||||
{{if .IsOrganizationMember}}
|
||||
<div class="ui right">
|
||||
<a class="text grey" href="{{.OrgLink}}/members"><strong>{{.Org.NumMembers}}</strong><span class="octicon octicon-chevron-right"></span></a>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="ui attached segment members">
|
||||
{{$isMember := .IsOrganizationMember}}
|
||||
{{range .Members}}
|
||||
{{if or $isMember (.IsPublicMember $.Org.Id)}}
|
||||
<a href="{{.HomeLink}}" title="{{.Name}}"><img class="ui avatar" src="{{.AvatarLink}}"></a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui blue small button" href="{{.OrgLink}}/invitations/new">{{.i18n.Tr "org.invite_someone"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .IsOrganizationMember}}
|
||||
<div class="ui top attached header">
|
||||
<strong>{{.i18n.Tr "org.teams"}}</strong>
|
||||
<div class="ui right">
|
||||
<a class="text grey" href="{{.OrgLink}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached table segment teams">
|
||||
{{range .Teams}}
|
||||
<div class="item">
|
||||
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
|
||||
<p class="text grey">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsOrganizationMember}}
|
||||
<div class="ui top attached header">
|
||||
<strong>{{.i18n.Tr "org.teams"}}</strong>
|
||||
<div class="ui right">
|
||||
<a class="text grey" href="{{.OrgLink}}/teams"><strong>{{.Org.NumTeams}}</strong><span class="octicon octicon-chevron-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached table segment teams">
|
||||
{{range .Teams}}
|
||||
<div class="item">
|
||||
<a href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong class="team-name">{{.Name}}</strong></a>
|
||||
<p class="text grey">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui blue small button" href="{{.OrgLink}}/teams/new">{{.i18n.Tr "org.create_new_team"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization invite">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui container">
|
||||
<div id="invite-box">
|
||||
{{template "base/alert" .}}
|
||||
{{template "base/alert" .}}
|
||||
<h2>{{.i18n.Tr "org.members.invite_desc" .Org.DisplayName}}</h2>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui blue button">{{.i18n.Tr "org.members.invite_now"}}</button>
|
||||
</form>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" autofocus required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui blue button">{{.i18n.Tr "org.members.invite_now"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,60 +1,60 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization members">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="text right">
|
||||
<a class="ui blue button" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="text right">
|
||||
<a class="ui blue button" href="{{.OrgLink}}/invitations/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.invite_someone"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
||||
|
||||
<div class="list">
|
||||
{{range .Members}}
|
||||
<div class="item ui grid">
|
||||
<div class="ui one wide column">
|
||||
<img class="ui avatar" src="{{.AvatarLink}}?s=48">
|
||||
</div>
|
||||
<div class="ui three wide column">
|
||||
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
|
||||
<div class="meta">{{.FullName}}</div>
|
||||
</div>
|
||||
<div class="ui five wide column center">
|
||||
<div class="meta">
|
||||
{{$.i18n.Tr "org.members.membership_visibility"}}
|
||||
<div class="item ui grid">
|
||||
<div class="ui one wide column">
|
||||
<img class="ui avatar" src="{{.AvatarLink}}?s=48">
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $isPublic := .IsPublicMember $.Org.Id}}
|
||||
{{if $isPublic}}
|
||||
<strong>{{$.i18n.Tr "org.members.public"}}</strong>
|
||||
{{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
|
||||
{{else}}
|
||||
<strong>{{$.i18n.Tr "org.members.private"}}</strong>
|
||||
{{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/public?uid={{.Id}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
|
||||
{{end}}
|
||||
<div class="ui three wide column">
|
||||
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
|
||||
<div class="meta">{{.FullName}}</div>
|
||||
</div>
|
||||
<div class="ui five wide column center">
|
||||
<div class="meta">
|
||||
{{$.i18n.Tr "org.members.membership_visibility"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $isPublic := .IsPublicMember $.Org.Id}}
|
||||
{{if $isPublic}}
|
||||
<strong>{{$.i18n.Tr "org.members.public"}}</strong>
|
||||
{{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/private?uid={{.Id}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
|
||||
{{else}}
|
||||
<strong>{{$.i18n.Tr "org.members.private"}}</strong>
|
||||
{{if or (eq $.SignedUser.Id .Id) $.IsOrganizationOwner}}(<a href="{{$.OrgLink}}/members/action/public?uid={{.Id}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui three wide column center">
|
||||
<div class="meta">
|
||||
{{$.i18n.Tr "org.members.member_role"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>{{if .IsUserOrgOwner $.Org.Id}}<span class="octicon octicon-shield"></span> {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui four wide column">
|
||||
<div class="text right">
|
||||
{{if eq $.SignedUser.Id .Id}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/members/action/leave?uid={{.Id}}">{{$.i18n.Tr "org.members.leave"}}</a>
|
||||
{{else if $.IsOrganizationOwner}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui three wide column center">
|
||||
<div class="meta">
|
||||
{{$.i18n.Tr "org.members.member_role"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>{{if .IsUserOrgOwner $.Org.Id}}<span class="octicon octicon-shield"></span> {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui four wide column">
|
||||
<div class="text right">
|
||||
{{if eq $.SignedUser.Id .Id}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/members/action/leave?uid={{.Id}}">{{$.i18n.Tr "org.members.leave"}}</a>
|
||||
{{else if $.IsOrganizationOwner}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/members/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization settings delete">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "org.settings.delete_account"}}
|
||||
</h4>
|
||||
<div class="ui attached warning segment">
|
||||
<div class="ui red message">
|
||||
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
|
||||
</div>
|
||||
<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input class="fake" type="password">
|
||||
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" autofocus required>
|
||||
</div>
|
||||
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
||||
{{.i18n.Tr "org.settings.confirm_delete_account"}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached warning header">
|
||||
{{.i18n.Tr "org.settings.delete_account"}}
|
||||
</h4>
|
||||
<div class="ui attached warning segment">
|
||||
<div class="ui red message">
|
||||
<p class="text left"><i class="octicon octicon-alert"></i> {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
|
||||
</div>
|
||||
<form class="ui form" id="delete-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input class="fake" type="password">
|
||||
<div class="inline required field {{if .Err_Password}}error{{end}}">
|
||||
<label for="password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="password" name="password" type="password" autofocus required>
|
||||
</div>
|
||||
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
|
||||
{{.i18n.Tr "org.settings.confirm_delete_account"}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "org.settings.delete_org_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "org.settings.delete_org_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "org.settings.delete_org_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "org.settings.delete_org_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,29 +1,29 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization settings new webhook">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{else if eq .HookType "slack"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
</div>
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{else if eq .HookType "slack"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_history" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "repo/settings/hook_history" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization settings webhooks">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "org.settings"}}</div>
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.OrgLink}}/settings">
|
||||
{{.i18n.Tr "org.settings.options"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.OrgLink}}/settings/hooks">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{.OrgLink}}/settings/delete">
|
||||
{{.i18n.Tr "org.settings.delete"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.OrgLink}}/settings">
|
||||
{{.i18n.Tr "org.settings.options"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.OrgLink}}/settings/hooks">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{.OrgLink}}/settings/delete">
|
||||
{{.i18n.Tr "org.settings.delete"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,59 +1,59 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization settings options">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "org.settings.options"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
|
||||
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.Org.FullName}}">
|
||||
</div>
|
||||
<div class="field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
|
||||
<textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "org.settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.Org.Website}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.i18n.Tr "org.settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.Org.Location}}">
|
||||
</div>
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
{{template "org/settings/navbar" .}}
|
||||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "org.settings.options"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_Name}}error{{end}}">
|
||||
<label for="org_name">{{.i18n.Tr "org.org_name_holder"}}<span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span></label>
|
||||
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required>
|
||||
</div>
|
||||
<div class="field {{if .Err_FullName}}error{{end}}">
|
||||
<label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.Org.FullName}}">
|
||||
</div>
|
||||
<div class="field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
|
||||
<textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
|
||||
</div>
|
||||
<div class="field {{if .Err_Website}}error{{end}}">
|
||||
<label for="website">{{.i18n.Tr "org.settings.website"}}</label>
|
||||
<input id="website" name="website" type="url" value="{{.Org.Website}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="location">{{.i18n.Tr "org.settings.location"}}</label>
|
||||
<input id="location" name="location" value="{{.Org.Location}}">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||
<input name="avatar" type="file" >
|
||||
</div>
|
||||
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field">
|
||||
<label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
|
||||
<input name="avatar" type="file" >
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,46 +1,46 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization teams">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui grid">
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui grid">
|
||||
{{template "org/team/sidebar" .}}
|
||||
<div class="ui ten wide column">
|
||||
<div class="ui top attached header">
|
||||
{{.i18n.Tr "org.teams.members"}}
|
||||
</div>
|
||||
<div class="ui attached table segment members">
|
||||
{{range .Team.Members}}
|
||||
<div class="item">
|
||||
{{if $.IsOrganizationOwner}}
|
||||
<a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
|
||||
{{end}}
|
||||
<a href="{{.HomeLink}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="uid" value="{{.SignedUser.Id}}">
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button>
|
||||
</form>
|
||||
{{range .Team.Members}}
|
||||
<div class="item">
|
||||
{{if $.IsOrganizationOwner}}
|
||||
<a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/remove?uid={{.Id}}">{{$.i18n.Tr "org.members.remove"}}</a>
|
||||
{{end}}
|
||||
<a href="{{.HomeLink}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="add-member-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/add" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input type="hidden" name="uid" value="{{.SignedUser.Id}}">
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,82 +1,82 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization new team">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="required field {{if .Err_TeamName}}error{{end}}">
|
||||
<label for="team_name">{{.i18n.Tr "org.team_name"}}</label>
|
||||
{{if eq .Team.LowerName "owners"}}
|
||||
<input type="hidden" name="team_name" value="{{.team_name}}">
|
||||
{{end}}
|
||||
<input id="team_name" name="team_name" value="{{.team_name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
|
||||
<span class="help">{{.i18n.Tr "org.team_name_helper"}}</span>
|
||||
</div>
|
||||
<div class="field {{if .Err_Description}}error{{end}}">
|
||||
<label for="desc">{{.i18n.Tr "org.team_desc"}}</label>
|
||||
<input id="desc" name="desc" value="{{.desc}}">
|
||||
<span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span>
|
||||
</div>
|
||||
{{if not (eq .Team.LowerName "owners")}}
|
||||
<div class="grouped field">
|
||||
<label>{{.i18n.Tr "org.team_permission_desc"}}</label>
|
||||
<br>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.read_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.read_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="write" {{if eq .Team.Authorize 2}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.write_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.write_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.admin_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
{{template "org/header" .}}
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName}}/delete" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{if .PageIsOrgTeamsNew}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="required field {{if .Err_TeamName}}error{{end}}">
|
||||
<label for="team_name">{{.i18n.Tr "org.team_name"}}</label>
|
||||
{{if eq .Team.LowerName "owners"}}
|
||||
<input type="hidden" name="team_name" value="{{.team_name}}">
|
||||
{{end}}
|
||||
<input id="team_name" name="team_name" value="{{.team_name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
|
||||
<span class="help">{{.i18n.Tr "org.team_name_helper"}}</span>
|
||||
</div>
|
||||
<div class="field {{if .Err_Description}}error{{end}}">
|
||||
<label for="desc">{{.i18n.Tr "org.team_desc"}}</label>
|
||||
<input id="desc" name="desc" value="{{.desc}}">
|
||||
<span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span>
|
||||
</div>
|
||||
{{if not (eq .Team.LowerName "owners")}}
|
||||
<div class="grouped field">
|
||||
<label>{{.i18n.Tr "org.team_permission_desc"}}</label>
|
||||
<br>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.Authorize 1)}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.read_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.read_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="write" {{if eq .Team.Authorize 2}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.write_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.write_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio checkbox">
|
||||
<input type="radio" name="permission" value="admin" {{if eq .Team.Authorize 3}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "org.teams.admin_access"}}</label>
|
||||
<span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
||||
<div class="field">
|
||||
{{if .PageIsOrgTeamsNew}}
|
||||
<button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button>
|
||||
<a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a>
|
||||
{{else}}
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button>
|
||||
{{if not (eq .Team.LowerName "owners")}}
|
||||
<button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{if .PageIsOrgTeamsNew}}
|
||||
<button class="ui green button">{{.i18n.Tr "org.create_new_team"}}</button>
|
||||
<a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a>
|
||||
{{else}}
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button>
|
||||
{{if not (eq .Team.LowerName "owners")}}
|
||||
<button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name}}/delete">{{.i18n.Tr "org.teams.delete_team"}}</button>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "org.teams.delete_team_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "org.teams.delete_team_title"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization teams">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui grid">
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui grid">
|
||||
{{template "org/team/sidebar" .}}
|
||||
<div class="ui ten wide column">
|
||||
<div class="ui top attached header">
|
||||
|
@ -11,36 +11,36 @@
|
|||
</div>
|
||||
<div class="ui attached table segment repositories">
|
||||
{{$canAddRemove := and $.IsOrganizationOwner (not (eq $.Team.LowerName "owners"))}}
|
||||
{{range .Team.Repos}}
|
||||
<div class="item">
|
||||
{{if $canAddRemove}}
|
||||
<a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.ID}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a>
|
||||
{{end}}
|
||||
<a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">
|
||||
<i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
|
||||
<strong>{{$.Org.Name}}/{{.Name}}</strong>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if $canAddRemove}}
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-repo-box" data-uid="{{.Org.Id}}">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{range .Team.Repos}}
|
||||
<div class="item">
|
||||
{{if $canAddRemove}}
|
||||
<a class="ui red small button right" href="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/remove?repoid={{.ID}}">{{$.i18n.Tr "org.teams.remove_repo"}}</a>
|
||||
{{end}}
|
||||
<a class="member" href="{{AppSubUrl}}/{{$.Org.Name}}/{{.Name}}">
|
||||
<i class="icon octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
|
||||
<strong>{{$.Org.Name}}/{{.Name}}</strong>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if $canAddRemove}}
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="add-repo-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName}}/action/repo/add" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-repo-box" data-uid="{{.Org.Id}}">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "org.teams.add_team_repository"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
<div class="ui six wide column">
|
||||
<h4 class="ui top attached header">
|
||||
<strong>{{.Team.Name}}</strong>
|
||||
<div class="ui right">
|
||||
{{if .Team.IsMember $.SignedUser.Id}}
|
||||
<a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
|
||||
{{else if .IsOrganizationOwner}}
|
||||
<a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment detail">
|
||||
<div class="item">
|
||||
{{if .Team.Description}}
|
||||
{{.Team.Description}}
|
||||
{{else}}
|
||||
<span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
|
||||
<a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
{{if eq .Team.LowerName "owners"}}
|
||||
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 1)}}
|
||||
{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 2)}}
|
||||
{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 3)}}
|
||||
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
<strong>{{.Team.Name}}</strong>
|
||||
<div class="ui right">
|
||||
{{if .Team.IsMember $.SignedUser.Id}}
|
||||
<a class="ui red tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/leave?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.leave"}}</a>
|
||||
{{else if .IsOrganizationOwner}}
|
||||
<a class="ui blue tiny button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/action/join?uid={{$.SignedUser.Id}}&page=team">{{$.i18n.Tr "org.teams.join"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment detail">
|
||||
<div class="item">
|
||||
{{if .Team.Description}}
|
||||
{{.Team.Description}}
|
||||
{{else}}
|
||||
<span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="item">
|
||||
<a href="{{.OrgLink}}/teams/{{.Team.LowerName}}"><span class="octicon octicon-person"></span> <strong>{{.Team.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
|
||||
<a href="{{.OrgLink}}/teams/{{.Team.LowerName}}/repositories"><span class="octicon octicon-repo"></span> <strong>{{.Team.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
{{if eq .Team.LowerName "owners"}}
|
||||
{{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 1)}}
|
||||
{{.i18n.Tr "org.teams.read_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 2)}}
|
||||
{{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
|
||||
{{else if (eq .Team.Authorize 3)}}
|
||||
{{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="ui bottom attached segment">
|
||||
<a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName}}/edit"><span class="octicon octicon-gear"></span> {{$.i18n.Tr "org.teams.settings"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
|
@ -1,41 +1,41 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="organization teams">
|
||||
{{template "org/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
{{if .IsOrganizationOwner}}
|
||||
<div class="text right">
|
||||
<a class="ui green button" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="text right">
|
||||
<a class="ui green button" href="{{.OrgLink}}/teams/new"><i class="octicon octicon-repo-create"></i> {{.i18n.Tr "org.create_new_team"}}</a>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
||||
<div class="ui two column grid">
|
||||
{{range .Teams}}
|
||||
<div class="column">
|
||||
<div class="ui top attached header">
|
||||
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
|
||||
<div class="ui right">
|
||||
{{if .IsMember $.SignedUser.Id}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.leave"}}</a>
|
||||
{{else if $.IsOrganizationOwner}}
|
||||
<a class="ui blue small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.join"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="column">
|
||||
<div class="ui top attached header">
|
||||
<a class="text black" href="{{$.OrgLink}}/teams/{{.LowerName}}"><strong>{{.Name}}</strong></a>
|
||||
<div class="ui right">
|
||||
{{if .IsMember $.SignedUser.Id}}
|
||||
<a class="ui red small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/leave?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.leave"}}</a>
|
||||
{{else if $.IsOrganizationOwner}}
|
||||
<a class="ui blue small button" href="{{$.OrgLink}}/teams/{{.LowerName}}/action/join?uid={{$.SignedUser.Id}}">{{$.i18n.Tr "org.teams.join"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment members">
|
||||
{{range .Members}}
|
||||
<a href="{{.HomeLink}}" title="{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached header">
|
||||
<p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment members">
|
||||
{{range .Members}}
|
||||
<a href="{{.HomeLink}}" title="{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached header">
|
||||
<p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,61 +1,61 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository quickstart">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="sixteen wide column content">
|
||||
{{template "base/alert" .}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.quick_guide"}}
|
||||
<div class="ui right">
|
||||
<a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached guide table segment">
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
|
||||
<div class="ui action small input">
|
||||
{{if not $.DisableSSH}}
|
||||
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
||||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
|
||||
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
||||
</button>
|
||||
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<div class="ui grid">
|
||||
<div class="sixteen wide column content">
|
||||
{{template "base/alert" .}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.quick_guide"}}
|
||||
<div class="ui right">
|
||||
<a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached guide table segment">
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
|
||||
<div class="ui action small input">
|
||||
{{if not $.DisableSSH}}
|
||||
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
||||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
|
||||
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
||||
</button>
|
||||
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
|
||||
<div class="markdown">
|
||||
<pre><code>touch README.md
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
|
||||
<div class="markdown">
|
||||
<pre><code>touch README.md
|
||||
git init
|
||||
git add README.md
|
||||
git commit -m "first commit"
|
||||
git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
|
||||
git push -u origin master</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
|
||||
<div class="markdown">
|
||||
<pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
|
||||
<div class="item">
|
||||
<h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
|
||||
<div class="markdown">
|
||||
<pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
|
||||
git push -u origin master</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository commits">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "repo/commits_table" .}}
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "repo/commits_table" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,70 +1,70 @@
|
|||
<h4 class="ui top attached header">
|
||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
|
||||
{{if .PageIsCommits}}
|
||||
<div class="ui right">
|
||||
<form action="{{.RepoLink}}/commits/{{.BranchName}}/search">
|
||||
<div class="ui tiny search input">
|
||||
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
|
||||
</div>
|
||||
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{else if .IsDiffCompare}}
|
||||
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
|
||||
{{end}}
|
||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
|
||||
{{if .PageIsCommits}}
|
||||
<div class="ui right">
|
||||
<form action="{{.RepoLink}}/commits/{{.BranchName}}/search">
|
||||
<div class="ui tiny search input">
|
||||
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
|
||||
</div>
|
||||
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{else if .IsDiffCompare}}
|
||||
<a href="{{$.CommitRepoLink}}/commit/{{.BeforeCommitID}}" class="ui green sha label">{{ShortSha .BeforeCommitID}}</a> ... <a href="{{$.CommitRepoLink}}/commit/{{.AfterCommitID}}" class="ui green sha label">{{ShortSha .AfterCommitID}}</a>
|
||||
{{end}}
|
||||
</h4>
|
||||
|
||||
{{if .Commits}}
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped fixed table single line" id="commits-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
|
||||
<th class="nine wide message"><span class="sha">SHA1</span> {{.i18n.Tr "repo.commits.message"}}</th>
|
||||
<th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $r:= List .Commits}}
|
||||
{{range $r}}
|
||||
<tr>
|
||||
<td class="author">
|
||||
{{if .User}}
|
||||
<img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
|
||||
{{else}}
|
||||
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="message collapsing">
|
||||
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
|
||||
{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}
|
||||
</td>
|
||||
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="ui attached table segment">
|
||||
<table class="ui very basic striped fixed table single line" id="commits-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="four wide">{{.i18n.Tr "repo.commits.author"}}</th>
|
||||
<th class="nine wide message"><span class="sha">SHA1</span> {{.i18n.Tr "repo.commits.message"}}</th>
|
||||
<th class="three wide right aligned">{{.i18n.Tr "repo.commits.date"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ $r:= List .Commits}}
|
||||
{{range $r}}
|
||||
<tr>
|
||||
<td class="author">
|
||||
{{if .User}}
|
||||
<img class="ui avatar image" src="{{.User.AvatarLink}}" alt=""/> <a href="{{AppSubUrl}}/{{.User.Name}}">{{.Author.Name}}</a>
|
||||
{{else}}
|
||||
<img class="ui avatar image" src="{{AvatarLink .Author.Email}}" alt=""/> {{.Author.Name}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="message collapsing">
|
||||
<a rel="nofollow" class="ui sha label" href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.ID}}">{{ShortSha .ID.String}}</a>
|
||||
{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}
|
||||
</td>
|
||||
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.RepoLink}}/commits/{{$.BranchName}}{{if $.FileName}}/{{$.FileName}}{{end}}?page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
|
@ -1,116 +1,116 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository new repo">
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_repo"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_repo"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
|
||||
<span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui checkbox">
|
||||
{{if .IsForcedPrivate}}
|
||||
<input name="private" type="checkbox" checked readonly>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
|
||||
{{else}}
|
||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" autofocus required>
|
||||
<span class="help">{{.i18n.Tr "repo.repo_name_helper" | Safe}}</span>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui checkbox">
|
||||
{{if .IsForcedPrivate}}
|
||||
<input name="private" type="checkbox" checked readonly>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
|
||||
{{else}}
|
||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.repo_lang"}}</label>
|
||||
<div class="ui multiple search normal selection dropdown">
|
||||
<input type="hidden" name="gitignores" value="{{.gitignores}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Gitignores}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.license"}}</label>
|
||||
<div class="ui search selection dropdown">
|
||||
<input type="hidden" name="license" value="{{.license}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Licenses}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" name="readme" value="{{.readme}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Readmes}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="auto-init">
|
||||
<input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.auto_init"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.repo_lang"}}</label>
|
||||
<div class="ui multiple search normal selection dropdown">
|
||||
<input type="hidden" name="gitignores" value="{{.gitignores}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.repo_lang_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Gitignores}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.license"}}</label>
|
||||
<div class="ui search selection dropdown">
|
||||
<input type="hidden" name="license" value="{{.license}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.license_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Licenses}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.create_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.readme"}} <a target="_blank" href="https://github.com/gogits/go-gogs-client/wiki/Repositories#litte-notes-on-readme-template"><span class="octicon octicon-question"></span></a></label>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" name="readme" value="{{.readme}}">
|
||||
<div class="default text">{{.i18n.Tr "repo.readme_helper"}}</div>
|
||||
<div class="menu">
|
||||
{{range .Readmes}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox" id="auto-init">
|
||||
<input class="hidden" name="auto_init" type="checkbox" tabindex="0" {{if .auto_init}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.auto_init"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.create_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,45 +1,45 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository diff">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{if .IsDiffCompare }}
|
||||
{{template "repo/commits_table" .}}
|
||||
{{else}}
|
||||
<div class="ui top attached info clearing segment">
|
||||
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
|
||||
{{.i18n.Tr "repo.diff.browse_source"}}
|
||||
</a>
|
||||
{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
|
||||
</div>
|
||||
<div class="ui attached info segment">
|
||||
{{if .Author}}
|
||||
<img class="ui avatar image" src="{{.Author.AvatarLink}}" />
|
||||
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
|
||||
{{else}}
|
||||
<img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
|
||||
<strong>{{.Commit.Author.Name}}</strong>
|
||||
{{end}}
|
||||
<span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
|
||||
<div class="ui right">
|
||||
<div class="ui horizontal list">
|
||||
{{if .Parents}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "repo.diff.parent"}}
|
||||
</div>
|
||||
<div class="item">
|
||||
{{range .Parents}}
|
||||
<a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
|
||||
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "repo/diff_box" .}}
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{if .IsDiffCompare }}
|
||||
{{template "repo/commits_table" .}}
|
||||
{{else}}
|
||||
<div class="ui top attached info clearing segment">
|
||||
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
|
||||
{{.i18n.Tr "repo.diff.browse_source"}}
|
||||
</a>
|
||||
{{RenderCommitMessage true .Commit.Message $.RepoLink $.Repository.ComposeMetas}}
|
||||
</div>
|
||||
<div class="ui attached info segment">
|
||||
{{if .Author}}
|
||||
<img class="ui avatar image" src="{{.Author.AvatarLink}}" />
|
||||
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a>
|
||||
{{else}}
|
||||
<img class="ui avatar image" src="{{AvatarLink .Commit.Author.Email}}" />
|
||||
<strong>{{.Commit.Author.Name}}</strong>
|
||||
{{end}}
|
||||
<span class="text grey" id="authored-time">{{TimeSince .Commit.Author.When $.Lang}}</span>
|
||||
<div class="ui right">
|
||||
<div class="ui horizontal list">
|
||||
{{if .Parents}}
|
||||
<div class="item">
|
||||
{{.i18n.Tr "repo.diff.parent"}}
|
||||
</div>
|
||||
<div class="item">
|
||||
{{range .Parents}}
|
||||
<a class="ui blue sha label" href="{{$.RepoLink}}/commit/{{.}}">{{ShortSha .}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
|
||||
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{template "repo/diff_box" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,94 +1,94 @@
|
|||
{{if .DiffNotAvailable}}
|
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
|
||||
<h4>{{.i18n.Tr "repo.diff.data_not_available"}}</h4>
|
||||
{{else}}
|
||||
<div class="diff-detail-box diff-box">
|
||||
<div>
|
||||
<i class="fa fa-retweet"></i>
|
||||
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
|
||||
<div class="ui right">
|
||||
<a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<ol class="detail-files hide" id="diff-files">
|
||||
{{range .Diff.Files}}
|
||||
<li>
|
||||
<div class="diff-counter count pull-right">
|
||||
{{if not .IsBin}}
|
||||
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<span class="pull-left add"></span>
|
||||
<span class="pull-left del"></span>
|
||||
</span>
|
||||
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
|
||||
{{else}}
|
||||
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<!-- todo finish all file status, now modify, add, delete and rename -->
|
||||
<span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center"> </span>
|
||||
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</div>
|
||||
<div class="diff-detail-box diff-box">
|
||||
<div>
|
||||
<i class="fa fa-retweet"></i>
|
||||
{{.i18n.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion | Str2html}}
|
||||
<div class="ui right">
|
||||
<a class="ui tiny basic black toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<ol class="detail-files hide" id="diff-files">
|
||||
{{range .Diff.Files}}
|
||||
<li>
|
||||
<div class="diff-counter count pull-right">
|
||||
{{if not .IsBin}}
|
||||
<span class="add" data-line="{{.Addition}}">{{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<span class="pull-left add"></span>
|
||||
<span class="pull-left del"></span>
|
||||
</span>
|
||||
<span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span>
|
||||
{{else}}
|
||||
<span>{{$.i18n.Tr "repo.diff.bin"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<!-- todo finish all file status, now modify, add, delete and rename -->
|
||||
<span class="status {{DiffTypeToStr .Type}} poping up" data-content="{{DiffTypeToStr .Type}}" data-variation="inverted tiny" data-position="right center"> </span>
|
||||
<a class="file" href="#diff-{{.Index}}">{{.Name}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
{{range $i, $file := .Diff.Files}}
|
||||
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
|
||||
<h4 class="ui top attached normal header">
|
||||
<div class="diff-counter count ui left">
|
||||
{{if $file.IsBin}}
|
||||
{{$.i18n.Tr "repo.diff.bin"}}
|
||||
{{else if not $file.IsRenamed}}
|
||||
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<span class="pull-left add"></span>
|
||||
<span class="pull-left del"></span>
|
||||
</span>
|
||||
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<span class="file">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</span>
|
||||
<div class="ui right">
|
||||
{{if $file.IsDeleted}}
|
||||
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
|
||||
{{else}}
|
||||
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
{{if not $file.IsRenamed}}
|
||||
{{$isImage := (call $.IsImageFile $file.Name)}}
|
||||
{{if and $isImage}}
|
||||
<div class="center">
|
||||
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="file-body file-code code-view code-diff">
|
||||
<table>
|
||||
<tbody>
|
||||
{{range .Sections}}
|
||||
{{range $k, $line := .Lines}}
|
||||
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
|
||||
<td class="lines-num lines-num-old">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code">
|
||||
<pre>{{$line.Content}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{{range $i, $file := .Diff.Files}}
|
||||
<div class="diff-file-box diff-box file-content" id="diff-{{.Index}}">
|
||||
<h4 class="ui top attached normal header">
|
||||
<div class="diff-counter count ui left">
|
||||
{{if $file.IsBin}}
|
||||
{{$.i18n.Tr "repo.diff.bin"}}
|
||||
{{else if not $file.IsRenamed}}
|
||||
<span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span>
|
||||
<span class="bar">
|
||||
<span class="pull-left add"></span>
|
||||
<span class="pull-left del"></span>
|
||||
</span>
|
||||
<span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<span class="file">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</span>
|
||||
<div class="ui right">
|
||||
{{if $file.IsDeleted}}
|
||||
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
|
||||
{{else}}
|
||||
<a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
{{if not $file.IsRenamed}}
|
||||
{{$isImage := (call $.IsImageFile $file.Name)}}
|
||||
{{if and $isImage}}
|
||||
<div class="center">
|
||||
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="file-body file-code code-view code-diff">
|
||||
<table>
|
||||
<tbody>
|
||||
{{range .Sections}}
|
||||
{{range $k, $line := .Lines}}
|
||||
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
|
||||
<td class="lines-num lines-num-old">
|
||||
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
<span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
|
||||
</td>
|
||||
<td class="lines-code">
|
||||
<pre>{{$line.Content}}</pre>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
|
@ -1,22 +1,22 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository forks">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<h2 class="ui dividing header">
|
||||
{{.i18n.Tr "repo.forks"}}
|
||||
</h2>
|
||||
<div class="ui list">
|
||||
{{range .Forks}}
|
||||
<div class="item">
|
||||
<img class="ui avatar image" src="{{.Owner.AvatarLink}}">
|
||||
<div class="link">
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||
/
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<h2 class="ui dividing header">
|
||||
{{.i18n.Tr "repo.forks"}}
|
||||
</h2>
|
||||
<div class="ui list">
|
||||
{{range .Forks}}
|
||||
<div class="item">
|
||||
<img class="ui avatar image" src="{{.Owner.AvatarLink}}">
|
||||
<div class="link">
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||
/
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,87 +1,87 @@
|
|||
{{with .Repository}}
|
||||
<div class="ui container"><!-- start container -->
|
||||
<div class="ui vertically padded grid head"><!-- start grid -->
|
||||
<div class="column"><!-- start column -->
|
||||
<div class="ui header">
|
||||
<div class="ui huge breadcrumb">
|
||||
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||
<div class="divider"> / </div>
|
||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
{{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
|
||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
|
||||
</div>
|
||||
<div class="ui container"><!-- start container -->
|
||||
<div class="ui vertically padded grid head"><!-- start grid -->
|
||||
<div class="column"><!-- start column -->
|
||||
<div class="ui header">
|
||||
<div class="ui huge breadcrumb">
|
||||
<i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
|
||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
||||
<div class="divider"> / </div>
|
||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||
{{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
|
||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
|
||||
</div>
|
||||
|
||||
<div class="ui right">
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
||||
<i class="icon fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/watchers">
|
||||
{{.NumWatches}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
|
||||
<i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/stars">
|
||||
{{.NumStars}}
|
||||
</a>
|
||||
</div>
|
||||
{{if .CanBeForked}}
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button {{if eq .OwnerID $.SignedUserID}}poping up{{end}}" {{if not (eq .OwnerID $.SignedUserID)}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
||||
<i class="icon octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/forks">
|
||||
{{.NumForks}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end column -->
|
||||
</div><!-- end grid -->
|
||||
</div><!-- end container -->
|
||||
<div class="ui right">
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
||||
<i class="icon fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/watchers">
|
||||
{{.NumWatches}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
|
||||
<i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/stars">
|
||||
{{.NumStars}}
|
||||
</a>
|
||||
</div>
|
||||
{{if .CanBeForked}}
|
||||
<div class="ui labeled button" tabindex="0">
|
||||
<a class="ui button {{if eq .OwnerID $.SignedUserID}}poping up{{end}}" {{if not (eq .OwnerID $.SignedUserID)}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
||||
<i class="icon octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||
</a>
|
||||
<a class="ui basic label" href="{{.RepoLink}}/forks">
|
||||
{{.NumForks}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- end column -->
|
||||
</div><!-- end grid -->
|
||||
</div><!-- end container -->
|
||||
{{end}}
|
||||
{{if not (or .IsBareRepo .IsDiffCompare)}}
|
||||
<div class="ui tabs container">
|
||||
<div class="ui tabular menu navbar">
|
||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||
</a>
|
||||
{{if .Repository.EnableIssues}}
|
||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
||||
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .Repository.EnablePulls}}
|
||||
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
||||
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
||||
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
|
||||
</a>
|
||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
|
||||
</a>
|
||||
{{if .Repository.EnableWiki}}
|
||||
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
|
||||
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="right menu">
|
||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
<i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
<div class="ui tabs container">
|
||||
<div class="ui tabular menu navbar">
|
||||
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
|
||||
<i class="icon octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
|
||||
</a>
|
||||
{{if .Repository.EnableIssues}}
|
||||
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
|
||||
<i class="icon octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .Repository.EnablePulls}}
|
||||
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
|
||||
<i class="icon octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsCommits}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
|
||||
<i class="icon octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
|
||||
</a>
|
||||
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
|
||||
<i class="icon octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumTags}}gray{{else}}blue{{end}} small label">{{.Repository.NumTags}}</span>
|
||||
</a>
|
||||
{{if .Repository.EnableWiki}}
|
||||
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki">
|
||||
<i class="icon octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="right menu">
|
||||
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
<i class="icon octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui tabs divider"></div>
|
||||
{{else}}
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui divider"></div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,111 +1,111 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository file list">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<p id="repo-desc">
|
||||
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
|
||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||
</p>
|
||||
<div class="ui secondary menu">
|
||||
{{if .CanPullRequest}}
|
||||
<div class="fitted item">
|
||||
{{ $baseRepo := .Repository.BaseRepo}}
|
||||
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
||||
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="fitted item choose reference">
|
||||
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
|
||||
<strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="ui grid">
|
||||
<div class="two column row">
|
||||
<a class="reference column" href="#" data-target="#branch-list">
|
||||
<span class="text {{if .IsViewBranch}}black{{end}}">
|
||||
<i class="icon octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
|
||||
</span>
|
||||
</a>
|
||||
<a class="reference column" href="#" data-target="#tag-list">
|
||||
<span class="text {{if .IsTag}}black{{end}}">
|
||||
<i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="branch-list" class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
|
||||
{{range .Branches}}
|
||||
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="tag-list" class="scrolling menu" {{if .IsViewBranch}}style="display: none"{{end}}>
|
||||
{{range .Tags}}
|
||||
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item fitted">
|
||||
<div class="ui breadcrumb">
|
||||
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
|
||||
{{ $n := len .Treenames}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
{{range $i, $v := .Treenames}}
|
||||
<div class="divider"> / </div>
|
||||
{{if eq $i $l}}
|
||||
<span class="active section">{{$v}}</span>
|
||||
{{else}}
|
||||
{{ $p := index $.Paths $i}}
|
||||
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if eq $n 0}}
|
||||
<div class="right fitted item">
|
||||
<div class="ui action small input" id="clone-panel">
|
||||
{{if not $.DisableSSH}}
|
||||
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
||||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
|
||||
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
||||
</button>
|
||||
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
<div class="ui basic jump dropdown icon button">
|
||||
<i class="download icon"></i>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
|
||||
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsFile}}
|
||||
{{template "repo/view_file" .}}
|
||||
{{else}}
|
||||
{{template "repo/view_list" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<p id="repo-desc">
|
||||
{{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
|
||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||
</p>
|
||||
<div class="ui secondary menu">
|
||||
{{if .CanPullRequest}}
|
||||
<div class="fitted item">
|
||||
{{ $baseRepo := .Repository.BaseRepo}}
|
||||
<a href="{{AppSubUrl}}/{{$baseRepo.Owner.Name}}/{{$baseRepo.Name}}/compare/{{$.BaseDefaultBranch}}...{{$.Owner.Name}}:{{$.BranchName}}">
|
||||
<button class="ui green small button"><i class="octicon octicon-git-compare"></i></button>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="fitted item choose reference">
|
||||
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
{{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
|
||||
<strong>{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.filter_branch_and_tag"}}...">
|
||||
</div>
|
||||
<div class="header">
|
||||
<div class="ui grid">
|
||||
<div class="two column row">
|
||||
<a class="reference column" href="#" data-target="#branch-list">
|
||||
<span class="text {{if .IsViewBranch}}black{{end}}">
|
||||
<i class="icon octicon octicon-git-branch"></i> {{.i18n.Tr "repo.branches"}}
|
||||
</span>
|
||||
</a>
|
||||
<a class="reference column" href="#" data-target="#tag-list">
|
||||
<span class="text {{if .IsTag}}black{{end}}">
|
||||
<i class="reference tags icon"></i> {{.i18n.Tr "repo.tags"}}
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="branch-list" class="scrolling menu" {{if .IsTag}}style="display: none"{{end}}>
|
||||
{{range .Branches}}
|
||||
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div id="tag-list" class="scrolling menu" {{if .IsViewBranch}}style="display: none"{{end}}>
|
||||
{{range .Tags}}
|
||||
<div class="item {{if eq $.BranchName .}}selected{{end}}" data-url="{{$.RepoLink}}/src/{{EscapePound .}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item fitted">
|
||||
<div class="ui breadcrumb">
|
||||
<a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
|
||||
{{ $n := len .Treenames}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
{{range $i, $v := .Treenames}}
|
||||
<div class="divider"> / </div>
|
||||
{{if eq $i $l}}
|
||||
<span class="active section">{{$v}}</span>
|
||||
{{else}}
|
||||
{{ $p := index $.Paths $i}}
|
||||
<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{$v}}</a></span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{if eq $n 0}}
|
||||
<div class="right fitted item">
|
||||
<div class="ui action small input" id="clone-panel">
|
||||
{{if not $.DisableSSH}}
|
||||
<button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
|
||||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
<button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
|
||||
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
|
||||
</button>
|
||||
<input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
<div class="ui basic jump dropdown icon button">
|
||||
<i class="download icon"></i>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="icon octicon octicon-file-zip"></i> ZIP</a>
|
||||
<a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> TAR.GZ</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .IsFile}}
|
||||
{{template "repo/view_file" .}}
|
||||
{{else}}
|
||||
{{template "repo/view_list" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<div class="field">
|
||||
<div class="ui top attached tabular menu" data-write="write" data-preview="preview">
|
||||
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
||||
</div>
|
||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||
<textarea id="content" name="content" tabindex="4"></textarea>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment markdown" data-tab="preview">
|
||||
{{.i18n.Tr "repo.release.loading"}}
|
||||
</div>
|
||||
<div class="ui top attached tabular menu" data-write="write" data-preview="preview">
|
||||
<a class="active item" data-tab="write">{{.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="item" data-tab="preview" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.release.preview"}}</a>
|
||||
</div>
|
||||
<div class="ui bottom attached active tab segment" data-tab="write">
|
||||
<textarea id="content" name="content" tabindex="4"></textarea>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment markdown" data-tab="preview">
|
||||
{{.i18n.Tr "repo.release.loading"}}
|
||||
</div>
|
||||
</div>
|
||||
{{if .IsAttachmentEnabled}}
|
||||
<div class="attachments"></div>
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
{{end}}
|
||||
<div class="attachments"></div>
|
||||
<div class="ui basic button dropzone" id="dropzone" data-upload-url="{{AppSubUrl}}/issues/attachments" data-accepts="{{.AttachmentAllowedTypes}}" data-max-file="{{.AttachmentMaxFiles}}" data-max-size="{{.AttachmentMaxSize}}" data-default-message="{{.i18n.Tr "dropzone.default_message"}}" data-invalid-input-type="{{.i18n.Tr "dropzone.invalid_input_type"}}" data-file-too-big="{{.i18n.Tr "dropzone.file_too_big"}}" data-remove-file="{{.i18n.Tr "dropzone.remove_file"}}"></div>
|
||||
{{end}}
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
<a class="color" style="background-color:#bfdadc" data-color-hex="#bfdadc"></a>
|
||||
<a class="color" style="background-color:#c7def8" data-color-hex="#c7def8"></a>
|
||||
<a class="color" style="background-color:#bfd4f2" data-color-hex="#bfd4f2"></a>
|
||||
<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
|
||||
<a class="color" style="background-color:#d4c5f9" data-color-hex="#d4c5f9"></a>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
<div class="navbar">
|
||||
{{template "repo/issue/navbar" .}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
|
||||
</div>
|
||||
<div class="ui right">
|
||||
<div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui new-label segment hide">
|
||||
|
@ -16,11 +16,11 @@
|
|||
<div class="ui grid">
|
||||
<div class="five wide column">
|
||||
<div class="ui small input">
|
||||
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
||||
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color picker column">
|
||||
<input class="color-picker" name="color" value="#70c24a" required>
|
||||
<input class="color-picker" name="color" value="#70c24a" required>
|
||||
</div>
|
||||
<div class="column precolors">
|
||||
{{template "repo/issue/label_precolors"}}
|
||||
|
@ -38,72 +38,72 @@
|
|||
|
||||
<div class="label list">
|
||||
{{range .Labels}}
|
||||
<li class="item">
|
||||
<div class="ui label" style="background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
|
||||
{{if $.IsRepositoryAdmin}}
|
||||
<a class="ui right delete-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
||||
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
||||
{{end}}
|
||||
<a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
|
||||
</li>
|
||||
<li class="item">
|
||||
<div class="ui label" style="background-color: {{.Color}}"><i class="octicon octicon-tag"></i> {{.Name}}</div>
|
||||
{{if $.IsRepositoryAdmin}}
|
||||
<a class="ui right delete-button" href="#" data-url="{{$.RepoLink}}/labels/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
||||
<a class="ui right edit-label-button" href="#" data-id={{.ID}} data-title={{.Name}} data-color={{.Color}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
||||
{{end}}
|
||||
<a class="ui right open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}"><i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a>
|
||||
</li>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.issues.label_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.issues.label_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.issues.label_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui small edit-label modal">
|
||||
<div class="header">
|
||||
{{.i18n.Tr "repo.issues.label_modify"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input id="label-modal-id" name="id" type="hidden">
|
||||
<div class="ui grid">
|
||||
<div class="five wide column">
|
||||
<div class="ui small input">
|
||||
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
||||
<div class="ui small edit-label modal">
|
||||
<div class="header">
|
||||
{{.i18n.Tr "repo.issues.label_modify"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<form class="ui edit-label form" action="{{$.RepoLink}}/labels/edit" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<input id="label-modal-id" name="id" type="hidden">
|
||||
<div class="ui grid">
|
||||
<div class="five wide column">
|
||||
<div class="ui small input">
|
||||
<input class="new-label-input" name="title" placeholder="{{.i18n.Tr "repo.issues.new_label_placeholder"}}" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="color picker column">
|
||||
<input class="color-picker" name="color" value="#70c24a" required>
|
||||
</div>
|
||||
<div class="column precolors">
|
||||
{{template "repo/issue/label_precolors"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="color picker column">
|
||||
<input class="color-picker" name="color" value="#70c24a" required>
|
||||
</div>
|
||||
<div class="column precolors">
|
||||
{{template "repo/issue/label_precolors"}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui negative button">
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui negative button">
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui positive right labeled icon button">
|
||||
{{.i18n.Tr "modal.modify"}}
|
||||
<i class="checkmark icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui positive right labeled icon button">
|
||||
{{.i18n.Tr "modal.modify"}}
|
||||
<i class="checkmark icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -6,22 +6,22 @@
|
|||
{{template "repo/issue/navbar" .}}
|
||||
<div class="ui right">
|
||||
{{if .PageIsIssueList}}
|
||||
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
||||
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
||||
{{else}}
|
||||
<a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
|
||||
<a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui tiny basic status buttons">
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||
<i class="octicon octicon-issue-opened"></i>
|
||||
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||
<i class="octicon octicon-issue-closed"></i>
|
||||
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
||||
</a>
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||
<i class="octicon octicon-issue-opened"></i>
|
||||
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||
<i class="octicon octicon-issue-closed"></i>
|
||||
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui right floated secondary filter menu">
|
||||
<!-- Label -->
|
||||
|
@ -30,11 +30,11 @@
|
|||
{{.i18n.Tr "repo.issues.filter_label"}}
|
||||
<i class="dropdown icon"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
||||
{{range .Labels}}
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
||||
{{range .Labels}}
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}"><span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -44,11 +44,11 @@
|
|||
{{.i18n.Tr "repo.issues.filter_milestone"}}
|
||||
<i class="dropdown icon"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
||||
{{range .Milestones}}
|
||||
<a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
||||
{{range .Milestones}}
|
||||
<a class="{{if eq $.MilestoneID .ID}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.ID}}&assignee={{$.AssigneeID}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -58,11 +58,11 @@
|
|||
{{.i18n.Tr "repo.issues.filter_assignee"}}
|
||||
<i class="dropdown icon"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
|
||||
{{range .Assignees}}
|
||||
<a class="{{if eq $.AssigneeID .Id}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.Id}}"><img src="{{.AvatarLink}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="menu">
|
||||
<a class="item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_assginee_no_select"}}</a>
|
||||
{{range .Assignees}}
|
||||
<a class="{{if eq $.AssigneeID .Id}}active selected{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.Id}}"><img src="{{.AvatarLink}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -72,11 +72,11 @@
|
|||
{{.i18n.Tr "repo.issues.filter_type"}}
|
||||
<i class="dropdown icon"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
|
||||
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
||||
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a>
|
||||
<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
|
||||
<div class="menu">
|
||||
<a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
|
||||
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
||||
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?type=created_by&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}</a>
|
||||
<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -86,68 +86,68 @@
|
|||
{{.i18n.Tr "repo.issues.filter_sort"}}
|
||||
<i class="dropdown icon"></i>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||
<div class="menu">
|
||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="issue list">
|
||||
{{range .Issues}}
|
||||
{{ $timeStr:= TimeSince .Created $.Lang }}
|
||||
<li class="item">
|
||||
<div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div>
|
||||
<a class="title" href="{{$.Link}}/{{.Index}}">{{.Name}}</a>
|
||||
{{ $timeStr:= TimeSince .Created $.Lang }}
|
||||
<li class="item">
|
||||
<div class="ui {{if .IsRead}}black{{else}}green{{end}} label">#{{.Index}}</div>
|
||||
<a class="title" href="{{$.Link}}/{{.Index}}">{{.Name}}</a>
|
||||
|
||||
{{range .Labels}}
|
||||
<a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="background-color: {{.Color}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
|
||||
{{if .NumComments}}
|
||||
<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
|
||||
{{end}}
|
||||
|
||||
<p class="desc">
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
|
||||
{{if .Milestone}}
|
||||
<a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
|
||||
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .Assignee}}
|
||||
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
|
||||
<img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
|
||||
</a>
|
||||
{{end}}
|
||||
</p>
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{range .Labels}}
|
||||
<a class="ui label" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="background-color: {{.Color}}">{{.Name}}</a>
|
||||
{{end}}
|
||||
|
||||
{{if .NumComments}}
|
||||
<span class="comment ui right"><i class="octicon octicon-comment"></i> {{.NumComments}}</span>
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="desc">
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $timeStr .Poster.HomeLink .Poster.Name | Safe}}
|
||||
{{if .Milestone}}
|
||||
<a class="milestone" href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{.Milestone.ID}}&assignee={{$.AssigneeID}}">
|
||||
<span class="octicon octicon-milestone"></span> {{.Milestone.Name}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .Assignee}}
|
||||
<a class="ui right assignee poping up" href="{{.Assignee.HomeLink}}" data-content="{{.Assignee.Name}}" data-variation="inverted" data-position="left center">
|
||||
<img class="ui avatar image" src="{{.Assignee.AvatarLink}}">
|
||||
</a>
|
||||
{{end}}
|
||||
</p>
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?type={{$.ViewType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}&page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,64 +5,64 @@
|
|||
<div class="navbar">
|
||||
{{template "repo/issue/navbar" .}}
|
||||
{{if and .IsRepositoryAdmin .PageIsEditMilestone}}
|
||||
<div class="ui right floated secondary menu">
|
||||
<a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
|
||||
</div>
|
||||
<div class="ui right floated secondary menu">
|
||||
<a class="ui green button" href="{{$.RepoLink}}/milestones/new">{{.i18n.Tr "repo.milestones.new"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
<h2 class="ui dividing header">
|
||||
{{if .PageIsEditMilestone}}
|
||||
{{.i18n.Tr "repo.milestones.edit"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.milestones.edit_subheader"}}</div>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.milestones.new"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.milestones.new_subheader"}}</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="eleven wide column">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.milestones.title"}}</label>
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.milestones.desc"}}</label>
|
||||
<textarea name="content">{{.content}}</textarea>
|
||||
</div>
|
||||
<h2 class="ui dividing header">
|
||||
{{if .PageIsEditMilestone}}
|
||||
{{.i18n.Tr "repo.milestones.edit"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.milestones.edit_subheader"}}</div>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.milestones.new"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.milestones.new_subheader"}}</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="eleven wide column">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.milestones.title"}}</label>
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" autofocus required>
|
||||
</div>
|
||||
<div class="four wide column">
|
||||
<div class="field {{if .Err_Deadline}}error{{end}}">
|
||||
<label>
|
||||
{{.i18n.Tr "repo.milestones.due_date"}}
|
||||
<a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
|
||||
</label>
|
||||
<input id="deadline" name="deadline" value="{{.deadline}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.milestones.desc"}}</label>
|
||||
<textarea name="content">{{.content}}</textarea>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui right">
|
||||
{{if .PageIsEditMilestone}}
|
||||
</div>
|
||||
<div class="four wide column">
|
||||
<div class="field {{if .Err_Deadline}}error{{end}}">
|
||||
<label>
|
||||
{{.i18n.Tr "repo.milestones.due_date"}}
|
||||
<a id="clear-date" href="#">{{.i18n.Tr "repo.milestones.clear"}}</a>
|
||||
</label>
|
||||
<input id="deadline" name="deadline" value="{{.deadline}}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<input class="milestone datepicker" data-lang="{{.DateLang}}" data-start-date="{{.deadline}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui right">
|
||||
{{if .PageIsEditMilestone}}
|
||||
<a class="ui blue basic button" href="{{.RepoLink}}/milestones">
|
||||
{{.i18n.Tr "repo.milestones.cancel"}}
|
||||
</a>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.milestones.modify"}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{else}}
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.milestones.create"}}
|
||||
</button>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -5,113 +5,113 @@
|
|||
<div class="navbar">
|
||||
{{template "repo/issue/navbar" .}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
|
||||
</div>
|
||||
<div class="ui right">
|
||||
<a class="ui green button" href="{{$.Link}}/new">{{.i18n.Tr "repo.milestones.new"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui tiny basic buttons">
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
|
||||
</a>
|
||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{.RepoLink}}/milestones?state=open">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.milestones.open_tab" .OpenCount}}
|
||||
</a>
|
||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{.RepoLink}}/milestones?state=closed">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.milestones.close_tab" .ClosedCount}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="milestone list">
|
||||
{{range .Milestones}}
|
||||
<li class="item">
|
||||
<i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a>
|
||||
<div class="ui right green progress" data-percent="{{.Completeness}}">
|
||||
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
|
||||
<div class="progress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSince .ClosedDate $.Lang }}
|
||||
{{if .IsClosed}}
|
||||
<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
<span class="octicon octicon-calendar"></span>
|
||||
{{if .DeadlineString}}
|
||||
<span {{if .IsOverDue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
|
||||
<li class="item">
|
||||
<i class="octicon octicon-milestone"></i> <a href="{{$.RepoLink}}/issues?state={{$.State}}&milestone={{.ID}}">{{.Name}}</a>
|
||||
<div class="ui right green progress" data-percent="{{.Completeness}}">
|
||||
<div class="bar" {{if not .Completeness}}style="background-color: transparent"{{end}}>
|
||||
<div class="progress"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSince .ClosedDate $.Lang }}
|
||||
{{if .IsClosed}}
|
||||
<span class="octicon octicon-clock"></span> {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
{{$.i18n.Tr "repo.milestones.no_due_date"}}
|
||||
<span class="octicon octicon-calendar"></span>
|
||||
{{if .DeadlineString}}
|
||||
<span {{if .IsOverDue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
|
||||
{{else}}
|
||||
{{$.i18n.Tr "repo.milestones.no_due_date"}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<span class="issue-stats">
|
||||
<i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}}
|
||||
<i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
|
||||
</span>
|
||||
</div>
|
||||
{{if $.IsRepositoryAdmin}}
|
||||
<div class="ui right operate">
|
||||
<a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
||||
{{if .IsClosed}}
|
||||
<a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a>
|
||||
{{else}}
|
||||
<a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a>
|
||||
{{end}}
|
||||
<a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
||||
</div>
|
||||
{{if .Content}}
|
||||
<div class="content">
|
||||
{{.RenderedContent|Str2html}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<span class="issue-stats">
|
||||
<i class="octicon octicon-issue-opened"></i> {{$.i18n.Tr "repo.issues.open_tab" .NumOpenIssues}}
|
||||
<i class="octicon octicon-issue-closed"></i> {{$.i18n.Tr "repo.issues.close_tab" .NumClosedIssues}}
|
||||
</span>
|
||||
</div>
|
||||
{{if $.IsRepositoryAdmin}}
|
||||
<div class="ui right operate">
|
||||
<a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-pencil"></i> {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
||||
{{if .IsClosed}}
|
||||
<a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-check"></i> {{$.i18n.Tr "repo.milestones.open"}}</a>
|
||||
{{else}}
|
||||
<a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}><i class="octicon octicon-x"></i> {{$.i18n.Tr "repo.milestones.close"}}</a>
|
||||
{{end}}
|
||||
<a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}"><i class="octicon octicon-trashcan"></i> {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
||||
</div>
|
||||
{{if .Content}}
|
||||
<div class="content">
|
||||
{{.RenderedContent|Str2html}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</li>
|
||||
</li>
|
||||
{{end}}
|
||||
|
||||
|
||||
{{with .Page}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?state={{$.State}}&page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?state={{$.State}}&page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?state={{$.State}}&page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="center page buttons">
|
||||
<div class="ui borderless pagination menu">
|
||||
<a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?state={{$.State}}&page={{.Previous}}"{{end}}>
|
||||
<i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
|
||||
</a>
|
||||
{{range .Pages}}
|
||||
{{if eq .Num -1}}
|
||||
<a class="disabled item">...</a>
|
||||
{{else}}
|
||||
<a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?state={{$.State}}&page={{.Num}}"{{end}}>{{.Num}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?state={{$.State}}&page={{.Next}}"{{end}}>
|
||||
{{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.milestones.deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.milestones.deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.milestones.deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="ui compact small menu">
|
||||
<a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
|
||||
<a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
|
||||
</div>
|
||||
<a class="{{if .PageIsLabels}}active{{end}} item" href="{{.RepoLink}}/labels">{{.i18n.Tr "repo.labels"}}</a>
|
||||
<a class="{{if .PageIsMilestones}}active{{end}} item" href="{{.RepoLink}}/milestones">{{.i18n.Tr "repo.milestones"}}</a>
|
||||
</div>
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
{{template "repo/issue/new_form" .}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
<form class="ui comment form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if .Flash}}
|
||||
<div class="sixteen wide column">
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="twelve wide column">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{if .Flash}}
|
||||
<div class="sixteen wide column">
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="twelve wide column">
|
||||
<div class="ui comments">
|
||||
<div class="comment">
|
||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.AvatarLink}}">
|
||||
</a>
|
||||
<div class="ui segment content">
|
||||
<div class="field">
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
|
||||
</div>
|
||||
<div class="comment">
|
||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.AvatarLink}}">
|
||||
</a>
|
||||
<div class="ui segment content">
|
||||
<div class="field">
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{.title}}" tabindex="3" autofocus required>
|
||||
</div>
|
||||
{{template "repo/issue/comment_tab" .}}
|
||||
<div class="text right">
|
||||
<div class="text right">
|
||||
<button class="ui green button">
|
||||
{{if .PageIsComparePull}}
|
||||
{{.i18n.Tr "repo.pulls.create"}}
|
||||
{{.i18n.Tr "repo.pulls.create"}}
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.issues.create"}}
|
||||
{{.i18n.Tr "repo.issues.create"}}
|
||||
{{end}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -38,18 +38,18 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="filter menu" data-id="#label_ids">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||
{{range .Labels}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="filter menu" data-id="#label_ids">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||
{{range .Labels}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui labels list">
|
||||
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
||||
{{range .Labels}}
|
||||
<a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
|
||||
{{end}}
|
||||
{{range .Labels}}
|
||||
<a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
|
@ -60,35 +60,35 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||
</div>
|
||||
{{range .OpenMilestones}}
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||
</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="menu">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||
</div>
|
||||
{{range .OpenMilestones}}
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||
</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-milestone list">
|
||||
<span class="no-select item {{if .Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Milestone}}
|
||||
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
|
||||
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Milestone.ID}}"> {{.Milestone.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -101,21 +101,21 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="menu">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
||||
{{range .Assignees}}
|
||||
<div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
<div class="menu">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
||||
{{range .Assignees}}
|
||||
<div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-assignee list">
|
||||
<span class="no-select item {{if .Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Assignee}}
|
||||
<a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.Id}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
|
||||
<a class="item" href="{{.RepoLink}}/issues?assignee={{.Assignee.Id}}"><img class="ui avatar image" src="{{.Assignee.AvatarLink}}"> {{.Assignee.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
|
|
@ -6,22 +6,22 @@
|
|||
{{template "repo/issue/navbar" .}}
|
||||
<div class="ui right">
|
||||
{{if .PageIsIssueList}}
|
||||
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
||||
<a class="ui green button" href="{{.RepoLink}}/issues/new">{{.i18n.Tr "repo.issues.new"}}</a>
|
||||
{{else}}
|
||||
<a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
|
||||
<a class="ui green button {{if not .HasForkedRepo}}disabled{{end}}" href="{{.RepoLink}}/compare/{{.BranchName}}...{{.SignedUserName}}:{{.BranchName}}">{{.i18n.Tr "repo.pulls.new"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui divider"></div>
|
||||
{{if .Issue.IsPull}}
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{template "repo/pulls/tab_menu" .}}
|
||||
<div class="ui bottom attached tab pull segment active" data-tab="request-{{.ID}}">
|
||||
{{template "repo/issue/view_content" .}}
|
||||
</div>
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{template "repo/pulls/tab_menu" .}}
|
||||
<div class="ui bottom attached tab pull segment active" data-tab="request-{{.ID}}">
|
||||
{{template "repo/issue/view_content" .}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{template "repo/issue/view_content" .}}
|
||||
{{template "repo/issue/view_content" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,234 +1,232 @@
|
|||
<div class="ui grid">
|
||||
{{if .Flash}}
|
||||
<div class="sixteen wide column">
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Issue.IsPull}}
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{end}}
|
||||
|
||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||
<div class="sixteen wide column">
|
||||
{{template "base/alert" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .Issue.IsPull}}
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{end}}
|
||||
|
||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||
<div class="twelve wide column comment-list">
|
||||
<ui class="ui comments">
|
||||
<div class="comment">
|
||||
<a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||
<img src="{{.Issue.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<ui class="ui comments">
|
||||
<div class="comment">
|
||||
<a class="avatar" {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||
<img src="{{.Issue.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui top attached header">
|
||||
<span class="text grey"><a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a> {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}}</span>
|
||||
<div class="ui right actions">
|
||||
{{if .IsIssueOwner}}
|
||||
<a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
<div class="render-content markdown emojify">
|
||||
{{if .Issue.RenderedContent}}
|
||||
{{.Issue.RenderedContent|Str2html}}
|
||||
{{else}}
|
||||
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="raw-content hide">{{.Issue.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}"></div>
|
||||
</div>
|
||||
{{if .Issue.Attachments}}
|
||||
<div class="ui bottom attached segment">
|
||||
<div class="ui small images">
|
||||
{{range .Issue.Attachments}}
|
||||
<a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
|
||||
{{end}}
|
||||
<div class="ui right actions">
|
||||
{{if .IsIssueOwner}}
|
||||
<a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{range .Issue.Comments}}
|
||||
{{ $createdStr:= TimeSince .Created $.Lang }}
|
||||
|
||||
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
|
||||
{{if eq .Type 0}}
|
||||
<div class="comment">
|
||||
<a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui top attached header">
|
||||
<span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
||||
<div class="ui right actions">
|
||||
{{if gt .ShowTag 0}}
|
||||
<div class="item tag">
|
||||
{{if eq .ShowTag 1}}
|
||||
{{$.i18n.Tr "repo.issues.poster"}}
|
||||
{{else if eq .ShowTag 2}}
|
||||
{{$.i18n.Tr "repo.issues.admin"}}
|
||||
{{else if eq .ShowTag 3}}
|
||||
{{$.i18n.Tr "repo.issues.owner"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}}
|
||||
<a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
<div class="render-content markdown emojify">
|
||||
{{if .Issue.RenderedContent}}
|
||||
{{.Issue.RenderedContent|Str2html}}
|
||||
{{else}}
|
||||
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="raw-content hide">{{.Issue.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issue-{{.Issue.ID}}-write" data-preview="issue-{{.Issue.ID}}-preview" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-context="{{.RepoLink}}"></div>
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
<div class="render-content markdown emojify">
|
||||
{{if .RenderedContent}}
|
||||
{{.RenderedContent|Str2html}}
|
||||
{{else}}
|
||||
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}"></div>
|
||||
</div>
|
||||
{{if .Attachments}}
|
||||
<div class="ui bottom attached segment">
|
||||
<div class="ui small images">
|
||||
{{range .Attachments}}
|
||||
<a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
|
||||
{{end}}
|
||||
{{if .Issue.Attachments}}
|
||||
<div class="ui bottom attached segment">
|
||||
<div class="ui small images">
|
||||
{{range .Issue.Attachments}}
|
||||
<a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{range .Issue.Comments}}
|
||||
{{ $createdStr:= TimeSince .Created $.Lang }}
|
||||
|
||||
<!-- 0 = COMMENT, 1 = REOPEN, 2 = CLOSE, 3 = ISSUE_REF, 4 = COMMIT_REF, 5 = COMMENT_REF, 6 = PULL_REF -->
|
||||
{{if eq .Type 0}}
|
||||
<div class="comment">
|
||||
<a class="avatar" {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui top attached header">
|
||||
<span class="text grey"><a {{if gt .Poster.Id 0}}href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}}</span>
|
||||
<div class="ui right actions">
|
||||
{{if gt .ShowTag 0}}
|
||||
<div class="item tag">
|
||||
{{if eq .ShowTag 1}}
|
||||
{{$.i18n.Tr "repo.issues.poster"}}
|
||||
{{else if eq .ShowTag 2}}
|
||||
{{$.i18n.Tr "repo.issues.admin"}}
|
||||
{{else if eq .ShowTag 3}}
|
||||
{{$.i18n.Tr "repo.issues.owner"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{if or $.IsRepositoryAdmin (eq .Poster.Id $.SignedUserID)}}
|
||||
<a class="edit-content item" href="#"><i class="octicon octicon-pencil"></i></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui attached segment">
|
||||
<div class="render-content markdown emojify">
|
||||
{{if .RenderedContent}}
|
||||
{{.RenderedContent|Str2html}}
|
||||
{{else}}
|
||||
<span class="no-content">{{$.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="raw-content hide">{{.Content}}</div>
|
||||
<div class="edit-content-zone hide" data-write="issuecomment-{{.ID}}-write" data-preview="issuecomment-{{.ID}}-preview" data-update-url="{{$.RepoLink}}/comments/{{.ID}}" data-context="{{$.RepoLink}}"></div>
|
||||
</div>
|
||||
{{if .Attachments}}
|
||||
<div class="ui bottom attached segment">
|
||||
<div class="ui small images">
|
||||
{{range .Attachments}}
|
||||
<a target="_blank" href="{{AppSubUrl}}/attachments/{{.UUID}}"><img class="ui image" src="{{AppSubUrl}}/attachments/{{.UUID}}"></a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{else if eq .Type 1}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-primitive-dot"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
|
||||
</div>
|
||||
{{else if eq .Type 2}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-circle-slash"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
|
||||
</div>
|
||||
{{else if eq .Type 4}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-bookmark"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
||||
{{else if eq .Type 1}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-primitive-dot"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}</span>
|
||||
</div>
|
||||
{{else if eq .Type 2}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-circle-slash"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}</span>
|
||||
</div>
|
||||
{{else if eq .Type 4}}
|
||||
<div class="event">
|
||||
<span class="octicon octicon-bookmark"></span>
|
||||
<a class="ui avatar image" href="{{.Poster.HomeLink}}">
|
||||
<img src="{{.Poster.AvatarLink}}">
|
||||
</a>
|
||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
||||
|
||||
<div class="detail">
|
||||
<span class="octicon octicon-git-commit"></span>
|
||||
<span class="text grey">{{.Content | Str2html}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
<div class="detail">
|
||||
<span class="octicon octicon-git-commit"></span>
|
||||
<span class="text grey">{{.Content | Str2html}}</span>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{end}}
|
||||
|
||||
{{if .Issue.IsPull}}
|
||||
<div class="comment merge box">
|
||||
<a class="avatar text
|
||||
{{if .Issue.HasMerged}}purple
|
||||
{{else if .Issue.IsClosed}}grey
|
||||
{{else if .IsPullReuqestBroken}}red
|
||||
{{else if .Issue.IsChecking}}yellow
|
||||
{{else if .Issue.CanAutoMerge}}green
|
||||
{{else}}red{{end}}">
|
||||
<span class="mega-octicon octicon-git-merge"></span>
|
||||
</a>
|
||||
<div class="content">
|
||||
<div class="ui merge segment">
|
||||
{{if .Issue.HasMerged}}
|
||||
<div class="item text purple">
|
||||
{{$.i18n.Tr "repo.pulls.has_merged"}}
|
||||
</div>
|
||||
{{else if .Issue.IsClosed}}
|
||||
<div class="item text grey">
|
||||
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
|
||||
</div>
|
||||
{{else if .IsPullReuqestBroken}}
|
||||
<div class="item text red">
|
||||
<span class="octicon octicon-x"></span>
|
||||
{{$.i18n.Tr "repo.pulls.data_broken"}}
|
||||
</div>
|
||||
{{else if .Issue.IsChecking}}
|
||||
<div class="item text yellow">
|
||||
<span class="octicon octicon-sync"></span>
|
||||
{{$.i18n.Tr "repo.pulls.is_checking"}}
|
||||
</div>
|
||||
{{else if .Issue.CanAutoMerge}}
|
||||
<div class="item text green">
|
||||
<span class="octicon octicon-check"></span>
|
||||
{{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
|
||||
</div>
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui divider"></div>
|
||||
<div>
|
||||
<form class="ui form" action="{{.Link}}/merge" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<button class="ui green button">
|
||||
<span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="item text red">
|
||||
<span class="octicon octicon-x"></span>
|
||||
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
|
||||
</div>
|
||||
<div class="item text grey">
|
||||
<span class="octicon octicon-info"></span>
|
||||
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Issue.IsPull}}
|
||||
<div class="comment merge box">
|
||||
<a class="avatar text
|
||||
{{if .Issue.HasMerged}}purple
|
||||
{{else if .Issue.IsClosed}}grey
|
||||
{{else if .IsPullReuqestBroken}}red
|
||||
{{else if .Issue.IsChecking}}yellow
|
||||
{{else if .Issue.CanAutoMerge}}green
|
||||
{{else}}red{{end}}"><span class="mega-octicon octicon-git-merge"></span></a>
|
||||
<div class="content">
|
||||
<div class="ui merge segment">
|
||||
{{if .Issue.HasMerged}}
|
||||
<div class="item text purple">
|
||||
{{$.i18n.Tr "repo.pulls.has_merged"}}
|
||||
</div>
|
||||
{{else if .Issue.IsClosed}}
|
||||
<div class="item text grey">
|
||||
{{$.i18n.Tr "repo.pulls.reopen_to_merge"}}
|
||||
</div>
|
||||
{{else if .IsPullReuqestBroken}}
|
||||
<div class="item text red">
|
||||
<span class="octicon octicon-x"></span>
|
||||
{{$.i18n.Tr "repo.pulls.data_broken"}}
|
||||
</div>
|
||||
{{else if .Issue.IsChecking}}
|
||||
<div class="item text yellow">
|
||||
<span class="octicon octicon-sync"></span>
|
||||
{{$.i18n.Tr "repo.pulls.is_checking"}}
|
||||
</div>
|
||||
{{else if .Issue.CanAutoMerge}}
|
||||
<div class="item text green">
|
||||
<span class="octicon octicon-check"></span>
|
||||
{{$.i18n.Tr "repo.pulls.can_auto_merge_desc"}}
|
||||
</div>
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui divider"></div>
|
||||
<div>
|
||||
<form class="ui form" action="{{.Link}}/merge" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<button class="ui green button">
|
||||
<span class="octicon octicon-git-merge"></span> {{$.i18n.Tr "repo.pulls.merge_pull_request"}}
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<div class="item text red">
|
||||
<span class="octicon octicon-x"></span>
|
||||
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_desc"}}
|
||||
</div>
|
||||
<div class="item text grey">
|
||||
<span class="octicon octicon-info"></span>
|
||||
{{$.i18n.Tr "repo.pulls.cannot_auto_merge_helper"}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if .IsSigned}}
|
||||
<div class="comment form">
|
||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
||||
{{template "repo/issue/comment_tab" .}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<input id="status" name="status" type="hidden">
|
||||
<div class="text right">
|
||||
{{if and .IsIssueOwner (not .DisableStatusChange)}}
|
||||
{{if .Issue.IsClosed}}
|
||||
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
||||
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div id="status-button" class="ui red basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
|
||||
{{.i18n.Tr "repo.issues.close_issue"}}
|
||||
</div>
|
||||
<div class="comment form">
|
||||
<a class="avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.AvatarLink}}">
|
||||
</a>
|
||||
<div class="content">
|
||||
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
||||
{{template "repo/issue/comment_tab" .}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<input id="status" name="status" type="hidden">
|
||||
<div class="text right">
|
||||
{{if and .IsIssueOwner (not .DisableStatusChange)}}
|
||||
{{if .Issue.IsClosed}}
|
||||
<div id="status-button" class="ui green basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.reopen_comment_issue"}}" data-status-val="reopen">
|
||||
{{.i18n.Tr "repo.issues.reopen_issue"}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div id="status-button" class="ui red basic button" tabindex="6" data-status="{{.i18n.Tr "repo.issues.close_issue"}}" data-status-and-comment="{{.i18n.Tr "repo.issues.close_comment_issue"}}" data-status-val="close">
|
||||
{{.i18n.Tr "repo.issues.close_issue"}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<button class="ui green button" tabindex="5">
|
||||
{{.i18n.Tr "repo.issues.create_comment"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui warning message">
|
||||
<a href="{{AppSubUrl}}/user/sign_up" class="ui green button">{{.i18n.Tr "repo.issues.sign_up_for_free"}}</a>
|
||||
{{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
|
||||
</div>
|
||||
{{end}}
|
||||
</ui>
|
||||
<button class="ui green button" tabindex="5">
|
||||
{{.i18n.Tr "repo.issues.create_comment"}}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="ui warning message">
|
||||
<a href="{{AppSubUrl}}/user/sign_up" class="ui green button">{{.i18n.Tr "repo.issues.sign_up_for_free"}}</a>
|
||||
{{.i18n.Tr "repo.issues.sign_in_require_desc" .SignInLink | Safe}}
|
||||
</div>
|
||||
{{end}}
|
||||
</ui>
|
||||
</div>
|
||||
|
||||
<div class="four wide column">
|
||||
|
@ -238,18 +236,18 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.labels"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="filter menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/label">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||
{{range .Labels}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
<div class="filter menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/label">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_labels"}}</div>
|
||||
{{range .Labels}}
|
||||
<a class="{{if .IsChecked}}checked{{end}} item" href="#" data-id="{{.ID}}" data-id-selector="#label_{{.ID}}"><span class="octicon {{if .IsChecked}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui labels list">
|
||||
<span class="no-select item {{if .HasSelectedLabel}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_label"}}</span>
|
||||
{{range .Labels}}
|
||||
<a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
|
||||
{{end}}
|
||||
{{range .Labels}}
|
||||
<a class="{{if not .IsChecked}}hide{{end}} item" id="label_{{.ID}}" href="{{$.RepoLink}}/issues?labels={{.ID}}"><span class="label color" style="background-color: {{.Color}}"></span> <span class="text">{{.Name}}</span></a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
|
@ -259,35 +257,35 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.milestone"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/milestone">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||
</div>
|
||||
{{range .OpenMilestones}}
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||
</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/milestone">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_milestone"}}</div>
|
||||
{{if .OpenMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.open_milestone"}}
|
||||
</div>
|
||||
{{range .OpenMilestones}}
|
||||
<div class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{if .ClosedMilestones}}
|
||||
<div class="divider"></div>
|
||||
<div class="header">
|
||||
<i class="octicon octicon-milestone"></i>
|
||||
{{.i18n.Tr "repo.issues.new.closed_milestone"}}
|
||||
</div>
|
||||
{{range .ClosedMilestones}}
|
||||
<a class="item" data-id="{{.ID}}" data-href="{{$.RepoLink}}/issues?milestone={{.ID}}"> {{.Name}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-milestone list">
|
||||
<span class="no-select item {{if .Issue.Milestone}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_milestone"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Issue.Milestone}}
|
||||
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
|
||||
<a class="item" href="{{.RepoLink}}/issues?milestone={{.Issue.Milestone.ID}}"> {{.Issue.Milestone.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -300,18 +298,18 @@
|
|||
<strong>{{.i18n.Tr "repo.issues.new.assignee"}}</strong>
|
||||
<span class="octicon octicon-gear"></span>
|
||||
</span>
|
||||
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
||||
{{range .Assignees}}
|
||||
<div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
<div class="menu" data-action="update" data-update-url="{{$.RepoLink}}/issues/{{$.Issue.Index}}/assignee">
|
||||
<div class="no-select item">{{.i18n.Tr "repo.issues.new.clear_assignee"}}</div>
|
||||
{{range .Assignees}}
|
||||
<div class="item" data-id="{{.Id}}" data-href="{{$.RepoLink}}/issues?assignee={{.Id}}" data-avatar="{{.AvatarLink}}"><img src="{{.AvatarLink}}"> {{.Name}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui select-assignee list">
|
||||
<span class="no-select item {{if .Issue.Assignee}}hide{{end}}">{{.i18n.Tr "repo.issues.new.no_assignee"}}</span>
|
||||
<div class="selected">
|
||||
{{if .Issue.Assignee}}
|
||||
<a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.Id}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a>
|
||||
<a class="item" href="{{$.RepoLink}}/issues?assignee={{.Issue.Assignee.Id}}"><img class="ui avatar image" src="{{.Issue.Assignee.AvatarLink}}"> {{.Issue.Assignee.Name}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -322,22 +320,22 @@
|
|||
<div class="hide" id="edit-content-form">
|
||||
<div class="ui comment form">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="active write item">{{$.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "repo.release.preview"}}</a>
|
||||
<a class="active write item">{{$.i18n.Tr "repo.release.write"}}</a>
|
||||
<a class="preview item" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{$.RepoLink}}">{{$.i18n.Tr "repo.release.preview"}}</a>
|
||||
</div>
|
||||
<div class="ui bottom attached active write tab segment">
|
||||
<textarea tabindex="1" id="content" name="content"></textarea>
|
||||
<textarea tabindex="1" id="content" name="content"></textarea>
|
||||
</div>
|
||||
<div class="ui bottom attached tab preview segment markdown emojify">
|
||||
{{$.i18n.Tr "repo.release.loading"}}
|
||||
{{$.i18n.Tr "repo.release.loading"}}
|
||||
</div>
|
||||
<div class="text right edit buttons">
|
||||
<div class="text right edit buttons">
|
||||
<div class="ui basic blue cancel button" tabindex="3">{{.i18n.Tr "repo.issues.cancel"}}</div>
|
||||
<div class="ui green save button" tabindex="2">{{.i18n.Tr "repo.issues.save"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hide" id="no-content">
|
||||
<span class="no-content">{{.i18n.Tr "repo.issues.no_content"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,47 +3,47 @@
|
|||
<h1 class="twelve wide column">
|
||||
<span class="index">#{{.Issue.Index}}</span> <span id="issue-title">{{.Issue.Name}}</span>
|
||||
<div id="edit-title-input" class="ui input" style="display: none">
|
||||
<input value="{{.Issue.Name}}">
|
||||
<input value="{{.Issue.Name}}">
|
||||
</div>
|
||||
</h1>
|
||||
{{if .IsIssueOwner}}
|
||||
<div class="four wide column">
|
||||
<div class="edit-zone text right">
|
||||
<div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
|
||||
<div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
|
||||
<div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
|
||||
<div class="four wide column">
|
||||
<div class="edit-zone text right">
|
||||
<div id="edit-title" class="ui basic green not-in-edit button">{{.i18n.Tr "repo.issues.edit"}}</div>
|
||||
<div id="cancel-edit-title" class="ui basic blue in-edit button" style="display: none">{{.i18n.Tr "repo.issues.cancel"}}</div>
|
||||
<div id="save-edit-title" class="ui green in-edit button" style="display: none" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/title">{{.i18n.Tr "repo.issues.save"}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .HasMerged}}
|
||||
<div class="ui purple large label"><i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls.merged"}}</div>
|
||||
<div class="ui purple large label"><i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls.merged"}}</div>
|
||||
{{else if .Issue.IsClosed}}
|
||||
<div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
|
||||
<div class="ui red large label"><i class="octicon octicon-issue-closed"></i> {{.i18n.Tr "repo.issues.closed_title"}}</div>
|
||||
{{else}}
|
||||
<div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
|
||||
<div class="ui green large label"><i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues.open_title"}}</div>
|
||||
{{end}}
|
||||
|
||||
{{if .Issue.IsPull}}
|
||||
{{if .Issue.HasMerged}}
|
||||
{{ $mergedStr:= TimeSince .Issue.Merged $.Lang }}
|
||||
<a {{if gt .Issue.Merger.Id 0}}href="{{.Issue.Merger.HomeLink}}"{{end}}>{{.Issue.Merger.Name}}</a>
|
||||
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Safe}}</span>
|
||||
{{ $mergedStr:= TimeSince .Issue.Merged $.Lang }}
|
||||
<a {{if gt .Issue.Merger.Id 0}}href="{{.Issue.Merger.HomeLink}}"{{end}}>{{.Issue.Merger.Name}}</a>
|
||||
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.merged_title_desc" .NumCommits .HeadTarget .BaseTarget $mergedStr | Safe}}</span>
|
||||
{{else}}
|
||||
<a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
|
||||
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
|
||||
<a {{if gt .Issue.Poster.Id 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.Name}}</a>
|
||||
<span class="pull-desc">{{$.i18n.Tr "repo.pulls.title_desc" .NumCommits .HeadTarget .BaseTarget | Str2html}}</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||
<span class="time-desc">
|
||||
{{if gt .Issue.Poster.Id 0}}
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}}
|
||||
{{else}}
|
||||
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
|
||||
{{end}}
|
||||
·
|
||||
{{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
|
||||
</span>
|
||||
{{ $createdStr:= TimeSince .Issue.Created $.Lang }}
|
||||
<span class="time-desc">
|
||||
{{if gt .Issue.Poster.Id 0}}
|
||||
{{$.i18n.Tr "repo.issues.opened_by" $createdStr .Issue.Poster.HomeLink .Issue.Poster.Name | Safe}}
|
||||
{{else}}
|
||||
{{$.i18n.Tr "repo.issues.opened_by_fake" $createdStr .Issue.Poster.Name | Safe}}
|
||||
{{end}}
|
||||
·
|
||||
{{$.i18n.Tr "repo.issues.num_comments" .Issue.NumComments}}
|
||||
</span>
|
||||
{{end}}
|
||||
<div class="ui divider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -3,99 +3,99 @@
|
|||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_migrate"}}
|
||||
{{.i18n.Tr "new_migrate"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_CloneAddr}}error{{end}}">
|
||||
<label for="clone_addr">{{.i18n.Tr "repo.migrate.clone_address"}}</label>
|
||||
<input id="clone_addr" name="clone_addr" value="{{.clone_addr}}" autofocus required>
|
||||
<span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}</span>
|
||||
<span class="help">{{.i18n.Tr "repo.migrate.clone_address_desc"}}</span>
|
||||
</div>
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Auth}}text red active{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "repo.need_auth"}}
|
||||
</div>
|
||||
<div class="content {{if .Err_Auth}}active{{end}}">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<label for="auth_username">{{.i18n.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<label for="auth_password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui accordion optional field">
|
||||
<div class="title {{if .Err_Auth}}text red active{{end}}">
|
||||
<i class="icon dropdown"></i>
|
||||
{{.i18n.Tr "repo.need_auth"}}
|
||||
</div>
|
||||
<div class="content {{if .Err_Auth}}active{{end}}">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<label for="auth_username">{{.i18n.Tr "username"}}</label>
|
||||
<input id="auth_username" name="auth_username" value="{{.auth_username}}" {{if not .auth_username}}data-need-clear="true"{{end}}>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="inline field {{if .Err_Auth}}error{{end}}">
|
||||
<label for="auth_password">{{.i18n.Tr "password"}}</label>
|
||||
<input id="auth_password" name="auth_password" type="password" value="{{.auth_password}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui checkbox">
|
||||
{{if .IsForcedPrivate}}
|
||||
<input name="private" type="checkbox" checked readonly>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
|
||||
{{else}}
|
||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.migrate_type"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui checkbox">
|
||||
{{if .IsForcedPrivate}}
|
||||
<input name="private" type="checkbox" checked readonly>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper_forced" | Safe}}</label>
|
||||
{{else}}
|
||||
<input name="private" type="checkbox" {{if .private}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.migrate_type"}}</label>
|
||||
<div class="ui checkbox">
|
||||
<input name="mirror" type="checkbox" {{if .mirror}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.migrate_type_helper" | Safe}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.migrate_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.migrate_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<div class="ui divider"></div>
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{template "repo/pulls/tab_menu" .}}
|
||||
<div class="ui bottom attached tab pull segment active">
|
||||
<div class="ui bottom attached tab pull segment active">
|
||||
{{template "repo/commits_table" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -4,63 +4,63 @@
|
|||
<div class="ui container">
|
||||
<div class="sixteen wide column page grid">
|
||||
<h2 class="ui header">
|
||||
{{.i18n.Tr "repo.pulls.compare_changes"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
|
||||
{{.i18n.Tr "repo.pulls.compare_changes"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.pulls.compare_changes_desc"}}</div>
|
||||
</h2>
|
||||
<div class="ui segment choose branch">
|
||||
<span class="octicon octicon-git-compare"></span>
|
||||
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<span class="text">{{.i18n.Tr "repo.pulls.compare_base"}}: {{$.BaseBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
{{range .Branches}}
|
||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
{{range .Branches}}
|
||||
<div class="item {{if eq $.BaseBranch .}}selected{{end}}" data-url="{{$.RepoLink}}/compare/{{.}}...{{$.SignedUser.Name}}:{{$.HeadBranch}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
...
|
||||
</div>
|
||||
...
|
||||
<div class="ui floating filter dropdown">
|
||||
<div class="ui basic small button">
|
||||
<span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<span class="text">{{.i18n.Tr "repo.pulls.compare_compare"}}: {{$.HeadBranch}}</span>
|
||||
<i class="dropdown icon"></i>
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
{{range .HeadBranches}}
|
||||
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="menu">
|
||||
<div class="ui icon search input">
|
||||
<i class="filter icon"></i>
|
||||
<input name="search" placeholder="{{.i18n.Tr "repo.pulls.filter_branch"}}...">
|
||||
</div>
|
||||
<div class="scrolling menu">
|
||||
{{range .HeadBranches}}
|
||||
<div class="{{if eq $.HeadBranch .}}selected{{end}} item" data-url="{{$.RepoLink}}/compare/{{$.BaseBranch}}...{{$.SignedUser.Name}}:{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .IsNothingToCompare}}
|
||||
<div class="ui segment">
|
||||
{{.i18n.Tr "repo.pulls.nothing_to_compare"}}
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
{{.i18n.Tr "repo.pulls.nothing_to_compare"}}
|
||||
</div>
|
||||
{{else if .HasPullRequest}}
|
||||
<div class="ui segment">
|
||||
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
|
||||
</div>
|
||||
<div class="ui segment">
|
||||
{{.i18n.Tr "repo.pulls.has_pull_request" $.RepoLink $.RepoRelPath .PullRequest.Index | Safe}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{template "repo/issue/new_form" .}}
|
||||
{{template "repo/commits_table" .}}
|
||||
{{template "repo/diff_box" .}}
|
||||
{{end}}
|
||||
{{template "repo/issue/new_form" .}}
|
||||
{{template "repo/commits_table" .}}
|
||||
{{template "repo/diff_box" .}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
<div class="ui divider"></div>
|
||||
{{template "repo/issue/view_title" .}}
|
||||
{{template "repo/pulls/tab_menu" .}}
|
||||
<div class="ui bottom attached tab pull segment active">
|
||||
<div class="ui bottom attached tab pull segment active">
|
||||
{{template "repo/diff_box" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -3,69 +3,69 @@
|
|||
<div class="ui middle very relaxed page grid">
|
||||
<div class="column">
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.i18n.Tr "new_fork"}}
|
||||
{{.i18n.Tr "new_fork"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
{{if .IsOwnedBy $.SignedUser.Id}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.Id}}" required>
|
||||
<span class="text">
|
||||
<img class="ui mini image" src="{{.ContextUser.AvatarLink}}">
|
||||
{{.ContextUser.ShortName 20}}
|
||||
</span>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="{{.SignedUser.Id}}">
|
||||
<img class="ui mini image" src="{{.SignedUser.AvatarLink}}">
|
||||
{{.SignedUser.ShortName 20}}
|
||||
</div>
|
||||
{{range .Orgs}}
|
||||
{{if .IsOwnedBy $.SignedUser.Id}}
|
||||
<div class="item" data-value="{{.Id}}">
|
||||
<img class="ui mini image" src="{{.AvatarLink}}">
|
||||
{{.ShortName 20}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.fork_from"}}</label>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.fork_from"}}</label>
|
||||
<a href="{{AppSubUrl}}/{{.ForkFrom}}">{{.ForkFrom}}</a>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui read-only checkbox">
|
||||
<input type="checkbox" {{if .IsPrivate}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.i18n.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.i18n.Tr "repo.visibility"}}</label>
|
||||
<div class="ui read-only checkbox">
|
||||
<input type="checkbox" {{if .IsPrivate}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.visiblity_helper" | Safe}}</label>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.fork_visiblity_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.i18n.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.fork_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.fork_repo"}}
|
||||
</button>
|
||||
<a class="ui button" href="{{AppSubUrl}}/{{.ForkFrom}}">{{.i18n.Tr "cancel"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<div class="ui top attached pull tabular menu">
|
||||
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
|
||||
<span class="octicon octicon-comment-discussion"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_conversation"}}
|
||||
<span class="ui label">{{.Issue.NumComments}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
|
||||
<span class="octicon octicon-git-commit"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_commits"}}
|
||||
<span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
|
||||
<span class="octicon octicon-diff"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
|
||||
</a>
|
||||
</div>
|
||||
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
|
||||
<span class="octicon octicon-comment-discussion"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_conversation"}}
|
||||
<span class="ui label">{{.Issue.NumComments}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/commits"{{end}}>
|
||||
<span class="octicon octicon-git-commit"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_commits"}}
|
||||
<span class="ui label">{{if .NumCommits}}{{.NumCommits}}{{else}}N/A{{end}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullFiles}}active{{end}}" {{if .NumFiles}}href="{{.RepoLink}}/pulls/{{.Issue.Index}}/files"{{end}}>
|
||||
<span class="octicon octicon-diff"></span>
|
||||
{{$.i18n.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui label">{{if .NumFiles}}{{.NumFiles}}{{else}}N/A{{end}}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -1,80 +1,80 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository release">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h2 class="ui header">
|
||||
{{.i18n.Tr "repo.release.releases"}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<a class="ui small green button" href="{{$.RepoLink}}/releases/new">
|
||||
{{.i18n.Tr "repo.release.new_release"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
<ul id="release-list">
|
||||
{{range .Releases}}
|
||||
<li class="ui grid">
|
||||
<div class="ui four wide column meta">
|
||||
{{if .PublisherID}}
|
||||
{{if .IsDraft}}
|
||||
<span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
|
||||
{{else if .IsPrerelease}}
|
||||
<span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
|
||||
{{else}}
|
||||
<span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
|
||||
{{end}}
|
||||
<span class="tag text blue">
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
<span class="commit">
|
||||
<a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui twelve wide column detail">
|
||||
{{if .PublisherID}}
|
||||
<h3>
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
|
||||
{{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
|
||||
</h3>
|
||||
<p class="text grey">
|
||||
<span class="author">
|
||||
<img class="img-10" src="{{.Publisher.AvatarLink}}">
|
||||
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
|
||||
</span>
|
||||
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
|
||||
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
|
||||
</p>
|
||||
<div class="markdown desc">
|
||||
{{Str2html .Note}}
|
||||
</div>
|
||||
<div class="download">
|
||||
<h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<h4>
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
|
||||
</h4>
|
||||
<div class="download">
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<span class="dot"> </span>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
{{template "base/alert" .}}
|
||||
<h2 class="ui header">
|
||||
{{.i18n.Tr "repo.release.releases"}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<a class="ui small green button" href="{{$.RepoLink}}/releases/new">
|
||||
{{.i18n.Tr "repo.release.new_release"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
<ul id="release-list">
|
||||
{{range .Releases}}
|
||||
<li class="ui grid">
|
||||
<div class="ui four wide column meta">
|
||||
{{if .PublisherID}}
|
||||
{{if .IsDraft}}
|
||||
<span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span>
|
||||
{{else if .IsPrerelease}}
|
||||
<span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span>
|
||||
{{else}}
|
||||
<span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span>
|
||||
{{end}}
|
||||
<span class="tag text blue">
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
<span class="commit">
|
||||
<a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="ui twelve wide column detail">
|
||||
{{if .PublisherID}}
|
||||
<h3>
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a>
|
||||
{{if $.IsRepositoryAdmin}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
|
||||
</h3>
|
||||
<p class="text grey">
|
||||
<span class="author">
|
||||
<img class="img-10" src="{{.Publisher.AvatarLink}}">
|
||||
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a>
|
||||
</span>
|
||||
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}}
|
||||
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span>
|
||||
</p>
|
||||
<div class="markdown desc">
|
||||
{{Str2html .Note}}
|
||||
</div>
|
||||
<div class="download">
|
||||
<h2>{{$.i18n.Tr "repo.release.downloads"}}</h2>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{else}}
|
||||
<h4>
|
||||
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a>
|
||||
</h4>
|
||||
<div class="download">
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a>
|
||||
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
|
||||
</div>
|
||||
{{end}}
|
||||
<span class="dot"> </span>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,98 +1,98 @@
|
|||
{{template "base/head" .}}
|
||||
<div class="repository new release">
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<h2 class="ui dividing header">
|
||||
{{if .PageIsEditRelease}}
|
||||
{{.i18n.Tr "repo.release.edit_release"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.release.new_release"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="ui seven wide column target">
|
||||
<div class="inline field {{if .Err_TagName}}error{{end}}">
|
||||
{{if .PageIsEditRelease}}
|
||||
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
|
||||
{{else}}
|
||||
<input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required>
|
||||
<span class="at">@</span>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" name="tag_target" value="{{.tag_target}}"/>
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
<div class="text">
|
||||
{{.i18n.Tr "repo.release.target"}} :
|
||||
<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
|
||||
</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .Branches}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.release.title"}}</label>
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.release.content"}}</label>
|
||||
<textarea name="content">{{.content}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui text right">
|
||||
<div class="prerelease field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
|
||||
<label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span>
|
||||
<div class="field">
|
||||
{{if .PageIsEditRelease}}
|
||||
<a class="ui blue basic button" href="{{.RepoLink}}/releases">
|
||||
{{.i18n.Tr "repo.release.cancel"}}
|
||||
</a>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.release.edit_release"}}
|
||||
</button>
|
||||
<a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "repo.release.delete_release"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.release.publish"}}
|
||||
</button>
|
||||
<input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{template "repo/header" .}}
|
||||
<div class="ui container">
|
||||
<h2 class="ui dividing header">
|
||||
{{if .PageIsEditRelease}}
|
||||
{{.i18n.Tr "repo.release.edit_release"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.release.new_release"}}
|
||||
<div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div>
|
||||
{{end}}
|
||||
</h2>
|
||||
{{template "base/alert" .}}
|
||||
<form class="ui form grid" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="ui seven wide column target">
|
||||
<div class="inline field {{if .Err_TagName}}error{{end}}">
|
||||
{{if .PageIsEditRelease}}
|
||||
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong>
|
||||
{{else}}
|
||||
<input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required>
|
||||
<span class="at">@</span>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" name="tag_target" value="{{.tag_target}}"/>
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
<div class="text">
|
||||
{{.i18n.Tr "repo.release.target"}} :
|
||||
<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong>
|
||||
</div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
{{range .Branches}}
|
||||
<div class="item" data-value="{{.}}">{{.}}</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<div class="field {{if .Err_Title}}error{{end}}">
|
||||
<label>{{.i18n.Tr "repo.release.title"}}</label>
|
||||
<input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.release.content"}}</label>
|
||||
<textarea name="content">{{.content}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui container">
|
||||
<div class="ui divider"></div>
|
||||
<div class="ui text right">
|
||||
<div class="prerelease field">
|
||||
<div class="ui checkbox">
|
||||
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}>
|
||||
<label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label>
|
||||
</div>
|
||||
</div>
|
||||
<span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span>
|
||||
<div class="field">
|
||||
{{if .PageIsEditRelease}}
|
||||
<a class="ui blue basic button" href="{{.RepoLink}}/releases">
|
||||
{{.i18n.Tr "repo.release.cancel"}}
|
||||
</a>
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.release.edit_release"}}
|
||||
</button>
|
||||
<a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "repo.release.delete_release"}}
|
||||
</a>
|
||||
{{else}}
|
||||
<button class="ui green button">
|
||||
{{.i18n.Tr "repo.release.publish"}}
|
||||
</button>
|
||||
<input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{if .PageIsEditRelease}}
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.release.deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.release.deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.release.deletion_desc"}}</p>
|
||||
</div>
|
||||
{{template "base/delete_modal_actions" .}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -7,37 +7,37 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
</h4>
|
||||
<div class="ui attached segment collaborator list">
|
||||
{{range .Collaborators}}
|
||||
<div class="item">
|
||||
{{if not (eq .Id $.Owner.Id)}}
|
||||
<a href="{{$.RepoLink}}/settings/collaboration?remove={{.Name}}" class="ui right text red"><i class="fa fa-times"></i></a>
|
||||
{{end}}
|
||||
<a href="{{AppSubUrl}}/{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{range .Collaborators}}
|
||||
<div class="item">
|
||||
{{if not (eq .Id $.Owner.Id)}}
|
||||
<a href="{{$.RepoLink}}/settings/collaboration?remove={{.Name}}" class="ui right text red"><i class="fa fa-times"></i></a>
|
||||
{{end}}
|
||||
<a href="{{AppSubUrl}}/{{.Name}}">
|
||||
<img class="ui avatar image" src="{{.AvatarLink}}">
|
||||
{{.DisplayName}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached segment">
|
||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="inline field ui left">
|
||||
<div id="search-user-box">
|
||||
<div class="ui input">
|
||||
<input class="prompt" name="collaborator" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
|
||||
</div>
|
||||
<div class="ui segment results hide"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_collaborator"}}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -7,41 +7,41 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
||||
</div>
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
<div class="ui right">
|
||||
<div class="ui blue tiny show-panel button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.settings.add_deploy_key"}}</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if .Deploykeys}}
|
||||
<div class="ui key list">
|
||||
{{range .Deploykeys}}
|
||||
<div class="item ui grid">
|
||||
<div class="one wide column">
|
||||
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
|
||||
</div>
|
||||
<div class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="print meta">
|
||||
{{.Fingerprint}}
|
||||
<div class="ui key list">
|
||||
{{range .Deploykeys}}
|
||||
<div class="item ui grid">
|
||||
<div class="one wide column">
|
||||
<i class="ssh-key-state-indicator fa fa-circle{{if .HasRecentActivity}} active invert poping up{{else}}-o{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted"{{end}}></i>
|
||||
</div>
|
||||
<div class="one wide column">
|
||||
<i class="mega-octicon octicon-key left"></i>
|
||||
</div>
|
||||
<div class="eleven wide column">
|
||||
<strong>{{.Name}}</strong>
|
||||
<div class="print meta">
|
||||
{{.Fingerprint}}
|
||||
</div>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="two wide column">
|
||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="activity meta">
|
||||
<i>{{$.i18n.Tr "settings.add_on"}} <span>{{DateFmtShort .Created}}</span> — <i class="octicon octicon-info"></i> {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span>{{DateFmtShort .Updated}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="two wide column">
|
||||
<button class="ui red tiny button delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
|
||||
{{$.i18n.Tr "settings.delete_key"}}
|
||||
</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{else}}
|
||||
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
||||
{{.i18n.Tr "repo.settings.no_deploy_keys"}}
|
||||
{{end}}
|
||||
</div>
|
||||
<br>
|
||||
|
@ -75,22 +75,22 @@
|
|||
</div>
|
||||
|
||||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.deploy_key_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.deploy_key_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.deploy_key_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -7,30 +7,30 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
<p>{{.i18n.Tr "repo.settings.githook_edit_desc"}}</p>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{with .Hook}}
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||
<span>{{.Name}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
|
||||
<textarea id="content" name="content" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
</div>
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
{{with .Hook}}
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||
<span>{{.Name}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
|
||||
<textarea id="content" name="content" rows="20" wrap="off">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
<div class="inline field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -7,24 +7,24 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook list">
|
||||
<div class="item">
|
||||
{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
|
||||
</div>
|
||||
{{range .Hooks}}
|
||||
<div class="ui hook list">
|
||||
<div class="item">
|
||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
<span>{{.Name}}</span>
|
||||
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
|
||||
{{.i18n.Tr "repo.settings.githooks_desc" | Str2html}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{range .Hooks}}
|
||||
<div class="item">
|
||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}}"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
<span>{{.Name}}</span>
|
||||
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<div class="ui small basic delete modal">
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.webhook_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.webhook_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui icon header">
|
||||
<i class="trash icon"></i>
|
||||
{{.i18n.Tr "repo.settings.webhook_deletion"}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>{{.i18n.Tr "repo.settings.webhook_deletion_desc"}}</p>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="ui red basic inverted cancel button">
|
||||
<i class="remove icon"></i>
|
||||
{{.i18n.Tr "modal.no"}}
|
||||
</div>
|
||||
<div class="ui green basic inverted ok button">
|
||||
<i class="checkmark icon"></i>
|
||||
{{.i18n.Tr "modal.yes"}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{{if eq .HookType "gogs"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.settings.content_type"}}</label>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
|
||||
<div class="default text"></div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">application/json</div>
|
||||
<div class="item" data-value="2">application/x-www-form-urlencoded</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="field {{if .Err_Secret}}error{{end}}">
|
||||
<label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
|
||||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
<p>{{.i18n.Tr "repo.settings.add_webhook_desc" "http://gogs.io/docs/features/webhook.html" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/gogs/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>{{.i18n.Tr "repo.settings.content_type"}}</label>
|
||||
<div class="ui selection dropdown">
|
||||
<input type="hidden" id="content_type" name="content_type" value="{{if .Webhook.ContentType}}{{.Webhook.ContentType}}{{else}}application/json{{end}}">
|
||||
<div class="default text"></div>
|
||||
<i class="dropdown icon"></i>
|
||||
<div class="menu">
|
||||
<div class="item" data-value="1">application/json</div>
|
||||
<div class="item" data-value="2">application/x-www-form-urlencoded</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input class="fake" type="password">
|
||||
<div class="field {{if .Err_Secret}}error{{end}}">
|
||||
<label for="secret">{{.i18n.Tr "repo.settings.secret"}}</label>
|
||||
<input id="secret" name="secret" type="password" value="{{.Webhook.Secret}}" autocomplete="off">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
|
|
|
@ -1,73 +1,73 @@
|
|||
{{if .PageIsSettingsHooksEdit}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.recent_deliveries"}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<button class="ui teal tiny button poping up" id="test-delivery" data-content=
|
||||
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
|
||||
</div>
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook history list">
|
||||
{{range .History}}
|
||||
<div class="item">
|
||||
<div class="meta">
|
||||
{{if .IsSucceed}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{end}}
|
||||
<a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
|
||||
<div class="ui right">
|
||||
<span class="text grey time">
|
||||
{{.DeliveredString}}
|
||||
</span>
|
||||
</div>
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.recent_deliveries"}}
|
||||
{{if .IsRepositoryAdmin}}
|
||||
<div class="ui right">
|
||||
<button class="ui teal tiny button poping up" id="test-delivery" data-content=
|
||||
"{{.i18n.Tr "repo.settings.webhook.test_delivery_desc"}}" data-variation="inverted tiny" data-link="{{.Link}}/test" data-redirect="{{.Link}}">{{.i18n.Tr "repo.settings.webhook.test_delivery"}}</button>
|
||||
</div>
|
||||
<div class="info hide" id="info-{{.ID}}">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
|
||||
<a class="item" data-tab="response-{{.ID}}">
|
||||
{{$.i18n.Tr "repo.settings.webhook.response"}}
|
||||
{{if .ResponseInfo}}
|
||||
{{if .IsSucceed}}
|
||||
<span class="ui green label">{{.ResponseInfo.Status}}</span>
|
||||
{{else}}
|
||||
<span class="ui red label">{{.ResponseInfo.Status}}</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<span class="ui label">N/A</span>
|
||||
{{end}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
|
||||
{{if .RequestInfo}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="raw"><strong>Request URL:</strong> {{.URL}}
|
||||
{{end}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook history list">
|
||||
{{range .History}}
|
||||
<div class="item">
|
||||
<div class="meta">
|
||||
{{if .IsSucceed}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{end}}
|
||||
<a class="ui blue sha label toggle button" data-target="#info-{{.ID}}">{{.UUID}}</a>
|
||||
<div class="ui right">
|
||||
<span class="text grey time">
|
||||
{{.DeliveredString}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info hide" id="info-{{.ID}}">
|
||||
<div class="ui top attached tabular menu">
|
||||
<a class="item active" data-tab="request-{{.ID}}">{{$.i18n.Tr "repo.settings.webhook.request"}}</a>
|
||||
<a class="item" data-tab="response-{{.ID}}">
|
||||
{{$.i18n.Tr "repo.settings.webhook.response"}}
|
||||
{{if .ResponseInfo}}
|
||||
{{if .IsSucceed}}
|
||||
<span class="ui green label">{{.ResponseInfo.Status}}</span>
|
||||
{{else}}
|
||||
<span class="ui red label">{{.ResponseInfo.Status}}</span>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<span class="ui label">N/A</span>
|
||||
{{end}}
|
||||
</a>
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment active" data-tab="request-{{.ID}}">
|
||||
{{if .RequestInfo}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="raw"><strong>Request URL:</strong> {{.URL}}
|
||||
<strong>Request method:</strong> POST
|
||||
{{ range $key, $val := .RequestInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{end}}</pre>
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
|
||||
<pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
|
||||
{{else}}
|
||||
N/A
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
|
||||
{{if .ResponseInfo}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.payload"}}</h5>
|
||||
<pre class="raw"><code class="json">{{.PayloadContent}}</code></pre>
|
||||
{{else}}
|
||||
N/A
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="ui bottom attached tab segment" data-tab="response-{{.ID}}">
|
||||
{{if .ResponseInfo}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.headers"}}</h5>
|
||||
<pre class="raw">{{ range $key, $val := .ResponseInfo.Headers }}<strong>{{$key}}:</strong> {{$val}}
|
||||
{{end}}</pre>
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
|
||||
<pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
|
||||
{{else}}
|
||||
N/A
|
||||
{{end}}
|
||||
<h5>{{$.i18n.Tr "repo.settings.webhook.body"}}</h5>
|
||||
<pre class="raw"><code>{{.ResponseInfo.Body}}</code></pre>
|
||||
{{else}}
|
||||
N/A
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -1,44 +1,44 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
<div class="ui right">
|
||||
<div class="ui floating1 jump dropdown">
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gogs
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook list">
|
||||
<div class="item">
|
||||
{{.Description | Str2html}}
|
||||
</div>
|
||||
{{range .Webhooks}}
|
||||
<div class="item">
|
||||
{{if eq .LastStatus 1}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else if eq .LastStatus 2}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{else}}
|
||||
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
{{end}}
|
||||
<a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
|
||||
<div class="ui right">
|
||||
<span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
|
||||
<span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
<div class="ui right">
|
||||
<div class="ui floating1 jump dropdown">
|
||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||
<div class="menu">
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gogs
|
||||
</a>
|
||||
<a class="item" href="{{.BaseLink}}/settings/hooks/slack/new">
|
||||
<img class="img-10" src="{{AppSubUrl}}/img/slack.png">Slack
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<div class="ui hook list">
|
||||
<div class="item">
|
||||
{{.Description | Str2html}}
|
||||
</div>
|
||||
{{range .Webhooks}}
|
||||
<div class="item">
|
||||
{{if eq .LastStatus 1}}
|
||||
<span class="text green"><i class="octicon octicon-check"></i></span>
|
||||
{{else if eq .LastStatus 2}}
|
||||
<span class="text red"><i class="octicon octicon-alert"></i></span>
|
||||
{{else}}
|
||||
<span class="text grey"><i class="octicon octicon-primitive-dot"></i></span>
|
||||
{{end}}
|
||||
<a href="{{$.BaseLink}}/settings/hooks/{{.ID}}">{{.URL}}</a>
|
||||
<div class="ui right">
|
||||
<span class="text blue"><a href="{{$.BaseLink}}/settings/hooks/{{.ID}}"><i class="fa fa-pencil"></i></a></span>
|
||||
<span class="text red"><a class="delete-button" data-url="{{$.Link}}/delete" data-id="{{.ID}}"><i class="fa fa-times"></i></a></span>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_delete_modal" .}}
|
||||
{{template "repo/settings/hook_delete_modal" .}}
|
||||
|
|
|
@ -7,22 +7,22 @@
|
|||
<div class="twelve wide column content">
|
||||
{{template "base/alert" .}}
|
||||
<h4 class="ui top attached header">
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{else if eq .HookType "slack"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||
<div class="ui right">
|
||||
{{if eq .HookType "gogs"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
||||
{{else if eq .HookType "slack"}}
|
||||
<img class="img-13" src="{{AppSubUrl}}/img/slack.png">
|
||||
{{end}}
|
||||
</div>
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
</div>
|
||||
{{template "repo/settings/hook_gogs" .}}
|
||||
{{template "repo/settings/hook_slack" .}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_history" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
<div class="field">
|
||||
<h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
|
||||
<h4>{{.i18n.Tr "repo.settings.event_desc"}}</h4>
|
||||
<div class="grouped event type fields">
|
||||
<div class="field">
|
||||
<div class="ui radio non-events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio non-events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio non-events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="push_only" {{if or .PageIsSettingsHooksNew .Webhook.PushOnly}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_push_only" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio non-events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="send_everything" {{if .Webhook.SendEverything}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_send_everything" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="ui radio events checkbox">
|
||||
<input class="hidden" name="events" type="radio" value="choose_events" {{if .Webhook.ChooseEvents}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_choose" | Str2html}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
|
||||
<!-- Create -->
|
||||
<div class="seven wide column">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_create"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Push -->
|
||||
<div class="seven wide column">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_push"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="events fields ui grid" {{if not .Webhook.ChooseEvents}}style="display:none"{{end}}>
|
||||
<!-- Create -->
|
||||
<div class="seven wide column">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="create" type="checkbox" tabindex="0" {{if .Webhook.Create}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_create"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.event_create_desc"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Push -->
|
||||
<div class="seven wide column">
|
||||
<div class="field">
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="push" type="checkbox" tabindex="0" {{if .Webhook.Push}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.event_push"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.event_push_desc"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<div class="inline field">
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.active"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
|
||||
</div>
|
||||
<div class="ui checkbox">
|
||||
<input class="hidden" name="active" type="checkbox" tabindex="0" {{if or .PageIsSettingsHooksNew .Webhook.IsActive}}checked{{end}}>
|
||||
<label>{{.i18n.Tr "repo.settings.active"}}</label>
|
||||
<span class="help">{{.i18n.Tr "repo.settings.active_helper"}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{if .PageIsSettingsHooksNew}}
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
|
||||
{{else}}
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
|
||||
<a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
|
||||
{{end}}
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.add_webhook"}}</button>
|
||||
{{else}}
|
||||
<button class="ui green button">{{.i18n.Tr "repo.settings.update_webhook"}}</button>
|
||||
<a class="ui red delete-button button" data-url="{{.BaseLink}}/settings/hooks/delete" data-id="{{.Webhook.ID}}">{{.i18n.Tr "repo.settings.delete_webhook"}}</a>
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "repo/settings/hook_delete_modal" .}}
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
{{if eq .HookType "slack"}}
|
||||
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Channel}}error{{end}}">
|
||||
<label for="channel">{{.i18n.Tr "repo.settings.slack_channel"}}</label>
|
||||
<input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required>
|
||||
</div>
|
||||
<p>{{.i18n.Tr "repo.settings.add_slack_hook_desc" "http://slack.com" | Str2html}}</p>
|
||||
<form class="ui form" action="{{.BaseLink}}/settings/hooks/slack/{{if .PageIsSettingsHooksNew}}new{{else}}{{.Webhook.ID}}{{end}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_PayloadURL}}error{{end}}">
|
||||
<label for="payload_url">{{.i18n.Tr "repo.settings.payload_url"}}</label>
|
||||
<input id="payload_url" name="payload_url" type="url" value="{{.Webhook.URL}}" autofocus required>
|
||||
</div>
|
||||
<div class="required field {{if .Err_Channel}}error{{end}}">
|
||||
<label for="channel">{{.i18n.Tr "repo.settings.slack_channel"}}</label>
|
||||
<input id="channel" name="channel" value="{{.SlackHook.Channel}}" placeholder="e.g. #general" required>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="username">{{.i18n.Tr "repo.settings.slack_username"}}</label>
|
||||
<input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gogs">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="icon_url">{{.i18n.Tr "repo.settings.slack_icon_url"}}</label>
|
||||
<input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
|
||||
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
<div class="field">
|
||||
<label for="username">{{.i18n.Tr "repo.settings.slack_username"}}</label>
|
||||
<input id="username" name="username" value="{{.SlackHook.Username}}" placeholder="e.g. Gogs">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="icon_url">{{.i18n.Tr "repo.settings.slack_icon_url"}}</label>
|
||||
<input id="icon_url" name="icon_url" value="{{.SlackHook.IconURL}}" placeholder="e.g. https://example.com/img/favicon.png">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="color">{{.i18n.Tr "repo.settings.slack_color"}}</label>
|
||||
<input id="color" name="color" value="{{.SlackHook.Color}}" placeholder="e.g. #dd4b39, good, warning, danger">
|
||||
</div>
|
||||
{{template "repo/settings/hook_settings" .}}
|
||||
</form>
|
||||
{{end}}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<div class="ui grid">
|
||||
{{template "repo/settings/navbar" .}}
|
||||
{{template "repo/settings/hook_list" .}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "repo.settings"}}</strong></p>
|
||||
<div class="panel-body">
|
||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
||||
<li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings.options"}}</a></li>
|
||||
<li {{if .PageIsSettingsCollaboration}}class="current"{{end}}><a href="{{.RepoLink}}/settings/collaboration">{{.i18n.Tr "repo.settings.collaboration"}}</a></li>
|
||||
<li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
|
||||
{{if or .SignedUser.AllowGitHook .SignedUser.IsAdmin}}
|
||||
<li {{if .PageIsSettingsGitHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks/git">{{.i18n.Tr "repo.settings.githooks"}}</a></li>
|
||||
{{end}}
|
||||
<li {{if .PageIsSettingsKeys}}class="current"{{end}}><a href="{{.RepoLink}}/settings/keys">{{.i18n.Tr "repo.settings.deploy_keys"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "repo.settings"}}</strong></p>
|
||||
<div class="panel-body">
|
||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
||||
<li {{if .PageIsSettingsOptions}}class="current"{{end}}><a href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings.options"}}</a></li>
|
||||
<li {{if .PageIsSettingsCollaboration}}class="current"{{end}}><a href="{{.RepoLink}}/settings/collaboration">{{.i18n.Tr "repo.settings.collaboration"}}</a></li>
|
||||
<li {{if .PageIsSettingsHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks">{{.i18n.Tr "repo.settings.hooks"}}</a></li>
|
||||
{{if or .SignedUser.AllowGitHook .SignedUser.IsAdmin}}
|
||||
<li {{if .PageIsSettingsGitHooks}}class="current"{{end}}><a href="{{.RepoLink}}/settings/hooks/git">{{.i18n.Tr "repo.settings.githooks"}}</a></li>
|
||||
{{end}}
|
||||
<li {{if .PageIsSettingsKeys}}class="current"{{end}}><a href="{{.RepoLink}}/settings/keys">{{.i18n.Tr "repo.settings.deploy_keys"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
<div class="four wide column">
|
||||
<div class="ui vertical menu">
|
||||
<div class="header item">{{.i18n.Tr "repo.settings"}}</div>
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
{{.i18n.Tr "repo.settings.options"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
</a>
|
||||
{{if .SignedUser.CanEditGitHook}}
|
||||
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
|
||||
{{.i18n.Tr "repo.settings.options"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
|
||||
{{.i18n.Tr "repo.settings.collaboration"}}
|
||||
</a>
|
||||
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
|
||||
{{.i18n.Tr "repo.settings.hooks"}}
|
||||
</a>
|
||||
{{if .SignedUser.CanEditGitHook}}
|
||||
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
|
||||
{{.i18n.Tr "repo.settings.githooks"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
|
||||
{{.i18n.Tr "repo.settings.deploy_keys"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue