# HG changeset patch # User Marcin Kuzminski # Date 2019-05-14 21:16:02 # Node ID 385533201f2f754cd469ca9eaea13a550c8b5511 # Parent 6a107e97b909db540aaf396d5c4dfd9d4572e3d3 artifacts: updated CE code for this EE feature. diff --git a/rhodecode/public/css/main.less b/rhodecode/public/css/main.less --- a/rhodecode/public/css/main.less +++ b/rhodecode/public/css/main.less @@ -2516,3 +2516,36 @@ form.markup-form { padding: 20px; background-color: white; } + +.dropzone { + border: 2px dashed @rcdarkblue; + border-radius: 5px; + background: white; + min-height: 200px; + padding: 54px; +} +.dropzone .dz-message { + font-weight: 700; +} + +.dropzone .dz-message { + text-align: center; + margin: 2em 0; +} + +.dz-preview { + margin: 10px -40px !important; + position: relative; + vertical-align: top; + border: 1px solid @grey4; + border-radius: 5px; + padding: 10px; +} + +.dz-filename { + font-weight: 700; +} + +.dz-error-message { + color: @alert2; +} \ No newline at end of file diff --git a/rhodecode/public/css/tables.less b/rhodecode/public/css/tables.less --- a/rhodecode/public/css/tables.less +++ b/rhodecode/public/css/tables.less @@ -103,6 +103,11 @@ table.dataTable { } } + &.td-icon { + min-width: 20px; + width: 20px; + } + &.td-hash { min-width: 80px; width: 200px; diff --git a/rhodecode/public/js/rhodecode/routes.js b/rhodecode/public/js/rhodecode/routes.js --- a/rhodecode/public/js/rhodecode/routes.js +++ b/rhodecode/public/js/rhodecode/routes.js @@ -131,6 +131,7 @@ function registerRCRoutes() { pyroutes.register('repo_new', '/_admin/repos/new', []); pyroutes.register('repo_create', '/_admin/repos/create', []); pyroutes.register('repo_groups', '/_admin/repo_groups', []); + pyroutes.register('repo_groups_data', '/_admin/repo_groups_data', []); pyroutes.register('repo_group_new', '/_admin/repo_group/new', []); pyroutes.register('repo_group_create', '/_admin/repo_group/create', []); pyroutes.register('channelstream_connect', '/_admin/channelstream/connect', []); @@ -356,6 +357,11 @@ function registerRCRoutes() { pyroutes.register('my_account_auth_tokens_add', '/_admin/my_account/auth_tokens/new', []); pyroutes.register('my_account_external_identity', '/_admin/my_account/external-identity', []); pyroutes.register('my_account_external_identity_delete', '/_admin/my_account/external-identity/delete', []); + pyroutes.register('repo_artifacts_list', '/%(repo_name)s/artifacts', ['repo_name']); + pyroutes.register('repo_artifacts_data', '/%(repo_name)s/artifacts_data', ['repo_name']); + pyroutes.register('repo_artifacts_new', '/%(repo_name)s/artifacts/new', ['repo_name']); + pyroutes.register('repo_artifacts_store', '/%(repo_name)s/artifacts/store', ['repo_name']); + pyroutes.register('repo_artifacts_delete', '/%(repo_name)s/artifacts/delete/%(uid)s', ['repo_name', 'uid']); pyroutes.register('repo_automation', '/%(repo_name)s/settings/automation', ['repo_name']); pyroutes.register('repo_automation_update', '/%(repo_name)s/settings/automation/%(entry_id)s/update', ['repo_name', 'entry_id']); pyroutes.register('edit_repo_remote_push', '/%(repo_name)s/settings/remote/push', ['repo_name']); diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -377,6 +377,28 @@ +## ARTIFACT RENDERERS + +<%def name="repo_artifact_uid(file_uid)"> + ${file_uid} + + +<%def name="repo_artifact_uid_action(file_uid)"> + + + +<%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)"> +##
+## ${_('Edit')} +##
+
+ ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)} + ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger", + onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")} + ${h.end_form()} +
+ + <%def name="markup_form(form_id, form_text='', help_text=None)">