decidim-admin 0.0.8.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of decidim-admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/decidim/admin/_decidim.scss +9 -2
- data/app/assets/stylesheets/decidim/admin/extra/_action-icon.scss +7 -0
- data/app/assets/stylesheets/decidim/admin/extra/_cards.scss +6 -0
- data/app/assets/stylesheets/decidim/admin/extra/_editor.scss +1 -0
- data/app/assets/stylesheets/decidim/admin/{_sidebar.scss → extra/_sidebar.scss} +0 -0
- data/app/assets/stylesheets/decidim/admin/modules/_action-icon.scss +23 -0
- data/app/assets/stylesheets/decidim/admin/modules/_cards.scss +0 -7
- data/app/assets/stylesheets/decidim/admin/modules/_icons.scss +4 -2
- data/app/assets/stylesheets/decidim/admin/modules/_modules.scss +0 -1
- data/app/assets/stylesheets/decidim/admin/{modules/_datepicker.scss → plugins/_foundation-datepicker.scss} +1 -1
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/_constants.scss +5 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/_math.scss +45 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_acos.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_asin.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan.scss +28 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_atan2.scss +37 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cos.scss +13 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_cot.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_csc.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_exp.scss +12 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_fact.scss +18 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_frexp.scss +21 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_ldexp.scss +17 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_log.scss +34 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_pow.scss +28 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sec.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sin.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_sqrt.scss +16 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/functions/_tan.scss +9 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_deg-to-rad.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_rad-to-deg.scss +4 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_strip-unit.scss +8 -0
- data/app/assets/stylesheets/decidim/admin/vendor/mathsass/helpers/_unitless-rad.scss +13 -0
- data/app/commands/decidim/admin/create_participatory_process.rb +23 -17
- data/app/commands/decidim/admin/create_participatory_process_group.rb +1 -1
- data/app/controllers/decidim/admin/moderations_controller.rb +4 -4
- data/app/controllers/decidim/admin/participatory_processes_controller.rb +1 -1
- data/app/forms/decidim/admin/organization_form.rb +6 -2
- data/app/forms/decidim/admin/participatory_process_form.rb +5 -0
- data/app/helpers/decidim/admin/application_helper.rb +1 -1
- data/app/helpers/decidim/admin/attributes_display_helper.rb +1 -1
- data/app/views/decidim/admin/features/_feature.html.erb +5 -1
- data/app/views/decidim/admin/moderations/_report.html.erb +11 -0
- data/app/views/decidim/admin/moderations/index.html.erb +22 -24
- data/app/views/layouts/decidim/admin/participatory_process.html.erb +3 -0
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/ca.yml +7 -3
- data/config/locales/en.yml +6 -2
- data/config/locales/es.yml +7 -3
- data/config/locales/eu.yml +4 -3
- data/config/locales/fi.yml +4 -3
- data/config/locales/fr.yml +389 -2
- data/config/locales/nl.yml +4 -1
- data/lib/decidim/admin/test/manage_attachments_examples.rb +2 -2
- metadata +39 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e6f526c118a1adcc810170297e96011e1b9ab5
|
4
|
+
data.tar.gz: db85a15345011fe98a31a6f1a6039fa06da45d6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c0af09a20a45cc803b6a1b8b526b8aa392334e368978ed950476f84eb6abda9605546be7d1e4f87b8bfabf85fa421146e7fab05aaeb6de1ae7be6b75fe145e
|
7
|
+
data.tar.gz: c0b7775043e657e980d5c274bf8b9c1a6b64d005f342b04e2b3aca466e9dcdfe1bb0a8fef85c8b665184abf48b5a0b868d03ef22d118a1131e46902023a32147
|
@@ -1,8 +1,15 @@
|
|
1
1
|
@import "variables";
|
2
|
-
|
2
|
+
|
3
|
+
@import "utils/fontface";
|
4
|
+
@import "utils/helpers";
|
5
|
+
@import "utils/keyframes";
|
6
|
+
@import "utils/mixins";
|
7
|
+
@import "utils/settings";
|
8
|
+
@import "utils/toggle-expand";
|
3
9
|
|
4
10
|
@import "foundation";
|
5
11
|
@include foundation-everything();
|
6
|
-
|
12
|
+
|
13
|
+
@import "plugins/foundation-datepicker";
|
7
14
|
|
8
15
|
@import "modules/modules";
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "decidim/editor";
|
File without changes
|
@@ -1,3 +1,12 @@
|
|
1
|
+
@import "../vendor/mathsass/math";
|
2
|
+
|
3
|
+
$action-icon-height: 24px;
|
4
|
+
$action-icon-width: $icon-size;
|
5
|
+
|
6
|
+
.action-icon {
|
7
|
+
height: $action-icon-height;
|
8
|
+
}
|
9
|
+
|
1
10
|
.action-icon:not(:last-child){
|
2
11
|
margin-right: 1rem;
|
3
12
|
}
|
@@ -11,3 +20,17 @@
|
|
11
20
|
.action-icon.action-icon--remove{
|
12
21
|
color: $alert-color;
|
13
22
|
}
|
23
|
+
|
24
|
+
.action-icon--hide{
|
25
|
+
position: relative;
|
26
|
+
|
27
|
+
&:before{
|
28
|
+
border-left: 1px solid;
|
29
|
+
bottom: 0;
|
30
|
+
content: "";
|
31
|
+
left: 50%;
|
32
|
+
position: absolute;
|
33
|
+
top: 0;
|
34
|
+
transform: rotate(rad-to-deg(atan2($action-icon-width, $action-icon-height)));
|
35
|
+
}
|
36
|
+
}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
// MathSass v0.10.0
|
2
|
+
// https://github.com/terkel/mathsass
|
3
|
+
//
|
4
|
+
// Copyright (c) 2014 Takeru Suzuki - http://terkel.jp/
|
5
|
+
// Licensed under the MIT license - http://opensource.org/licenses/MIT
|
6
|
+
|
7
|
+
// Constants
|
8
|
+
@import "constants";
|
9
|
+
|
10
|
+
// Exponentiation
|
11
|
+
@import "functions/pow";
|
12
|
+
|
13
|
+
// Factorial
|
14
|
+
@import "functions/fact";
|
15
|
+
|
16
|
+
// Square root
|
17
|
+
@import "functions/sqrt";
|
18
|
+
|
19
|
+
// Exponential function
|
20
|
+
@import "functions/exp";
|
21
|
+
@import "functions/frexp";
|
22
|
+
@import "functions/ldexp";
|
23
|
+
|
24
|
+
// Logarithms
|
25
|
+
@import "functions/log";
|
26
|
+
|
27
|
+
// Trigonometric functions
|
28
|
+
@import "functions/sin";
|
29
|
+
@import "functions/cos";
|
30
|
+
@import "functions/tan";
|
31
|
+
@import "functions/csc";
|
32
|
+
@import "functions/sec";
|
33
|
+
@import "functions/cot";
|
34
|
+
|
35
|
+
// Inverse trigonometric functions
|
36
|
+
@import "functions/asin";
|
37
|
+
@import "functions/acos";
|
38
|
+
@import "functions/atan";
|
39
|
+
@import "functions/atan2";
|
40
|
+
|
41
|
+
// Helpers
|
42
|
+
@import "helpers/strip-unit";
|
43
|
+
@import "helpers/deg-to-rad";
|
44
|
+
@import "helpers/rad-to-deg";
|
45
|
+
@import "helpers/unitless-rad";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Returns the arccosine of a number.
|
2
|
+
// @param {Number} $x A number between -1 and 1.
|
3
|
+
// @example
|
4
|
+
// acos(0.1) // 1.47063
|
5
|
+
// acos(-1) // 3.14159
|
6
|
+
@function acos ($x) {
|
7
|
+
@if $x > 1 or $x < -1 {
|
8
|
+
@warn "Argument for `acos()` must be a number between -1 and 1";
|
9
|
+
@return null;
|
10
|
+
}
|
11
|
+
@return $PI / 2 - asin($x);
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Returns the arcsine of a number.
|
2
|
+
// @param {Number} $x A number between -1 and 1.
|
3
|
+
// @example
|
4
|
+
// asin(0.1) // 0.10017
|
5
|
+
// asin(-1) // -1.5708
|
6
|
+
@function asin ($x) {
|
7
|
+
@if $x > 1 or $x < -1 {
|
8
|
+
@warn "Argument for `asin()` must be a number between -1 and 1";
|
9
|
+
@return null;
|
10
|
+
}
|
11
|
+
@return atan($x / sqrt(1 - $x * $x));
|
12
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Returns the arctangent of a number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @example
|
4
|
+
// atan(0.1) // 0.09967
|
5
|
+
// atan(-1) // -0.7854
|
6
|
+
@function atan ($x) {
|
7
|
+
$i: 24;
|
8
|
+
$sgn: 0;
|
9
|
+
$a: 0;
|
10
|
+
@if $x > 1 {
|
11
|
+
$sgn: 1;
|
12
|
+
$x: 1 / $x;
|
13
|
+
} @else if $x < -1 {
|
14
|
+
$sgn: -1;
|
15
|
+
$x: 1 / $x;
|
16
|
+
}
|
17
|
+
@while $i > 0 {
|
18
|
+
$a: ($i * $i * $x * $x) / (2 * $i + 1 + $a);
|
19
|
+
$i: $i - 1;
|
20
|
+
}
|
21
|
+
@if $sgn > 0 {
|
22
|
+
@return $PI / 2 - $x / (1 + $a);
|
23
|
+
} @else if $sgn < 0 {
|
24
|
+
@return -$PI / 2 - $x / (1 + $a);
|
25
|
+
} @else {
|
26
|
+
@return $x / (1 + $a);
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
// Returns the arctangent of the quotient of its arguments.
|
2
|
+
// @param {Number} $y
|
3
|
+
// @param {Number} $x
|
4
|
+
// @example
|
5
|
+
// atan2(0, 0) // 0
|
6
|
+
// atan2(0, -0.0) // 3.14159
|
7
|
+
// atan2(-0.0, 0) // 0
|
8
|
+
// atan2(-0.0, -0.0) // -3.14159
|
9
|
+
// atan2(0, 1) // 0
|
10
|
+
// atan2(0, -1) // 3.14159
|
11
|
+
@function atan2 ($y, $x) {
|
12
|
+
@if $x > 0 {
|
13
|
+
@return atan($y / $x);
|
14
|
+
} @else if $x < 0 {
|
15
|
+
@if $y < 0 {
|
16
|
+
@return atan($y / $x) - $PI;
|
17
|
+
} @else {
|
18
|
+
@return atan($y / $x) + $PI;
|
19
|
+
}
|
20
|
+
} @else {
|
21
|
+
@if $y < 0 {
|
22
|
+
@return - $PI / 2;
|
23
|
+
} @else if $y > 0 {
|
24
|
+
@return $PI / 2;
|
25
|
+
} @else {
|
26
|
+
@if 1 / $x == 1 / 0 {
|
27
|
+
@return 0;
|
28
|
+
} @else {
|
29
|
+
@if 1 / $y == 1 / 0 {
|
30
|
+
@return $PI;
|
31
|
+
} @else {
|
32
|
+
@return -$PI;
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Returns the cosine of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// cos(0.7854) // 0.70711
|
5
|
+
// cos(45deg) // 0.70711
|
6
|
+
@function cos ($x) {
|
7
|
+
$x: unitless-rad($x) % ($PI * 2);
|
8
|
+
$ret: 0;
|
9
|
+
@for $n from 0 to 24 {
|
10
|
+
$ret: $ret + pow(-1, $n) * pow($x, 2 * $n) / fact(2 * $n);
|
11
|
+
}
|
12
|
+
@return $ret;
|
13
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Returns the cotangent of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// cot(0.5236) // 1.73205
|
5
|
+
// cot(30deg) // 1.73205
|
6
|
+
@function cot ($x) {
|
7
|
+
$x: unitless-rad($x);
|
8
|
+
@return 1 / tan($x);
|
9
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Returns the cosecant of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// csc(1.0472) // 1.1547
|
5
|
+
// csc(60deg) // 1.1547
|
6
|
+
@function csc ($x) {
|
7
|
+
$x: unitless-rad($x);
|
8
|
+
@return 1 / sin($x);
|
9
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Returns E^x, where x is the argument, and E is Euler's constant, the base of the natural logarithms.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @example
|
4
|
+
// exp(1) // 2.71828
|
5
|
+
// exp(-1) // 0.36788
|
6
|
+
@function exp ($x) {
|
7
|
+
$ret: 0;
|
8
|
+
@for $n from 0 to 24 {
|
9
|
+
$ret: $ret + pow($x, $n) / fact($n);
|
10
|
+
}
|
11
|
+
@return $ret;
|
12
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
// Returns the factorial of a non-negative integer.
|
2
|
+
// @param {Number} $x A non-negative integer.
|
3
|
+
// @return {Number}
|
4
|
+
// @example
|
5
|
+
// fact(0) // 1
|
6
|
+
// fact(8) // 40320
|
7
|
+
@function fact ($x) {
|
8
|
+
@if $x < 0 or $x != floor($x) {
|
9
|
+
@warn "Argument for `fact()` must be a positive integer.";
|
10
|
+
@return null;
|
11
|
+
}
|
12
|
+
$ret: 1;
|
13
|
+
@while $x > 0 {
|
14
|
+
$ret: $ret * $x;
|
15
|
+
$x: $x - 1;
|
16
|
+
}
|
17
|
+
@return $ret;
|
18
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// Returns a two-element list containing the normalized fraction and exponent of number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @return {List} fraction, exponent
|
4
|
+
@function frexp ($x) {
|
5
|
+
$exp: 0;
|
6
|
+
@if $x < 0 {
|
7
|
+
$x: $x * -1;
|
8
|
+
}
|
9
|
+
@if $x < 0.5 {
|
10
|
+
@while $x < 0.5 {
|
11
|
+
$x: $x * 2;
|
12
|
+
$exp: $exp - 1;
|
13
|
+
}
|
14
|
+
} @else if $x >= 1 {
|
15
|
+
@while $x >= 1 {
|
16
|
+
$x: $x / 2;
|
17
|
+
$exp: $exp + 1;
|
18
|
+
}
|
19
|
+
}
|
20
|
+
@return $x, $exp;
|
21
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Returns $x * 2^$exp
|
2
|
+
// @param {Number} $x
|
3
|
+
// @param {Number} $exp
|
4
|
+
@function ldexp ($x, $exp) {
|
5
|
+
$b: if($exp >= 0, 2, 1 / 2);
|
6
|
+
@if $exp < 0 {
|
7
|
+
$exp: $exp * -1;
|
8
|
+
}
|
9
|
+
@while $exp > 0 {
|
10
|
+
@if $exp % 2 == 1 {
|
11
|
+
$x: $x * $b;
|
12
|
+
}
|
13
|
+
$b: $b * $b;
|
14
|
+
$exp: floor($exp * 0.5);
|
15
|
+
}
|
16
|
+
@return $x;
|
17
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Returns the natural logarithm of a number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @param {Number} $b The base number
|
4
|
+
// @example
|
5
|
+
// log(2) // 0.69315
|
6
|
+
// log(10) // 2.30259
|
7
|
+
// log(2, 10) // 0.30103
|
8
|
+
@function log ($x, $b: null) {
|
9
|
+
@if $b == null {
|
10
|
+
@return _log($x);
|
11
|
+
} @else {
|
12
|
+
@return _log($x) / _log($b);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
@function _log ($x) {
|
17
|
+
@if $x <= 0 {
|
18
|
+
@return 0 / 0;
|
19
|
+
}
|
20
|
+
$k: nth(frexp($x / $SQRT2), 2);
|
21
|
+
$x: $x / ldexp(1, $k);
|
22
|
+
$x: ($x - 1) / ($x + 1);
|
23
|
+
$x2: $x * $x;
|
24
|
+
$i: 1;
|
25
|
+
$s: $x;
|
26
|
+
$sp: null;
|
27
|
+
@while $sp != $s {
|
28
|
+
$x: $x * $x2;
|
29
|
+
$i: $i + 2;
|
30
|
+
$sp: $s;
|
31
|
+
$s: $s + $x / $i;
|
32
|
+
}
|
33
|
+
@return $LN2 * $k + 2 * $s;
|
34
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Returns base to the exponent power.
|
2
|
+
// @param {Number} $base The base number
|
3
|
+
// @param {Number} $exp The exponent to which to raise base
|
4
|
+
// @return {Number}
|
5
|
+
// @example
|
6
|
+
// pow(4, 2) // 16
|
7
|
+
// pow(4, -2) // 0.0625
|
8
|
+
// pow(4, 0.2) // 1.31951
|
9
|
+
@function pow ($base, $exp) {
|
10
|
+
@if $exp == floor($exp) {
|
11
|
+
$r: 1;
|
12
|
+
$s: 0;
|
13
|
+
@if $exp < 0 {
|
14
|
+
$exp: $exp * -1;
|
15
|
+
$s: 1;
|
16
|
+
}
|
17
|
+
@while $exp > 0 {
|
18
|
+
@if $exp % 2 == 1 {
|
19
|
+
$r: $r * $base;
|
20
|
+
}
|
21
|
+
$exp: floor($exp * 0.5);
|
22
|
+
$base: $base * $base;
|
23
|
+
}
|
24
|
+
@return if($s != 0, 1 / $r, $r);
|
25
|
+
} @else {
|
26
|
+
@return exp(log($base) * $exp);
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Returns the secant of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// sec(0.7854) // 1.41422
|
5
|
+
// sec(45deg) // 1.41422
|
6
|
+
@function sec ($x) {
|
7
|
+
$x: unitless-rad($x);
|
8
|
+
@return 1 / cos($x);
|
9
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Returns the sine of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// sin(1.0472) // 0.86603
|
5
|
+
// sin(60deg) // 0.86603
|
6
|
+
@function sin ($x) {
|
7
|
+
$x: unitless-rad($x);
|
8
|
+
@return cos($x - $PI / 2);
|
9
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
// Returns the square root of a number.
|
2
|
+
// @param {Number} $x
|
3
|
+
// @example
|
4
|
+
// sqrt(2) // 1.41421
|
5
|
+
// sqrt(5) // 2.23607
|
6
|
+
@function sqrt ($x) {
|
7
|
+
@if $x < 0 {
|
8
|
+
@warn "Argument for `sqrt()` must be a positive number.";
|
9
|
+
@return null;
|
10
|
+
}
|
11
|
+
$ret: 1;
|
12
|
+
@for $i from 1 through 24 {
|
13
|
+
$ret: $ret - (pow($ret, 2) - $x) / (2 * $ret);
|
14
|
+
}
|
15
|
+
@return $ret;
|
16
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Returns the tangent of a number.
|
2
|
+
// @param {Number} $x A number in rad or deg. Assuming unitless number to be in rad.
|
3
|
+
// @example
|
4
|
+
// tan(0.5236) // 0.57735
|
5
|
+
// tan(30deg) // 0.57735
|
6
|
+
@function tan ($x) {
|
7
|
+
$x: unitless-rad($x);
|
8
|
+
@return sin($x) / cos($x);
|
9
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// Convert to unitless rad
|
2
|
+
@function unitless-rad ($angle) {
|
3
|
+
@if unitless($angle) {
|
4
|
+
@return $angle;
|
5
|
+
} @else if unit($angle) == rad {
|
6
|
+
@return $angle / 1rad;
|
7
|
+
} @else if unit($angle) == deg {
|
8
|
+
@return deg-to-rad($angle, false);
|
9
|
+
} @else if type-of($angle) != number or not unitless($angle) {
|
10
|
+
@warn "#{ $angle } is not a valid number.";
|
11
|
+
@return $angle;
|
12
|
+
}
|
13
|
+
}
|
@@ -35,24 +35,30 @@ module Decidim
|
|
35
35
|
attr_reader :form
|
36
36
|
|
37
37
|
def create_participatory_process
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
38
|
+
process = ParticipatoryProcess.new(
|
39
|
+
organization: form.current_organization,
|
40
|
+
title: form.title,
|
41
|
+
subtitle: form.subtitle,
|
42
|
+
slug: form.slug,
|
43
|
+
hashtag: form.hashtag,
|
44
|
+
description: form.description,
|
45
|
+
short_description: form.short_description,
|
46
|
+
hero_image: form.hero_image,
|
47
|
+
banner_image: form.banner_image,
|
48
|
+
promoted: form.promoted,
|
49
|
+
scope: form.scope,
|
50
|
+
developer_group: form.developer_group,
|
51
|
+
local_area: form.local_area,
|
52
|
+
target: form.target,
|
53
|
+
participatory_scope: form.participatory_scope,
|
54
|
+
participatory_structure: form.participatory_structure,
|
55
|
+
meta_scope: form.meta_scope,
|
56
|
+
end_date: form.end_date,
|
57
|
+
participatory_process_group: form.participatory_process_group
|
58
|
+
)
|
54
59
|
|
55
|
-
|
60
|
+
return process unless process.valid?
|
61
|
+
transaction do
|
56
62
|
process.save!
|
57
63
|
|
58
64
|
process.steps.create!(
|
@@ -48,10 +48,10 @@ module Decidim
|
|
48
48
|
def moderations
|
49
49
|
@moderations ||= begin
|
50
50
|
moderations = Decidim::Moderation.where(participatory_process: participatory_process)
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
51
|
+
if params[:hidden]
|
52
|
+
moderations.where.not(hidden_at: nil)
|
53
|
+
else
|
54
|
+
moderations.where(hidden_at: nil)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
end
|
@@ -26,7 +26,7 @@ module Decidim
|
|
26
26
|
CreateParticipatoryProcess.call(@form) do
|
27
27
|
on(:ok) do |participatory_process|
|
28
28
|
flash[:notice] = I18n.t("participatory_processes.create.success", scope: "decidim.admin")
|
29
|
-
redirect_to
|
29
|
+
redirect_to edit_participatory_process_path(participatory_process)
|
30
30
|
end
|
31
31
|
|
32
32
|
on(:invalid) do
|
@@ -32,8 +32,12 @@ module Decidim
|
|
32
32
|
validates :default_locale, presence: true
|
33
33
|
validates :default_locale, inclusion: { in: :available_locales }
|
34
34
|
|
35
|
-
validates :official_img_header,
|
36
|
-
|
35
|
+
validates :official_img_header,
|
36
|
+
file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } },
|
37
|
+
file_content_type: { allow: ["image/jpeg", "image/png"] }
|
38
|
+
validates :official_img_footer,
|
39
|
+
file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } },
|
40
|
+
file_content_type: { allow: ["image/jpeg", "image/png"] }
|
37
41
|
|
38
42
|
private
|
39
43
|
|
@@ -38,6 +38,11 @@ module Decidim
|
|
38
38
|
validates :hero_image, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] }
|
39
39
|
validates :banner_image, file_size: { less_than_or_equal_to: ->(_record) { Decidim.maximum_attachment_size } }, file_content_type: { allow: ["image/jpeg", "image/png"] }
|
40
40
|
|
41
|
+
def map_model(model)
|
42
|
+
self.scope_id = model.decidim_scope_id
|
43
|
+
self.participatory_process_group_id = model.decidim_participatory_process_group_id
|
44
|
+
end
|
45
|
+
|
41
46
|
def scope
|
42
47
|
@scope ||= current_organization.scopes.where(id: scope_id).first
|
43
48
|
end
|