Browse Source

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

tags/vopendata0.1.2
colorfulberry 6 years ago
parent
commit
f1ff3ad39e
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 public = public
back = back back = back
copy_url=copy download url copy_url=copy download url
directory=check directory of the datasets
visibility = visibility visibility = visibility
visibility_description = Only the owner or the organization members if they have rights, will be able to see it. visibility_description = Only the owner or the organization members if they have rights, will be able to see it.
visibility_helper = Make Dataset Private visibility_helper = Make Dataset Private


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

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


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

@@ -2,7 +2,7 @@
{{range .Attachments}} {{range .Attachments}}
<div class="ui grid item" id="{{.UUID}}"> <div class="ui grid item" id="{{.UUID}}">
<div class="row"> <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}}"> <a class="title" href="{{.DownloadURL}}">
<span class="fitted">{{svg "octicon-cloud-download" 16}}</span> {{.Name}} <span class="fitted">{{svg "octicon-cloud-download" 16}}</span> {{.Name}}
</a> </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> <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>


<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> </div>


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


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

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

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


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


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


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


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


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


.repo-path { .repo-path {

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


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


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


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


input { input {
vertical-align: middle; 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; width: inherit;
padding: 7px 8px; padding: 7px 8px;
margin-right: 5px; margin-right: 5px;
@@ -504,8 +502,8 @@
display: inline-block; display: inline-block;
padding: 3px 6px; padding: 3px 6px;
font: 12px @monospaced-fonts, monospace; 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; border-radius: 3px;
} }


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

} }
} }


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


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


.review-item { .review-item {

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


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


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


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


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


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


.comment { .comment {

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


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


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


& > .svg:not(.issue-symbol) { & > .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 { & > .svg.issue-symbol {
@@ -1037,7 +1034,7 @@
} }


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


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


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

} }


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


&.ui.basic.striped.table tbody tr:nth-child(2n) { &.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 { > div:after {
clear: both; clear: both;
content: "";
content: '';
display: block; display: block;
} }


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


.code-diff-split { .code-diff-split {

table, table,
tbody { tbody {
width: 100%; width: 100%;
} }


tbody tr { tbody tr {

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


.diff-stats { .diff-stats {

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


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


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


.field { .field {

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


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


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


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


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


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


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


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


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


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


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


> .header, > .header,
.segment { .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 { > .svg + .content {
display: table-cell; display: table-cell;
padding: 0 0 0 .5em;
padding: 0 0 0 0.5em;
vertical-align: top; vertical-align: top;
} }


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


#avatar-arrow { #avatar-arrow {

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


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


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


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


.repo-buttons .disabled-repo-button a.button:hover { .repo-buttons .disabled-repo-button a.button:hover {
background: none !important; 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 { .repo-buttons .ui.labeled.button > .label {
@@ -2857,12 +2848,12 @@ td.blob-excerpt {
margin-top: 1em; margin-top: 1em;
} }


.diff-file-box[data-folded="true"] .diff-file-body {
.diff-file-box[data-folded='true'] .diff-file-body {
display: none; 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 */ /* prevent page shaking on language bar click */
@@ -2872,7 +2863,7 @@ td.blob-excerpt {
} }


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




Loading…
Cancel
Save