Browse Source

feat; improve the dataset list pages and i18n for the directory

tags/v1.21.12.1
colorfulberry 5 years ago
parent
commit
6fed9e42a0
4 changed files with 50 additions and 57 deletions
  1. +1
    -0
      options/locale/locale_en-US.ini
  2. +1
    -0
      options/locale/locale_zh-CN.ini
  3. +3
    -3
      templates/repo/datasets/dataset_list.tmpl
  4. +45
    -54
      web_src/less/_repository.less

+ 1
- 0
options/locale/locale_en-US.ini View File

@@ -647,6 +647,7 @@ private = private
public = public
back = back
copy_url=copy download url
directory=check directory of the datasets
visibility = visibility
visibility_description = Only the owner or the organization members if they have rights, will be able to see it.
visibility_helper = Make Dataset Private


+ 1
- 0
options/locale/locale_zh-CN.ini View File

@@ -648,6 +648,7 @@ public=公有
dir=目录
back=返回
copy_url=复制下载链接
directory=查看数据集目录结构
visibility=可见性
visibility_description=只有组织所有人或拥有权利的组织成员才能看到。
visibility_helper=将数据集设为私有


+ 3
- 3
templates/repo/datasets/dataset_list.tmpl View File

@@ -2,7 +2,7 @@
{{range .Attachments}}
<div class="ui grid item" id="{{.UUID}}">
<div class="row">
<div class="{{if $.Permission.CanWrite $.UnitTypeDatasets}}six{{else}}ten{{end}} wide column">
<div class="{{if $.Permission.CanWrite $.UnitTypeDatasets}}five{{else}}nine{{end}} wide column">
<a class="title" href="{{.DownloadURL}}">
<span class="fitted">{{svg "octicon-cloud-download" 16}}</span> {{.Name}}
</a>
@@ -18,8 +18,8 @@
<span class="ui text center clipboard" data-clipboard-text="{{.DownloadURL}}" data-tooltip='{{$.i18n.Tr "dataset.copy_url"}}' data-clipboard-action="copy">{{svg "octicon-file" 16}}</span>
</div>

<div class="two wide column" style="{{if ne .DecompressState 1}}visibility: hidden{{end}}">
<a class="ui button mini" href="datasets/dirs/{{.UUID}}" data-uuid={{.UUID}} data-dataset-dir data-dir-url="{{AppSubUrl}}/attachments/dir" data-csrf="{{$.CsrfToken}}">{{$.i18n.Tr "dataset.dir"}}</a>
<div class="wide column one" style="{{if ne .DecompressState 1}}display:none{{end}}">
<a class="ui text center" href="datasets/dirs/{{.UUID}}" data-tooltip='{{$.i18n.Tr "dataset.directory"}}'>{{svg "octicon-file-directory" 16}}</a>
</div>

{{if $.Permission.CanWrite $.UnitTypeDatasets}}


+ 45
- 54
web_src/less/_repository.less View File

@@ -1,6 +1,5 @@
.repository {

padding-top: 15px;
// padding-top: 15px;

.repo-header {
.ui.compact.menu {
@@ -154,7 +153,7 @@
&.labels {
.label-filter .menu .info {
display: inline-block;
padding: .5rem .25rem;
padding: 0.5rem 0.25rem;
border-bottom: 1px solid #cccccc;
font-size: 12px;
width: 100%;
@@ -171,7 +170,7 @@
}

.text {
margin-left: .9em;
margin-left: 0.9em;
}

.menu {
@@ -227,7 +226,7 @@
padding: 0 5px;

&:first-child {
border-radius: .28571429rem 0 0 .28571429rem;
border-radius: 0.28571429rem 0 0 0.28571429rem;
}
}

@@ -259,7 +258,6 @@
}

.repo-path {

.section,
.divider {
display: inline;
@@ -377,11 +375,11 @@
}

.small.icon {
font-size: .75em;
font-size: 0.75em;
}

.tiny.icon {
font-size: .5em;
font-size: 0.5em;
}

.file-actions {
@@ -464,7 +462,7 @@

input {
vertical-align: middle;
box-shadow: rgba(0, 0, 0, .0745098) 0 1px 2px inset;
box-shadow: rgba(0, 0, 0, 0.0745098) 0 1px 2px inset;
width: inherit;
padding: 7px 8px;
margin-right: 5px;
@@ -504,8 +502,8 @@
display: inline-block;
padding: 3px 6px;
font: 12px @monospaced-fonts, monospace;
color: rgba(0, 0, 0, .65);
background-color: rgba(209, 227, 237, .45);
color: rgba(0, 0, 0, 0.65);
background-color: rgba(209, 227, 237, 0.45);
border-radius: 3px;
}

@@ -582,7 +580,6 @@
overflow-x: auto;
}
}

}
}

@@ -596,7 +593,7 @@
margin-bottom: 5px;

.ui.input {
font-size: .5em;
font-size: 0.5em;
vertical-align: top;
width: 50%;
min-width: 600px;
@@ -660,7 +657,6 @@
}

.review-item {

.avatar,
.type-icon {
float: none;
@@ -675,7 +671,7 @@
}

.text {
margin: .3em 0 .5em .5em;
margin: 0.3em 0 0.5em 0.5em;
}

.type-icon {
@@ -684,7 +680,7 @@
}

.divider {
margin: .5rem 0;
margin: 0.5rem 0;
}

.review-content {
@@ -696,7 +692,7 @@
.comment-list {
&:not(.prevent-before-timeline):before {
display: block;
content: "";
content: '';
position: absolute;
margin-top: 12px;
margin-bottom: 14px;
@@ -714,9 +710,10 @@
margin-left: 40px;
padding-left: 16px;

&:before { //ciara
&:before {
//ciara
display: block;
content: "";
content: '';
position: absolute;
margin-top: 12px;
margin-bottom: 14px;
@@ -810,13 +807,12 @@
}

.comment {

.tag {
color: #767676;
margin-top: 3px;
padding: 2px 5px;
font-size: 12px;
border: 1px solid rgba(0, 0, 0, .1);
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 3px;
&.review {
margin-left: 5px;
@@ -888,10 +884,10 @@
}

.actions a {
color: rgba(0, 0, 0, .4);
color: rgba(0, 0, 0, 0.4);

&:hover {
color: rgba(0, 0, 0, .8);
color: rgba(0, 0, 0, 0.8);
}
}
}
@@ -998,7 +994,8 @@
padding-left: 15px;

& > .svg:not(.issue-symbol) {
text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff, 0 -2px #fff;
text-shadow: -2px 0 #fff, 0 2px #fff, 2px 0 #fff,
0 -2px #fff;
}

& > .svg.issue-symbol {
@@ -1037,7 +1034,7 @@
}

.detail {
font-size: .9rem;
font-size: 0.9rem;
margin-top: 5px;
margin-left: 35px;

@@ -1134,9 +1131,8 @@
}

.orglabel {
opacity: .7;
opacity: 0.7;
}

}

.milestone.list {
@@ -1315,7 +1311,7 @@
}

&.ui.basic.striped.table tbody tr:nth-child(2n) {
background-color: rgba(0, 0, 0, .02) !important;
background-color: rgba(0, 0, 0, 0.02) !important;
}
}

@@ -1434,7 +1430,7 @@

> div:after {
clear: both;
content: "";
content: '';
display: block;
}

@@ -1590,14 +1586,12 @@
}

.code-diff-split {

table,
tbody {
width: 100%;
}

tbody tr {

// light gray for empty lines before / after commit
&.add-code td:nth-child(1),
&.add-code td:nth-child(2),
@@ -1650,7 +1644,6 @@
}

.diff-stats {

clear: both;
margin-bottom: 5px;
max-height: 400px;
@@ -1697,7 +1690,7 @@
}

.clone.button:first-child {
border-radius: .28571429rem 0 0 .28571429rem;
border-radius: 0.28571429rem 0 0 0.28571429rem;
}

.ui.action.small.input {
@@ -1825,7 +1818,6 @@
}

.field {

button,
input {
@media only screen and (max-width: 438px) {
@@ -2158,7 +2150,7 @@
}

&.active {
background: rgba(0, 0, 0, .05);
background: rgba(0, 0, 0, 0.05);
}
}
}
@@ -2172,12 +2164,12 @@
min-width: 15em;

> .header {
margin: .75rem 0 .5rem;
margin: 0.75rem 0 0.5rem;
}

> .item {
float: left;
padding: .5rem .5rem !important;
padding: 0.5rem 0.5rem !important;
font-size: 1.5em;
width: 45px;
left: 13px;
@@ -2206,7 +2198,7 @@

&.disabled {
cursor: default;
opacity: .5;
opacity: 0.5;
}
}

@@ -2221,7 +2213,7 @@

.select-reaction {
float: left;
padding: .6em;
padding: 0.6em;
line-height: 21px;

&:not(.active) a {
@@ -2462,11 +2454,11 @@
border-radius: 4px;

.dz-button {
color: rgba(0, 0, 0, .6);
color: rgba(0, 0, 0, 0.6);
}

&:hover .dz-button {
color: rgba(0, 0, 0, .8);
color: rgba(0, 0, 0, 0.8);
}

.dz-error-message {
@@ -2481,7 +2473,7 @@

> .header,
.segment {
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15);
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
}
}

@@ -2503,7 +2495,7 @@

> .svg + .content {
display: table-cell;
padding: 0 0 0 .5em;
padding: 0 0 0 0.5em;
vertical-align: top;
}

@@ -2590,13 +2582,12 @@
}

#avatar-arrow {

&:before,
&:after {
right: 100%;
top: 20px;
border: solid transparent;
content: " ";
content: ' ';
height: 0;
width: 0;
position: absolute;
@@ -2642,7 +2633,7 @@
display: table-cell;

&.tiny {
height: .5em;
height: 0.5em;
}
}
}
@@ -2799,18 +2790,18 @@ tbody.commit-list {
}

.repo-buttons .disabled-repo-button .label {
opacity: .5;
opacity: 0.5;
}

.repo-buttons .disabled-repo-button a.button {
opacity: .5;
opacity: 0.5;
cursor: not-allowed;
}

.repo-buttons .disabled-repo-button a.button:hover {
background: none !important;
color: rgba(0, 0, 0, .6) !important;
box-shadow: 0 0 0 1px rgba(34, 36, 38, .15) inset !important;
color: rgba(0, 0, 0, 0.6) !important;
box-shadow: 0 0 0 1px rgba(34, 36, 38, 0.15) inset !important;
}

.repo-buttons .ui.labeled.button > .label {
@@ -2857,12 +2848,12 @@ td.blob-excerpt {
margin-top: 1em;
}

.diff-file-box[data-folded="true"] .diff-file-body {
.diff-file-box[data-folded='true'] .diff-file-body {
display: none;
}

.diff-file-box[data-folded="true"] .diff-file-header {
border-radius: .28571429rem !important;
.diff-file-box[data-folded='true'] .diff-file-header {
border-radius: 0.28571429rem !important;
}

/* prevent page shaking on language bar click */
@@ -2872,7 +2863,7 @@ td.blob-excerpt {
}

.ui.form .right .ui.button {
margin-left: .25em;
margin-left: 0.25em;
margin-right: 0;
}



Loading…
Cancel
Save