From f8f1ad644ca0fb6115e237da8dd532a6848794f6 Mon Sep 17 00:00:00 2001
From: Sebastian Kippe
Date: Thu, 5 Sep 2019 11:36:50 +0200
Subject: [PATCH] WIP: vetoed contribution details
Adds a blurb and resubmit button to the detail view for vetoed
contributions.
---
app/components/icon-warning/component.js | 5 ++
app/components/icon-warning/template.hbs | 15 ++++
.../components/_contribution-details.scss | 33 ++++++++-
.../dashboard/contributions/show.hbs | 16 ++++-
warning.svg | 71 +++++++++++++++++++
5 files changed, 138 insertions(+), 2 deletions(-)
create mode 100644 app/components/icon-warning/component.js
create mode 100644 app/components/icon-warning/template.hbs
create mode 100644 warning.svg
diff --git a/app/components/icon-warning/component.js b/app/components/icon-warning/component.js
new file mode 100644
index 0000000..6858137
--- /dev/null
+++ b/app/components/icon-warning/component.js
@@ -0,0 +1,5 @@
+import Component from '@ember/component';
+
+export default Component.extend({
+ tagName: ""
+});
diff --git a/app/components/icon-warning/template.hbs b/app/components/icon-warning/template.hbs
new file mode 100644
index 0000000..d4d53d6
--- /dev/null
+++ b/app/components/icon-warning/template.hbs
@@ -0,0 +1,15 @@
+
diff --git a/app/styles/components/_contribution-details.scss b/app/styles/components/_contribution-details.scss
index d10e146..80c04b6 100644
--- a/app/styles/components/_contribution-details.scss
+++ b/app/styles/components/_contribution-details.scss
@@ -41,7 +41,7 @@ section#contribution-details {
}
}
- a {
+ a:not(.button) {
color: $primary-color;
text-decoration: none;
@@ -54,4 +54,35 @@ section#contribution-details {
.actions {
text-align: center;
}
+
+ &.vetoed {
+ .content {
+ h3 {
+ text-decoration: line-through;
+ }
+ }
+ }
+
+ .hint.vetoed {
+ overflow: auto;
+ margin-top: 2rem;
+ padding-top: 2rem;
+ border-top: 1px solid rgba(255,255,255,0.2);
+ font-size: 1.2rem;
+
+ .icon {
+ display: inline-block;
+ width: 40px;
+ height: 40px;
+ float: left;
+ margin-right: 1rem;
+ margin-bottom: 1rem;
+
+ svg {
+ width: 100%;
+ height: auto;
+ }
+ }
+ }
+
}
diff --git a/app/templates/dashboard/contributions/show.hbs b/app/templates/dashboard/contributions/show.hbs
index 9dcc8cd..3dab7ec 100644
--- a/app/templates/dashboard/contributions/show.hbs
+++ b/app/templates/dashboard/contributions/show.hbs
@@ -1,4 +1,4 @@
-
+
Contribution #{{model.id}}
{{/if}}
+ {{#if model.vetoed}}
+
+
+ {{icon-warning}}
+
+
+ This contribution has been vetoed, meaning no
+ kredits will be issued.
+
+
+ {{link-to "Re-submit contribution" "signup" class="button small green"}}.
+
+
+ {{/if}}
diff --git a/warning.svg b/warning.svg
new file mode 100644
index 0000000..73231ed
--- /dev/null
+++ b/warning.svg
@@ -0,0 +1,71 @@
+
+