Responsive view (#2750)
* Viewport meta tag * responsive: dashboard * responsive: issues page * responsive: Explore page * responsive: navbar, and some navbar css refactoring * responsive: button for collapsing navbar in mobile view * Mark the hamburger button as active when pressed * better homepage for responsive views * Bring back jump class in navbar The class was necessary, because this way the dropdown doesn't assume the contents of the selected item. * make repository homes responsive * Make file view page responsive * Make forms look good on responsive views * make commits and commit diff view responsive * issues and PRs * responsive wiki * Don't place auto-init far off the page * Minor changes to amend broken stuff minor improvements - make login/sign up in navbar stackable - make navbar in explore and sign in not stackable Change selected class in TestPullCompare Fix typo that happened when rebasing fix dashboard on org view improve profile UI Use clearing on file diff to fix broken UI caused by floating elements remove unresolved merge conflict, and | Sanitize Fix repo home not loading
This commit is contained in:
parent
2f8c65c885
commit
3d3faa2624
30 changed files with 709 additions and 558 deletions
|
@ -18,7 +18,7 @@ func TestPullCompare(t *testing.T) {
|
||||||
req := NewRequest(t, "GET", "/user2/repo1/pulls")
|
req := NewRequest(t, "GET", "/user2/repo1/pulls")
|
||||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||||
link, exists := htmlDoc.doc.Find(".navbar").Find(".ui.green.button").Attr("href")
|
link, exists := htmlDoc.doc.Find(".ui.three.column.grid").Find(".ui.green.button").Attr("href")
|
||||||
assert.True(t, exists, "The template has changed")
|
assert.True(t, exists, "The template has changed")
|
||||||
|
|
||||||
req = NewRequest(t, "GET", link)
|
req = NewRequest(t, "GET", link)
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1531,11 +1531,11 @@ $(document).ready(function () {
|
||||||
$('.issue-checkbox').click(function() {
|
$('.issue-checkbox').click(function() {
|
||||||
var numChecked = $('.issue-checkbox').children('input:checked').length;
|
var numChecked = $('.issue-checkbox').children('input:checked').length;
|
||||||
if (numChecked > 0) {
|
if (numChecked > 0) {
|
||||||
$('.issue-filters').hide();
|
$('#issue-filters').hide();
|
||||||
$('.issue-actions').show();
|
$('#issue-actions').show();
|
||||||
} else {
|
} else {
|
||||||
$('.issue-filters').show();
|
$('#issue-filters').show();
|
||||||
$('.issue-actions').hide();
|
$('#issue-actions').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1568,6 +1568,7 @@ $(document).ready(function () {
|
||||||
initVueApp();
|
initVueApp();
|
||||||
initTeamSettings();
|
initTeamSettings();
|
||||||
initCtrlEnterSubmit();
|
initCtrlEnterSubmit();
|
||||||
|
initNavbarContentToggle();
|
||||||
|
|
||||||
// Repo clone url.
|
// Repo clone url.
|
||||||
if ($('#repo-clone-url').length > 0) {
|
if ($('#repo-clone-url').length > 0) {
|
||||||
|
@ -2076,3 +2077,20 @@ function initFilterBranchTagDropdown(selector) {
|
||||||
$(".commit-button").click(function() {
|
$(".commit-button").click(function() {
|
||||||
$(this).parent().find('.commit-body').toggle();
|
$(this).parent().find('.commit-body').toggle();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function initNavbarContentToggle() {
|
||||||
|
var content = $('#navbar');
|
||||||
|
var toggle = $('#navbar-expand-toggle');
|
||||||
|
var isExpanded = false;
|
||||||
|
toggle.click(function() {
|
||||||
|
isExpanded = !isExpanded;
|
||||||
|
if (isExpanded) {
|
||||||
|
content.addClass('shown');
|
||||||
|
toggle.addClass('active');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
content.removeClass('shown');
|
||||||
|
toggle.removeClass('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@footer-margin: 40px;
|
@footer-margin: 40px;
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Helvetica Neue", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
|
font-family: "Lato", "Microsoft YaHei", Arial, Helvetica, sans-serif !important;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
@ -61,6 +61,7 @@ pre, code {
|
||||||
z-index: 900;
|
z-index: 900;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
&.light {
|
&.light {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
border-bottom: 1px solid #DDDDDD;
|
border-bottom: 1px solid #DDDDDD;
|
||||||
|
@ -86,18 +87,11 @@ pre, code {
|
||||||
.top.menu .menu {
|
.top.menu .menu {
|
||||||
z-index: 900;
|
z-index: 900;
|
||||||
}
|
}
|
||||||
.icon,
|
|
||||||
.octicon {
|
.octicon {
|
||||||
margin-right: 5px !important;
|
&.fitted {
|
||||||
}
|
margin-right: 0;
|
||||||
.head.link.item {
|
}
|
||||||
padding-right: 0 !important;
|
margin-right: .75em;
|
||||||
}
|
|
||||||
.avatar > .ui.image {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
.avatar .octicon-triangle-down {
|
|
||||||
margin-top: 6.5px;
|
|
||||||
}
|
}
|
||||||
.searchbox {
|
.searchbox {
|
||||||
background-color: rgb(244, 244, 244) !important;
|
background-color: rgb(244, 244, 244) !important;
|
||||||
|
@ -109,17 +103,26 @@ pre, code {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.right.menu {
|
@media only screen and (max-width: 767px) {
|
||||||
.menu {
|
#navbar:not(.shown) > *:not(:first-child) {
|
||||||
left: auto;
|
display: none;
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.dropdown .menu {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.right.stackable.menu {
|
||||||
|
// responsive fix: this makes sure that the right menu when the page
|
||||||
|
// is on mobile view will have elements stacked on top of each other.
|
||||||
|
// no, stackable won't work on right menus.
|
||||||
|
margin-left: auto;
|
||||||
|
display: flex;
|
||||||
|
display: -ms-flexbox;
|
||||||
|
-ms-flex-align: inherit;
|
||||||
|
align-items: inherit;
|
||||||
|
-ms-flex-direction: inherit;
|
||||||
|
flex-direction: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
.ui {
|
.ui {
|
||||||
&.left {
|
&.left {
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -443,6 +446,23 @@ footer {
|
||||||
.generate-img(@n, (@i + 1));
|
.generate-img(@n, (@i + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Conditional display
|
||||||
|
@media only screen and (min-width: 768px) {
|
||||||
|
.mobile-only, .ui.button.mobile-only {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
// has the same behaviour of sr-only, hiding the content for
|
||||||
|
// non-screenreaders, but is shown on mobile devices.
|
||||||
|
.sr-mobile-only {
|
||||||
|
.sr-only();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.not-mobile {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Accessibility
|
// Accessibility
|
||||||
.sr-only {
|
.sr-only {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
@ -29,26 +29,23 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort
|
// Sort
|
||||||
.jump.item {
|
.jump.item {
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
.menu {
|
.menu {
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
right: 0!important;
|
right: 0!important;
|
||||||
left: auto!important;
|
left: auto!important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ui.right .head.menu {
|
.right.stackable.menu > .item.active {
|
||||||
margin-top: -5px;
|
color: #d9453d;
|
||||||
.item.active {
|
}
|
||||||
color: #d9453d;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Accomodate for Semantic's 1px hacks on .attached elements */
|
/* Accomodate for Semantic's 1px hacks on .attached elements */
|
||||||
.dashboard-repos {
|
.dashboard-repos {
|
||||||
margin: 0 1px;
|
margin: 0 1px;
|
||||||
|
|
|
@ -10,11 +10,12 @@
|
||||||
background-color: #FAFAFA !important;
|
background-color: #FAFAFA !important;
|
||||||
border-width: 1px !important;
|
border-width: 1px !important;
|
||||||
|
|
||||||
.octicon {
|
.octicon {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.repository.list {
|
.ui.repository.list {
|
||||||
|
|
|
@ -19,31 +19,41 @@
|
||||||
|
|
||||||
@create-page-form-input-padding: 250px !important;
|
@create-page-form-input-padding: 250px !important;
|
||||||
#create-page-form {
|
#create-page-form {
|
||||||
form {
|
form {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 800px!important;
|
.ui.message {
|
||||||
.ui.message {
|
text-align: center;
|
||||||
text-align: center;
|
}
|
||||||
}
|
@media only screen and (min-width: 768px) {
|
||||||
.header {
|
width: 800px!important;
|
||||||
padding-left: @create-page-form-input-padding+30px;
|
.header {
|
||||||
}
|
padding-left: @create-page-form-input-padding+30px;
|
||||||
.inline.field > label {
|
}
|
||||||
text-align: right;
|
.inline.field > label {
|
||||||
width: @create-page-form-input-padding;
|
text-align: right;
|
||||||
word-wrap: break-word;
|
width: @create-page-form-input-padding;
|
||||||
}
|
word-wrap: break-word;
|
||||||
.help {
|
}
|
||||||
margin-left: @create-page-form-input-padding+15px;
|
.help {
|
||||||
}
|
margin-left: @create-page-form-input-padding+15px;
|
||||||
.optional .title {
|
}
|
||||||
margin-left: @create-page-form-input-padding;
|
.optional .title {
|
||||||
}
|
margin-left: @create-page-form-input-padding;
|
||||||
input,
|
}
|
||||||
textarea {
|
input,
|
||||||
width: 50%!important;
|
textarea {
|
||||||
}
|
width: 50%!important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.optional .title {
|
||||||
|
margin-left: 15px;
|
||||||
|
}
|
||||||
|
.inline.field > label {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.signin {
|
.signin {
|
||||||
|
@ -113,16 +123,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.new.repo {
|
&.new.repo {
|
||||||
.ui.form {
|
.ui.form {
|
||||||
.selection.dropdown:not(.owner) {
|
.selection.dropdown:not(.owner) {
|
||||||
width: 50%!important;
|
width: 50%!important;
|
||||||
}
|
}
|
||||||
#auto-init {
|
@media only screen and (min-width: 768px) {
|
||||||
margin-left: @create-page-form-input-padding+15px;
|
#auto-init {
|
||||||
}
|
margin-left: @create-page-form-input-padding+15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.new.webhook {
|
.new.webhook {
|
||||||
|
|
|
@ -1,36 +1,46 @@
|
||||||
.home {
|
.home {
|
||||||
padding-bottom: @footer-margin * 2;
|
padding-bottom: @footer-margin * 2;
|
||||||
.logo {
|
.logo {
|
||||||
max-width: 220px;
|
max-width: 220px;
|
||||||
}
|
}
|
||||||
.hero {
|
.hero {
|
||||||
h1, h2 {
|
h1, h2 {
|
||||||
font-family: 'PT Sans Narrow', sans-serif, 'Microsoft YaHei';
|
font-family: 'PT Sans Narrow', sans-serif, 'Microsoft YaHei';
|
||||||
}
|
}
|
||||||
h1 {
|
@media only screen and (max-width: 767px) {
|
||||||
font-size: 5.5em;
|
h1 {
|
||||||
}
|
font-size: 3.5em;
|
||||||
h2 {
|
}
|
||||||
font-size: 3em;
|
h2 {
|
||||||
}
|
font-size: 2em;
|
||||||
.octicon {
|
}
|
||||||
color: #5aa509;
|
}
|
||||||
font-size: 40px;
|
@media only screen and (min-width: 768px) {
|
||||||
width: 50px;
|
h1 {
|
||||||
}
|
font-size: 5.5em;
|
||||||
&.header {
|
}
|
||||||
font-size: 20px;
|
h2 {
|
||||||
}
|
font-size: 3em;
|
||||||
}
|
}
|
||||||
p.large {
|
}
|
||||||
font-size: 16px
|
.octicon {
|
||||||
}
|
color: #5aa509;
|
||||||
.stackable {
|
font-size: 40px;
|
||||||
padding-top: 30px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
a {
|
&.header {
|
||||||
color: #5aa509;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
p.large {
|
||||||
|
font-size: 16px
|
||||||
|
}
|
||||||
|
.stackable {
|
||||||
|
padding-top: 30px;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: #5aa509;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.signup {
|
.signup {
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
padding-top: 15px;
|
padding-top: 15px;
|
||||||
padding-bottom: @footer-margin * 2;
|
padding-bottom: @footer-margin * 2;
|
||||||
|
|
||||||
.head {
|
.header-grid {
|
||||||
.column {
|
padding-top: 5px;
|
||||||
padding-top: 5px !important;
|
padding-bottom: 5px;
|
||||||
padding-bottom: 5px !important;
|
|
||||||
}
|
|
||||||
.ui.compact.menu {
|
.ui.compact.menu {
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
|
@ -34,6 +32,10 @@
|
||||||
margin-top: -1px;
|
margin-top: -1px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
}
|
}
|
||||||
|
.button {
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs {
|
.tabs {
|
||||||
|
@ -55,6 +57,20 @@
|
||||||
.owner.dropdown {
|
.owner.dropdown {
|
||||||
min-width: 40% !important;
|
min-width: 40% !important;
|
||||||
}
|
}
|
||||||
|
#file-buttons {
|
||||||
|
/* The reason for the !important is that Semantic itself has
|
||||||
|
margin-left: 0 !important on right items on mobile, which is mostly
|
||||||
|
to make sure elements which on menus would otherwise be on the right
|
||||||
|
align correctly with other elements when stacked.
|
||||||
|
Unfortunately, this brings some weird alignment on this particular
|
||||||
|
element, so we need to override it. */
|
||||||
|
margin-left: auto !important;
|
||||||
|
font-weight: normal;
|
||||||
|
.ui.button {
|
||||||
|
padding: 8px 10px;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.metas {
|
.metas {
|
||||||
.menu {
|
.menu {
|
||||||
|
@ -133,7 +149,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#clone-panel {
|
#clone-panel {
|
||||||
margin-left: 5px;
|
|
||||||
width: 350px;
|
width: 350px;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
@ -235,9 +250,10 @@
|
||||||
.header {
|
.header {
|
||||||
.icon {
|
.icon {
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
margin-top: -2px;
|
|
||||||
}
|
}
|
||||||
.file-actions {
|
.file-actions {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: -5px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
.btn-octicon {
|
.btn-octicon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
@ -814,12 +830,10 @@
|
||||||
|
|
||||||
&.commits {
|
&.commits {
|
||||||
.header {
|
.header {
|
||||||
.ui.right {
|
.search {
|
||||||
.search {
|
input {
|
||||||
input {
|
font-weight: normal;
|
||||||
font-weight: normal;
|
padding: 5px 10px;
|
||||||
padding: 5px 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -830,7 +844,9 @@
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
.sha {
|
.sha {
|
||||||
text-align: center;
|
&td {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
width: 140px;
|
width: 140px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -898,6 +914,9 @@
|
||||||
background-color: #dad8ff;
|
background-color: #dad8ff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ui.right {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.diff-box .header {
|
.diff-box .header {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1039,6 +1058,7 @@
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
padding: 5px 5px 0 5px;
|
padding: 5px 5px 0 5px;
|
||||||
}
|
}
|
||||||
|
clear: right;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.code-view {
|
.code-view {
|
||||||
|
@ -1241,6 +1261,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.dividing.header .stackable.grid .button {
|
||||||
|
margin-top: 2px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.settings {
|
&.settings {
|
||||||
|
@ -1437,8 +1464,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue-actions {
|
#issue-actions {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue.list {
|
.issue.list {
|
||||||
|
@ -1651,3 +1678,16 @@ tbody.commit-list {
|
||||||
.commit-body {
|
.commit-body {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 767px) {
|
||||||
|
.ui.stackable.menu {
|
||||||
|
&.mobile--margin-between-items > .item {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
&.mobile--no-negative-margins {
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head data-suburl="{{AppSubUrl}}">
|
<head data-suburl="{{AppSubUrl}}">
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
|
<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
|
||||||
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
|
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
|
||||||
|
@ -133,129 +134,133 @@
|
||||||
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
|
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
|
||||||
|
|
||||||
{{if not .PageIsInstall}}
|
{{if not .PageIsInstall}}
|
||||||
<div class="following bar light">
|
<div class="ui top secondary stackable main menu following bar light">
|
||||||
<div class="ui container">
|
<div class="ui container" id="navbar">
|
||||||
<div class="ui grid">
|
<div class="item brand" style="justify-content: space-between;">
|
||||||
<div class="column">
|
<a href="{{AppSubUrl}}/" href="{{AppSubUrl}}/">
|
||||||
<div class="ui top secondary menu">
|
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
|
||||||
<a class="item brand" href="{{AppSubUrl}}/">
|
</a>
|
||||||
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
|
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
|
||||||
</a>
|
<i class="sidebar icon"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
<a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
|
<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 .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>
|
<a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
<a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
|
||||||
{{/*<div class="item">
|
{{/*
|
||||||
<div class="ui icon input">
|
<div class="item">
|
||||||
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
<div class="ui icon input">
|
||||||
<i class="search icon"></i>
|
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
|
||||||
|
<i class="search icon"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
*/}}
|
||||||
|
|
||||||
|
{{if .IsSigned}}
|
||||||
|
<div class="right stackable menu">
|
||||||
|
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
||||||
|
<span class="text">
|
||||||
|
<i class="fitted octicon octicon-inbox"></i>
|
||||||
|
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
|
||||||
|
|
||||||
|
{{if .NotificationUnreadCount}}
|
||||||
|
<span class="ui red label">
|
||||||
|
{{.NotificationUnreadCount}}
|
||||||
|
</span>
|
||||||
|
{{end}}
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
||||||
|
<span class="text">
|
||||||
|
<i class="fitted octicon octicon-plus"></i>
|
||||||
|
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
|
||||||
|
<i class="fitted octicon octicon-triangle-down not-mobile"></i>
|
||||||
|
</span>
|
||||||
|
<div class="menu">
|
||||||
|
<a class="item" href="{{AppSubUrl}}/repo/create">
|
||||||
|
<i class="fitted octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
|
||||||
|
</a>
|
||||||
|
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
||||||
|
<i class="fitted octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
|
||||||
|
</a>
|
||||||
|
{{if .SignedUser.CanCreateOrganization}}
|
||||||
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
|
<i class="fitted octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</div><!-- end content create new menu -->
|
||||||
|
</div><!-- end dropdown menu create new -->
|
||||||
|
|
||||||
|
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
|
||||||
|
<span class="text">
|
||||||
|
<img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
|
||||||
|
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
||||||
|
<span class="mobile-only">{{.SignedUser.Name}}</span>
|
||||||
|
<i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
|
||||||
|
</span>
|
||||||
|
<div class="menu" tabindex="-1">
|
||||||
|
<div class="ui header">
|
||||||
|
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
|
||||||
</div>
|
</div>
|
||||||
</div>*/}}
|
|
||||||
|
|
||||||
{{if .IsSigned}}
|
<div class="divider"></div>
|
||||||
<div class="right menu">
|
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
||||||
<a href="{{AppSubUrl}}/notifications" class="ui head link jump item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
|
<i class="octicon octicon-person"></i>
|
||||||
<span class="text">
|
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
||||||
<i class="octicon octicon-inbox"><span class="sr-only">{{.i18n.Tr "notifications"}}</span></i>
|
</a>
|
||||||
|
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
||||||
|
<i class="octicon octicon-star"></i>
|
||||||
|
{{.i18n.Tr "your_starred"}}
|
||||||
|
</a>
|
||||||
|
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
||||||
|
<i class="octicon octicon-settings"></i>
|
||||||
|
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
||||||
|
</a>
|
||||||
|
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
|
||||||
|
<i class="octicon octicon-question"></i>
|
||||||
|
{{.i18n.Tr "help"}}<!-- Help -->
|
||||||
|
</a>
|
||||||
|
{{if .IsAdmin}}
|
||||||
|
<div class="divider"></div>
|
||||||
|
|
||||||
{{if .NotificationUnreadCount}}
|
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
|
||||||
<span class="ui red label">
|
<i class="icon settings"></i>
|
||||||
{{.NotificationUnreadCount}}
|
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
|
||||||
</span>
|
|
||||||
{{end}}
|
|
||||||
</span>
|
|
||||||
</a>
|
</a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
<div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
|
<div class="divider"></div>
|
||||||
<span class="text">
|
<a class="item" href="{{AppSubUrl}}/user/logout">
|
||||||
<i class="octicon octicon-plus"><span class="sr-only">{{.i18n.Tr "create_new"}}</span></i>
|
<i class="octicon octicon-sign-out"></i>
|
||||||
<i class="octicon octicon-triangle-down"></i>
|
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
|
||||||
</span>
|
</a>
|
||||||
<div class="menu">
|
</div><!-- end content avatar menu -->
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">
|
</div><!-- end dropdown avatar menu -->
|
||||||
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
|
</div><!-- end signed user right menu -->
|
||||||
</a>
|
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/migrate">
|
|
||||||
<i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
|
|
||||||
</a>
|
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
|
||||||
<i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</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">
|
{{else}}
|
||||||
<span class="text avatar">
|
|
||||||
<img class="ui small rounded image" src="{{.SignedUser.RelAvatarLink}}">
|
|
||||||
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
|
|
||||||
<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" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
|
||||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
|
<div class="right stackable menu">
|
||||||
<i class="octicon octicon-person"></i>
|
{{if .ShowRegistrationButton}}
|
||||||
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
|
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
||||||
</a>
|
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
|
||||||
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
|
</a>
|
||||||
<i class="octicon octicon-star"></i>
|
{{end}}
|
||||||
{{.i18n.Tr "your_starred"}}
|
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
|
||||||
</a>
|
<i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
|
||||||
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
|
</a>
|
||||||
<i class="octicon octicon-settings"></i>
|
</div><!-- end anonymous right menu -->
|
||||||
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
|
|
||||||
</a>
|
|
||||||
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
|
|
||||||
<i class="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">
|
{{end}}
|
||||||
<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="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" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
|
|
||||||
<div class="right menu">
|
|
||||||
{{if .ShowRegistrationButton}}
|
|
||||||
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
|
|
||||||
<i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
<a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
|
|
||||||
<i class="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 container -->
|
||||||
</div><!-- end bar -->
|
</div><!-- end bar -->
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ui secondary pointing tabular top attached borderless menu navbar">
|
<div class="ui secondary pointing tabular top attached borderless stackable menu navbar">
|
||||||
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
|
<a class="{{if .PageIsExploreRepositories}}active{{end}} item" href="{{AppSubUrl}}/explore/repos">
|
||||||
<span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}}
|
<span class="octicon octicon-repo"></span> {{.i18n.Tr "explore.repos"}}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
{{template "repo/sub_menu" .}}
|
{{template "repo/sub_menu" .}}
|
||||||
<div class="ui secondary menu">
|
<div class="ui secondary stackable menu mobile--margin-between-items">
|
||||||
{{template "repo/branch_dropdown" .}}
|
{{template "repo/branch_dropdown" .}}
|
||||||
<div class="fitted item">
|
<div class="fitted item">
|
||||||
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
<a href="{{.RepoLink}}/graph" class="ui basic small compact button">
|
||||||
|
|
|
@ -1,22 +1,26 @@
|
||||||
<h4 class="ui top attached header">
|
<h4 class="ui top attached header">
|
||||||
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
|
<div class="ui stackable grid">
|
||||||
{{if .PageIsCommits}}
|
<div class="six wide column">
|
||||||
<div class="ui right">
|
{{.CommitCount}} {{.i18n.Tr "repo.commits.commits"}} {{if .Branch}}({{.Branch}}){{end}}
|
||||||
<form action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
|
|
||||||
<div class="ui tiny search input">
|
|
||||||
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ui checkbox">
|
|
||||||
<input type="checkbox" name="all" id="all" value="true" {{.All}}>
|
|
||||||
<label for="all">{{.i18n.Tr "repo.commits.search_all"}} </label>
|
|
||||||
</div>
|
|
||||||
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
{{else if .IsDiffCompare}}
|
<div class="ten wide right aligned column">
|
||||||
<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>
|
{{if .PageIsCommits}}
|
||||||
{{end}}
|
<form action="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/search">
|
||||||
|
<div class="ui tiny search input">
|
||||||
|
<input name="q" placeholder="{{.i18n.Tr "repo.commits.search"}}" value="{{.Keyword}}" autofocus>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ui checkbox">
|
||||||
|
<input type="checkbox" name="all" id="all" value="true" {{.All}}>
|
||||||
|
<label for="all">{{.i18n.Tr "repo.commits.search_all"}} </label>
|
||||||
|
</div>
|
||||||
|
<button class="ui black tiny button" data-panel="#add-deploy-key-panel">{{.i18n.Tr "repo.commits.find"}}</button>
|
||||||
|
</form>
|
||||||
|
{{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}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
{{if .Commits}}
|
{{if .Commits}}
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached unstackable table segment">
|
||||||
{{if ne $file.Type 4}}
|
{{if ne $file.Type 4}}
|
||||||
{{$isImage := (call $.IsImageFile $file.Name)}}
|
{{$isImage := (call $.IsImageFile $file.Name)}}
|
||||||
{{if and $isImage}}
|
{{if and $isImage}}
|
||||||
|
|
|
@ -15,34 +15,39 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
|
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
|
||||||
{{if .Author}}
|
<div class="ui stackable grid">
|
||||||
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
|
<div class="nine wide column">
|
||||||
{{if .Author.FullName}}
|
{{if .Author}}
|
||||||
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
|
<img class="ui avatar image" src="{{.Author.RelAvatarLink}}" />
|
||||||
{{else}}
|
{{if .Author.FullName}}
|
||||||
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
|
<a href="{{.Author.HomeLink}}"><strong>{{.Author.FullName}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
|
||||||
{{end}}
|
{{else}}
|
||||||
{{else}}
|
<a href="{{.Author.HomeLink}}"><strong>{{.Commit.Author.Name}}</strong></a> {{if .IsSigned}}<{{.Commit.Author.Email}}>{{end}}
|
||||||
<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}}
|
{{end}}
|
||||||
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
|
{{else}}
|
||||||
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
|
<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>
|
</div>
|
||||||
</div>
|
<div class="seven wide right aligned column">
|
||||||
|
<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="mobile-only"></div>
|
||||||
|
<div class="item">{{.i18n.Tr "repo.diff.commit"}}</div>
|
||||||
|
<div class="item"><span class="ui blue sha label">{{ShortSha .CommitID}}</span></div>
|
||||||
|
</div>
|
||||||
|
</div><!-- end column -->
|
||||||
|
</div><!-- end grid -->
|
||||||
</div>
|
</div>
|
||||||
{{if .Commit.Signature}}
|
{{if .Commit.Signature}}
|
||||||
{{if .Verification.Verified }}
|
{{if .Verification.Verified }}
|
||||||
|
|
|
@ -1,48 +1,46 @@
|
||||||
<div class="header-wrapper">
|
<div class="header-wrapper">
|
||||||
{{with .Repository}}
|
{{with .Repository}}
|
||||||
<div class="ui container"><!-- start container -->
|
<div class="ui container">
|
||||||
<div class="ui vertically padded grid head"><!-- start grid -->
|
<div class="ui stackable grid header-grid">
|
||||||
<div class="column"><!-- start column -->
|
<div class="ten wide column">
|
||||||
<div class="ui header">
|
<div class="ui huge breadcrumb">
|
||||||
<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>
|
||||||
<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>
|
||||||
<a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
|
<div class="divider"> / </div>
|
||||||
<div class="divider"> / </div>
|
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
||||||
<a href="{{$.RepoLink}}">{{.Name}}</a>
|
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
|
||||||
{{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
|
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
|
||||||
{{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ui right">
|
|
||||||
<div class="ui compact labeled button" tabindex="0">
|
|
||||||
<a class="ui compact button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
|
||||||
<i class="icon 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="{{.Link}}/watchers">
|
|
||||||
{{.NumWatches}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="ui compact labeled button" tabindex="0">
|
|
||||||
<a class="ui compact 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="{{.Link}}/stars">
|
|
||||||
{{.NumStars}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{{if .CanBeForked}}
|
|
||||||
<div class="ui compact labeled button" tabindex="0">
|
|
||||||
<a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
|
||||||
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
|
||||||
</a>
|
|
||||||
<a class="ui basic label" href="{{.Link}}/forks">
|
|
||||||
{{.NumForks}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div><!-- end column -->
|
</div>
|
||||||
|
|
||||||
|
<div class="ui six wide right aligned column">
|
||||||
|
<div class="ui compact labeled button" tabindex="0">
|
||||||
|
<a class="ui compact button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
|
||||||
|
<i class="icon 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="{{.Link}}/watchers">
|
||||||
|
{{.NumWatches}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="ui compact labeled button" tabindex="0">
|
||||||
|
<a class="ui compact 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="{{.Link}}/stars">
|
||||||
|
{{.NumStars}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{if .CanBeForked}}
|
||||||
|
<div class="ui compact labeled button" tabindex="0">
|
||||||
|
<a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
|
||||||
|
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
|
||||||
|
</a>
|
||||||
|
<a class="ui basic label" href="{{.Link}}/forks">
|
||||||
|
{{.NumForks}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
</div><!-- end grid -->
|
</div><!-- end grid -->
|
||||||
</div><!-- end container -->
|
</div><!-- end container -->
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{template "repo/sub_menu" .}}
|
{{template "repo/sub_menu" .}}
|
||||||
<div class="ui secondary menu">
|
<div class="ui stackable secondary menu mobile--margin-between-items mobile--no-negative-margins">
|
||||||
{{if and .PullRequestCtx.Allowed .IsViewBranch}}
|
{{if and .PullRequestCtx.Allowed .IsViewBranch}}
|
||||||
<div class="fitted item">
|
<div class="fitted item">
|
||||||
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.Repository.Owner.Name}}:{{.BranchName}}">
|
<a href="{{.BaseRepo.Link}}/compare/{{.BaseRepo.DefaultBranch}}...{{.Repository.Owner.Name}}:{{.BranchName}}">
|
||||||
|
@ -36,9 +36,9 @@
|
||||||
{{ $n := len .TreeNames}}
|
{{ $n := len .TreeNames}}
|
||||||
{{ $l := Subtract $n 1}}
|
{{ $l := Subtract $n 1}}
|
||||||
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
|
<div class="fitted item"><span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{EscapePound .BranchNameSubURL}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{EscapePound $.BranchLink}}/{{EscapePound $p}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span></div>
|
||||||
<div class="right fitted item">
|
<div class="right fitted item" id="file-buttons">
|
||||||
{{if .Repository.CanEnableEditor}}
|
{{if .Repository.CanEnableEditor}}
|
||||||
<div id="file-buttons" class="ui tiny blue buttons">
|
<div class="ui tiny blue buttons">
|
||||||
{{if .CanAddFile}}
|
{{if .CanAddFile}}
|
||||||
<a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
|
<a href="{{.RepoLink}}/_new/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}" class="ui button">
|
||||||
{{.i18n.Tr "repo.editor.new_file"}}
|
{{.i18n.Tr "repo.editor.new_file"}}
|
||||||
|
@ -52,6 +52,9 @@
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="fitted item">
|
||||||
|
|
||||||
<!-- Only show clone panel in repository home page -->
|
<!-- Only show clone panel in repository home page -->
|
||||||
{{if eq $n 0}}
|
{{if eq $n 0}}
|
||||||
<div class="ui action tiny input" id="clone-panel">
|
<div class="ui action tiny input" id="clone-panel">
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
<div class="repository">
|
<div class="repository">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="navbar">
|
<div class="ui three column stackable grid">
|
||||||
{{template "repo/issue/navbar" .}}
|
<div class="column">
|
||||||
{{template "repo/issue/search" .}}
|
{{template "repo/issue/navbar" .}}
|
||||||
<div class="ui right">
|
</div>
|
||||||
|
<div class="column center aligned">
|
||||||
|
{{template "repo/issue/search" .}}
|
||||||
|
</div>
|
||||||
|
<div class="column right aligned">
|
||||||
{{if .PageIsIssueList}}
|
{{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}}
|
{{else}}
|
||||||
|
@ -14,148 +18,160 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div class="issue-filters">
|
<div id="issue-filters" class="ui stackable grid">
|
||||||
<div class="ui tiny basic status buttons">
|
<div class="six wide column">
|
||||||
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
<div class="ui tiny basic status buttons">
|
||||||
<i class="octicon octicon-issue-opened"></i>
|
<a class="ui {{if not .IsShowClosed}}green active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state=open&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||||
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
<i class="octicon octicon-issue-opened"></i>
|
||||||
</a>
|
{{.i18n.Tr "repo.issues.open_tab" .IssueStats.OpenCount}}
|
||||||
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
</a>
|
||||||
<i class="octicon octicon-issue-closed"></i>
|
<a class="ui {{if .IsShowClosed}}red active{{end}} basic button" href="{{$.Link}}?q={{$.Keyword}}&type={{.ViewType}}&sort={{$.SortType}}&state=closed&labels={{.SelectLabels}}&milestone={{.MilestoneID}}&assignee={{.AssigneeID}}">
|
||||||
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
<i class="octicon octicon-issue-closed"></i>
|
||||||
</a>
|
{{.i18n.Tr "repo.issues.close_tab" .IssueStats.ClosedCount}}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui right floated secondary filter menu">
|
<div class="ten wide right aligned column">
|
||||||
<!-- Label -->
|
<div class="ui secondary filter stackable menu">
|
||||||
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
|
<!-- Label -->
|
||||||
<span class="text">
|
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto">
|
||||||
{{.i18n.Tr "repo.issues.filter_label"}}
|
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
</span>
|
|
||||||
<div class="menu">
|
|
||||||
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&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>
|
|
||||||
|
|
||||||
<!-- Milestone -->
|
|
||||||
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
|
|
||||||
<span class="text">
|
|
||||||
{{.i18n.Tr "repo.issues.filter_milestone"}}
|
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
</span>
|
|
||||||
<div class="menu">
|
|
||||||
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&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>
|
|
||||||
|
|
||||||
<!-- Assignee -->
|
|
||||||
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
|
||||||
<span class="text">
|
|
||||||
{{.i18n.Tr "repo.issues.filter_assignee"}}
|
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
</span>
|
|
||||||
<div class="menu">
|
|
||||||
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&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="{{.RelAvatarLink}}"> {{.Name}}</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .IsSigned}}
|
|
||||||
<!-- Type -->
|
|
||||||
<div class="ui dropdown type jump item">
|
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_type"}}
|
{{.i18n.Tr "repo.issues.filter_label"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if eq .ViewType "all"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=all&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.all_issues"}}</a>
|
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_label_no_select"}}</a>
|
||||||
<a class="{{if eq .ViewType "assigned"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.SignedUser.ID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
{{range .Labels}}
|
||||||
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&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="item" href="{{$.Link}}?q={{$.Keyword}}&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>
|
||||||
<a class="{{if eq .ViewType "mentioned"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
|
|
||||||
<!-- Sort -->
|
<!-- Milestone -->
|
||||||
<div class="ui dropdown type jump item">
|
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.filter_sort"}}
|
{{.i18n.Tr "repo.issues.filter_milestone"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=latest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
|
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_milestone_no_select"}}</a>
|
||||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=oldest&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
|
{{range .Milestones}}
|
||||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=recentupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
<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>
|
||||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastupdate&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
{{end}}
|
||||||
<a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=mostcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
</div>
|
||||||
<a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
</div>
|
||||||
|
|
||||||
|
<!-- Assignee -->
|
||||||
|
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
||||||
|
<span class="text">
|
||||||
|
{{.i18n.Tr "repo.issues.filter_assignee"}}
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
</span>
|
||||||
|
<div class="menu">
|
||||||
|
<a class="item" href="{{$.Link}}?q={{$.Keyword}}&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="{{.RelAvatarLink}}"> {{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{if .IsSigned}}
|
||||||
|
<!-- Type -->
|
||||||
|
<div class="ui dropdown type jump item">
|
||||||
|
<span class="text">
|
||||||
|
{{.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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&type=assigned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{.SignedUser.ID}}">{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}</a>
|
||||||
|
<a class="{{if eq .ViewType "created_by"}}active{{end}} item" href="{{$.Link}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&type=mentioned&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
<!-- Sort -->
|
||||||
|
<div class="ui dropdown type jump item">
|
||||||
|
<span class="text">
|
||||||
|
{{.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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&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}}?q={{$.Keyword}}&type={{$.ViewType}}&sort=leastcomment&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="issue-actions">
|
<div id="issue-actions" class="ui stackable grid">
|
||||||
<div class="ui basic status buttons">
|
<div class="six wide column">
|
||||||
<div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_open"}}</div>
|
<div class="ui basic status buttons">
|
||||||
<div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_close"}}</div>
|
<div class="ui green active basic button issue-action" data-action="open" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_open"}}</div>
|
||||||
|
<div class="ui red active basic button issue-action" data-action="close" data-url="{{$.RepoLink}}/issues/status">{{.i18n.Tr "repo.issues.action_close"}}</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ui secondary filter menu floated right">
|
{{/* Ten wide does not cope well and makes the columns stack.
|
||||||
<!-- Labels -->
|
This seems to be related to jQuery's hide/show: in fact, switching
|
||||||
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item">
|
issue-actions and issue-filters and having this ten wide will show
|
||||||
<span class="text">
|
this one correctly, but not the other one. */}}
|
||||||
{{.i18n.Tr "repo.issues.action_label"}}
|
<div class="nine wide right aligned right floated column">
|
||||||
<i class="dropdown icon"></i>
|
<div class="ui secondary filter stackable menu">
|
||||||
</span>
|
<!-- Labels -->
|
||||||
<div class="menu">
|
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item" style="margin-left: auto">
|
||||||
{{range .Labels}}
|
<span class="text">
|
||||||
<div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
|
{{.i18n.Tr "repo.issues.action_label"}}
|
||||||
<span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
<i class="dropdown icon"></i>
|
||||||
</div>
|
</span>
|
||||||
{{end}}
|
<div class="menu">
|
||||||
</div>
|
{{range .Labels}}
|
||||||
</div>
|
<div class="item issue-action" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels">
|
||||||
|
<span class="octicon {{if eq $.SelectLabels .ID}}octicon-check{{end}}"></span><span class="label color" style="background-color: {{.Color}}"></span> {{.Name}}
|
||||||
<!-- Milestone -->
|
</div>
|
||||||
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
|
{{end}}
|
||||||
<span class="text">
|
|
||||||
{{.i18n.Tr "repo.issues.action_milestone"}}
|
|
||||||
<i class="dropdown icon"></i>
|
|
||||||
</span>
|
|
||||||
<div class="menu">
|
|
||||||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
|
|
||||||
{{.i18n.Tr "repo.issues.action_milestone_no_select"}}
|
|
||||||
</div>
|
</div>
|
||||||
{{range .Milestones}}
|
|
||||||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
|
|
||||||
{{.Name}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Assignee -->
|
<!-- Milestone -->
|
||||||
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
<div class="ui {{if not .Milestones}}disabled{{end}} dropdown jump item">
|
||||||
<span class="text">
|
<span class="text">
|
||||||
{{.i18n.Tr "repo.issues.action_assignee"}}
|
{{.i18n.Tr "repo.issues.action_milestone"}}
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
</span>
|
</span>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee">
|
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/milestone">
|
||||||
{{.i18n.Tr "repo.issues.action_assignee_no_select"}}
|
{{.i18n.Tr "repo.issues.action_milestone_no_select"}}
|
||||||
</div>
|
|
||||||
{{range .Assignees}}
|
|
||||||
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/assignee">
|
|
||||||
<img src="{{.RelAvatarLink}}"> {{.Name}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{range .Milestones}}
|
||||||
|
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/milestone">
|
||||||
|
{{.Name}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Assignee -->
|
||||||
|
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
||||||
|
<span class="text">
|
||||||
|
{{.i18n.Tr "repo.issues.action_assignee"}}
|
||||||
|
<i class="dropdown icon"></i>
|
||||||
|
</span>
|
||||||
|
<div class="menu">
|
||||||
|
<div class="item issue-action" data-element-id="0" data-url="{{$.Link}}/assignee">
|
||||||
|
{{.i18n.Tr "repo.issues.action_assignee_no_select"}}
|
||||||
|
</div>
|
||||||
|
{{range .Assignees}}
|
||||||
|
<div class="item issue-action" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/assignee">
|
||||||
|
<img src="{{.RelAvatarLink}}"> {{.Name}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<form class="ui comment form grid" action="{{EscapePound .Link}}" method="post">
|
<form class="ui comment form stackable grid" action="{{EscapePound .Link}}" method="post">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
{{if .Flash}}
|
{{if .Flash}}
|
||||||
<div class="sixteen wide column">
|
<div class="sixteen wide column">
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
<div class="repository view issue pull">
|
<div class="repository view issue pull">
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="navbar">
|
<div class="ui two column stackable grid">
|
||||||
{{template "repo/issue/navbar" .}}
|
<div class="column">
|
||||||
<div class="ui right">
|
{{template "repo/issue/navbar" .}}
|
||||||
|
</div>
|
||||||
|
<div class="column right aligned">
|
||||||
{{if .PageIsIssueList}}
|
{{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}}
|
{{else}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ui grid">
|
<div class="ui stackable grid">
|
||||||
{{if .Flash}}
|
{{if .Flash}}
|
||||||
<div class="sixteen wide column">
|
<div class="sixteen wide column">
|
||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="ui top attached pull tabular menu">
|
<div class="ui top attached pull tabular stackable menu">
|
||||||
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
|
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.RepoLink}}/pulls/{{.Issue.Index}}">
|
||||||
<span class="octicon octicon-comment-discussion"></span>
|
<span class="octicon octicon-comment-discussion"></span>
|
||||||
{{$.i18n.Tr "repo.pulls.tab_conversation"}}
|
{{$.i18n.Tr "repo.pulls.tab_conversation"}}
|
||||||
|
|
|
@ -1,41 +1,47 @@
|
||||||
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
||||||
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
|
<h4 class="ui top attached header" id="{{if .ReadmeExist}}repo-readme{{else}}repo-read-file{{end}}">
|
||||||
{{if .ReadmeExist}}
|
<div class="ui stackable grid">
|
||||||
<i class="book icon ui left"></i>
|
<div class="ten wide column">
|
||||||
{{if .ReadmeInList}}
|
{{if .ReadmeExist}}
|
||||||
<strong>{{.FileName}}</strong>
|
<i class="book icon ui left"></i>
|
||||||
{{else}}
|
{{if .ReadmeInList}}
|
||||||
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
|
<strong>{{.FileName}}</strong>
|
||||||
{{end}}
|
|
||||||
{{else}}
|
|
||||||
<i class="file text outline icon ui left"></i>
|
|
||||||
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
|
|
||||||
{{end}}
|
|
||||||
{{if not .ReadmeInList}}
|
|
||||||
<div class="ui right file-actions">
|
|
||||||
<div class="ui buttons">
|
|
||||||
{{if not .IsViewCommit}}
|
|
||||||
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
|
|
||||||
{{end}}
|
|
||||||
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
|
|
||||||
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
|
|
||||||
</div>
|
|
||||||
{{if .Repository.CanEnableEditor}}
|
|
||||||
{{if .CanEditFile}}
|
|
||||||
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
|
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
|
||||||
{{end}}
|
|
||||||
{{if .CanDeleteFile}}
|
|
||||||
<a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
|
|
||||||
{{else}}
|
|
||||||
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
|
|
||||||
{{end}}
|
{{end}}
|
||||||
|
{{else}}
|
||||||
|
<i class="file text outline icon ui left"></i>
|
||||||
|
<strong>{{.FileName}}</strong> <span class="text grey normal">{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.i18n.Tr "repo.stored_lfs"}}){{end}}</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
<div class="six wide right aligned column">
|
||||||
|
{{if not .ReadmeInList}}
|
||||||
|
<div class="ui right file-actions">
|
||||||
|
<div class="ui buttons">
|
||||||
|
{{if not .IsViewCommit}}
|
||||||
|
<a class="ui button" href="{{.RepoLink}}/src/commit/{{.CommitID}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_permalink"}}</a>
|
||||||
|
{{end}}
|
||||||
|
<a class="ui button" href="{{.RepoLink}}/commits/{{EscapePound .BranchNameSubURL}}/{{EscapePound .TreePath}}">{{.i18n.Tr "repo.file_history"}}</a>
|
||||||
|
<a class="ui button" href="{{EscapePound $.RawFileLink}}">{{.i18n.Tr "repo.file_raw"}}</a>
|
||||||
|
</div>
|
||||||
|
{{if .Repository.CanEnableEditor}}
|
||||||
|
{{if .CanEditFile}}
|
||||||
|
<a href="{{.RepoLink}}/_edit/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-pencil btn-octicon poping up" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
|
||||||
|
{{else}}
|
||||||
|
<i class="octicon octicon-pencil btn-octicon poping up disabled" data-content="{{.EditFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
|
||||||
|
{{end}}
|
||||||
|
{{if .CanDeleteFile}}
|
||||||
|
<a href="{{.RepoLink}}/_delete/{{EscapePound .BranchName}}/{{EscapePound .TreePath}}"><i class="octicon octicon-trashcan btn-octicon btn-octicon-danger poping up" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i></a>
|
||||||
|
{{else}}
|
||||||
|
<i class="octicon octicon-trashcan btn-octicon poping up disabled" data-content="{{.DeleteFileTooltip}}" data-position="bottom center" data-variation="tiny inverted"></i>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="ui attached table segment">
|
<div class="ui attached table unstackable segment">
|
||||||
<div class="file-view {{if .IsMarkup}}markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
|
<div class="file-view {{if .IsMarkup}}markdown{{else if .IsRenderedHTML}}plain-text{{else if .IsTextFile}}code-view{{end}} has-emoji">
|
||||||
{{if .IsMarkup}}
|
{{if .IsMarkup}}
|
||||||
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
{{if .FileContent}}{{.FileContent | Safe}}{{end}}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{template "repo/header" .}}
|
{{template "repo/header" .}}
|
||||||
{{ $title := .title}}
|
{{ $title := .title}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
<div class="ui stackable grid">
|
||||||
<div class="ui ten wide column">
|
<div class="ui ten wide column">
|
||||||
<div class="choose page">
|
<div class="choose page">
|
||||||
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
<div class="ui floating filter dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
|
||||||
|
@ -54,17 +54,23 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui dividing header">
|
<div class="ui dividing header">
|
||||||
{{$title}}
|
<div class="ui stackable grid">
|
||||||
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
<div class="eight wide column">
|
||||||
<div class="ui right">
|
{{$title}}
|
||||||
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
|
<div class="ui sub header">
|
||||||
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
{{$timeSince := TimeSince .Author.When $.Lang}}
|
||||||
<a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/delete" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
|
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="eight wide right aligned column">
|
||||||
|
{{if and .IsRepositoryWriter (not .Repository.IsMirror)}}
|
||||||
|
<div class="ui right">
|
||||||
|
<a class="ui small button" href="{{.RepoLink}}/wiki/{{.PageURL}}/_edit">{{.i18n.Tr "repo.wiki.edit_page_button"}}</a>
|
||||||
|
<a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
|
||||||
|
<a class="ui red small button delete-button" href="" data-url="{{.RepoLink}}/wiki/{{.PageURL}}/delete" data-id="{{.PageURL}}">{{.i18n.Tr "repo.wiki.delete_page_button"}}</a>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
|
||||||
<div class="ui sub header">
|
|
||||||
{{$timeSince := TimeSince .Author.When $.Lang}}
|
|
||||||
{{.i18n.Tr "repo.wiki.last_commit_info" .Author.Name $timeSince | Safe}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{if .FormatWarning}}
|
{{if .FormatWarning}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{if .EnableOpenIDSignIn}}
|
{{if .EnableOpenIDSignIn}}
|
||||||
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
|
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
|
||||||
<a class="{{if .PageIsLogin}}active{{end}} item" href="{{AppSubUrl}}/user/login">
|
<a class="{{if .PageIsLogin}}active{{end}} item" href="{{AppSubUrl}}/user/login">
|
||||||
{{.i18n.Tr "auth.login_userpass"}}
|
{{.i18n.Tr "auth.login_userpass"}}
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
{{template "user/dashboard/navbar" .}}
|
{{template "user/dashboard/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
{{template "base/alert" .}}
|
{{template "base/alert" .}}
|
||||||
<div class="ui grid">
|
<div class="ui mobile reversed stackable grid">
|
||||||
<div class="ten wide column">
|
<div class="ten wide column">
|
||||||
{{template "user/dashboard/feeds" .}}
|
{{template "user/dashboard/feeds" .}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
v-cloak
|
v-cloak
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<div v-if="!isOrganization" class="ui two item stackable tabable menu">
|
<div v-if="!isOrganization" class="ui two item tabable menu">
|
||||||
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
|
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
|
||||||
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
|
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<img class="ui avatar image" src="{{.GetActAvatar}}" alt="">
|
<img class="ui avatar image" src="{{.GetActAvatar}}" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="ui fifteen wide column">
|
<div class="ui thirteen wide column">
|
||||||
<div class="{{if eq .GetOpType 5}}push news{{end}}">
|
<div class="{{if eq .GetOpType 5}}push news{{end}}">
|
||||||
<p>
|
<p>
|
||||||
<a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
|
<a href="{{AppSubUrl}}/{{.GetActUserName}}">{{.ShortActUserName}}</a>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>
|
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n.Lang}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui one wide column">
|
<div class="ui three wide right aligned column">
|
||||||
<i class="text grey mega-octicon octicon-{{ActionIcon .GetOpType}}"></i>
|
<i class="text grey mega-octicon octicon-{{ActionIcon .GetOpType}}"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="dashboard issues">
|
<div class="dashboard issues">
|
||||||
{{template "user/dashboard/navbar" .}}
|
{{template "user/dashboard/navbar" .}}
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
<div class="ui stackable grid">
|
||||||
<div class="four wide column">
|
<div class="four wide column">
|
||||||
<div class="ui secondary vertical filter menu">
|
<div class="ui secondary vertical filter menu">
|
||||||
<a class="{{if eq .ViewType "your_repositories"}}ui basic blue button{{end}} item" href="{{.Link}}?type=your_repositories&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
|
<a class="{{if eq .ViewType "your_repositories"}}ui basic blue button{{end}} item" href="{{.Link}}?type=your_repositories&repo={{.RepoID}}&sort={{$.SortType}}&state={{.State}}">
|
||||||
|
@ -64,8 +64,16 @@
|
||||||
<div class="ui label">{{if not $.RepoID}}{{.Repo.FullName}}{{end}}#{{.Index}}</div>
|
<div class="ui label">{{if not $.RepoID}}{{.Repo.FullName}}{{end}}#{{.Index}}</div>
|
||||||
<a class="title has-emoji" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Title}}</a>
|
<a class="title has-emoji" href="{{AppSubUrl}}/{{.Repo.Owner.Name}}/{{.Repo.Name}}/issues/{{.Index}}">{{.Title}}</a>
|
||||||
|
|
||||||
{{range .Labels}}
|
{{with .Labels}}
|
||||||
<a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
|
{{/* If we have any labels, we should show them
|
||||||
|
with a 2.5 line height, this way they don't look
|
||||||
|
awful and they don't stack on top of each other,
|
||||||
|
especially on mobile views. */}}
|
||||||
|
<span style="line-height: 2.5">
|
||||||
|
{{range .}}
|
||||||
|
<a class="ui label" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&state={{$.State}}&labels={{.ID}}&milestone={{$.MilestoneID}}&assignee={{$.AssigneeID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}}">{{.Name}}</a>
|
||||||
|
{{end}}
|
||||||
|
</span>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{if .NumComments}}
|
{{if .NumComments}}
|
||||||
|
|
|
@ -1,36 +1,38 @@
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui floating dropdown link jump">
|
<div class="ui secondary stackable menu">
|
||||||
<span class="text">
|
<div class="item">
|
||||||
<img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}">
|
<div class="ui floating dropdown link jump">
|
||||||
{{.ContextUser.ShortName 20}}
|
<span class="text">
|
||||||
<i class="dropdown icon"></i>
|
<img class="ui avatar image" src="{{.ContextUser.RelAvatarLink}}">
|
||||||
</span>
|
{{.ContextUser.ShortName 20}}
|
||||||
<div class="context user overflow menu" tabindex="-1">
|
<i class="dropdown icon"></i>
|
||||||
<div class="ui header">
|
</span>
|
||||||
{{.i18n.Tr "home.switch_dashboard_context"}}
|
<div class="context user overflow menu" tabindex="-1">
|
||||||
</div>
|
<div class="ui header">
|
||||||
<div class="items">
|
{{.i18n.Tr "home.switch_dashboard_context"}}
|
||||||
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{end}}">
|
</div>
|
||||||
<img class="ui avatar image" src="{{.SignedUser.RelAvatarLink}}">
|
<div class="items">
|
||||||
{{.SignedUser.Name}}
|
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{end}}">
|
||||||
</a>
|
<img class="ui avatar image" src="{{.SignedUser.RelAvatarLink}}">
|
||||||
{{range .Orgs}}
|
{{.SignedUser.Name}}
|
||||||
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else}}dashboard{{end}}">
|
</a>
|
||||||
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
{{range .Orgs}}
|
||||||
{{.ShortName 20}}
|
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else}}dashboard{{end}}">
|
||||||
|
<img class="ui avatar image" src="{{.RelAvatarLink}}">
|
||||||
|
{{.ShortName 20}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
|
</div>
|
||||||
|
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||||
|
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_org"}}
|
||||||
</a>
|
</a>
|
||||||
{{end}}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
|
||||||
<i class="octicon octicon-plus"></i> {{.i18n.Tr "new_org"}}
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{{if .ContextUser.IsOrganization}}
|
{{if .ContextUser.IsOrganization}}
|
||||||
<div class="ui right">
|
<div class="right stackable menu">
|
||||||
<div class="ui secondary head menu">
|
<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
|
||||||
<a class="{{if .PageIsNews}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/dashboard">
|
|
||||||
<i class="octicon octicon-rss"></i> {{.i18n.Tr "activities"}}
|
<i class="octicon octicon-rss"></i> {{.i18n.Tr "activities"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
|
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/issues">
|
||||||
|
@ -39,15 +41,13 @@
|
||||||
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
|
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{AppSubUrl}}/org/{{.ContextUser.Name}}/pulls">
|
||||||
<i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "pull_requests"}}
|
<i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "pull_requests"}}
|
||||||
</a>
|
</a>
|
||||||
<div class="right menu">
|
<div class="item">
|
||||||
<div class="item">
|
<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}">
|
||||||
<a class="ui blue basic button" href="{{.ContextUser.HomeLink}}">
|
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
|
||||||
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 10)}}
|
</a>
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{{end}}
|
||||||
{{end}}
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div class="user profile">
|
<div class="user profile">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div class="ui grid">
|
<div class="ui stackable grid">
|
||||||
<div class="ui five wide column">
|
<div class="ui five wide column">
|
||||||
<div class="ui card">
|
<div class="ui card">
|
||||||
{{if eq .SignedUserName .Owner.Name}}
|
{{if eq .SignedUserName .Owner.Name}}
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui eleven wide column">
|
<div class="ui eleven wide column">
|
||||||
<div class="ui secondary pointing menu">
|
<div class="ui secondary stackable pointing menu">
|
||||||
<a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
|
<a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
|
||||||
<i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
|
<i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
|
||||||
</a>
|
</a>
|
||||||
|
|
Reference in a new issue