crowdai_admin 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +7 -0
  2. data/LICENCE.txt +22 -0
  3. data/Readme.md +84 -0
  4. data/app/assets/fonts/Lato-Bold.eot +0 -0
  5. data/app/assets/fonts/Lato-Bold.ttf +0 -0
  6. data/app/assets/fonts/Lato-Bold.woff +0 -0
  7. data/app/assets/fonts/Lato-Bold.woff2 +0 -0
  8. data/app/assets/fonts/Lato-BoldItalic.eot +0 -0
  9. data/app/assets/fonts/Lato-BoldItalic.ttf +0 -0
  10. data/app/assets/fonts/Lato-BoldItalic.woff +0 -0
  11. data/app/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  12. data/app/assets/fonts/Lato-Italic.eot +0 -0
  13. data/app/assets/fonts/Lato-Italic.ttf +0 -0
  14. data/app/assets/fonts/Lato-Italic.woff +0 -0
  15. data/app/assets/fonts/Lato-Italic.woff2 +0 -0
  16. data/app/assets/fonts/Lato-Regular.eot +0 -0
  17. data/app/assets/fonts/Lato-Regular.ttf +0 -0
  18. data/app/assets/fonts/Lato-Regular.woff +0 -0
  19. data/app/assets/fonts/Lato-Regular.woff2 +0 -0
  20. data/app/assets/javascripts/crowdai_admin/base.js +79 -0
  21. data/app/assets/stylesheets/crowdai_admin/_base.scss +42 -0
  22. data/app/assets/stylesheets/crowdai_admin/_common.scss +27 -0
  23. data/app/assets/stylesheets/crowdai_admin/_grid.scss +4 -0
  24. data/app/assets/stylesheets/crowdai_admin/_reset.scss +41 -0
  25. data/app/assets/stylesheets/crowdai_admin/components/_columns.scss +4 -0
  26. data/app/assets/stylesheets/crowdai_admin/components/_comments.scss +54 -0
  27. data/app/assets/stylesheets/crowdai_admin/components/_components.scss +13 -0
  28. data/app/assets/stylesheets/crowdai_admin/components/_date_picker.scss +38 -0
  29. data/app/assets/stylesheets/crowdai_admin/components/_dialogs.scss +23 -0
  30. data/app/assets/stylesheets/crowdai_admin/components/_flash.scss +27 -0
  31. data/app/assets/stylesheets/crowdai_admin/components/_form.scss +65 -0
  32. data/app/assets/stylesheets/crowdai_admin/components/_iframes.scss +27 -0
  33. data/app/assets/stylesheets/crowdai_admin/components/_inputs.scss +109 -0
  34. data/app/assets/stylesheets/crowdai_admin/components/_pagination.scss +25 -0
  35. data/app/assets/stylesheets/crowdai_admin/components/_panel_contents.scss +14 -0
  36. data/app/assets/stylesheets/crowdai_admin/components/_status_tag.scss +17 -0
  37. data/app/assets/stylesheets/crowdai_admin/components/_tables.scss +65 -0
  38. data/app/assets/stylesheets/crowdai_admin/components/_tabs.scss +33 -0
  39. data/app/assets/stylesheets/crowdai_admin/layouts/_filter.scss +64 -0
  40. data/app/assets/stylesheets/crowdai_admin/layouts/_footer.scss +4 -0
  41. data/app/assets/stylesheets/crowdai_admin/layouts/_header.scss +237 -0
  42. data/app/assets/stylesheets/crowdai_admin/layouts/_main_content.scss +44 -0
  43. data/app/assets/stylesheets/crowdai_admin/layouts/_sidebar.scss +104 -0
  44. data/app/assets/stylesheets/crowdai_admin/layouts/_wrapper.scss +8 -0
  45. data/app/assets/stylesheets/crowdai_admin/mixins/_buttons_mixins.scss +120 -0
  46. data/app/assets/stylesheets/crowdai_admin/mixins/_mixins.scss +3 -0
  47. data/app/assets/stylesheets/crowdai_admin/mixins/_prefix_mixins.scss +63 -0
  48. data/app/assets/stylesheets/crowdai_admin/mixins/_sidebar_mixins.scss +24 -0
  49. data/app/assets/stylesheets/crowdai_admin/pages/_form.scss +116 -0
  50. data/app/assets/stylesheets/crowdai_admin/pages/_index.scss +116 -0
  51. data/app/assets/stylesheets/crowdai_admin/pages/_login.scss +65 -0
  52. data/app/assets/stylesheets/crowdai_admin/pages/_show.scss +3 -0
  53. data/app/assets/stylesheets/crowdai_admin/variables/_colors.scss +49 -0
  54. data/app/assets/stylesheets/crowdai_admin/variables/_media_queries.scss +10 -0
  55. data/app/assets/stylesheets/crowdai_admin/variables/_size.scss +9 -0
  56. data/app/assets/stylesheets/crowdai_admin/variables/_variables.scss +5 -0
  57. data/lib/crowdai_admin/custom_builder.rb +65 -0
  58. data/lib/crowdai_admin/toggle_booleans.rb +41 -0
  59. data/lib/crowdai_admin/version.rb +3 -0
  60. data/lib/crowdai_admin.rb +11 -0
  61. metadata +178 -0
@@ -0,0 +1,109 @@
1
+ input[type="text"], input[type="email"], input[type="password"],
2
+ input[type="tel"], input[type="date"], input[type="datetime-local"],
3
+ input[type="month"], input[type="range"], input[type="search"],
4
+ input[type="time"], input[type="url"], input[type="week"],
5
+ input[type="number"], textarea {
6
+ @include appearance();
7
+ @include box-shadow(none);
8
+
9
+ display: block;
10
+ width: 100%;
11
+ height: 36px;
12
+ padding: 6px 12px;
13
+ font-size: 14px;
14
+ line-height: 1.57142857;
15
+ color: $text-color;
16
+ background-color: #fff;
17
+ background-image: none;
18
+ border: 1px solid $border-color;
19
+ outline: 0;
20
+ border-radius: $border-radius;
21
+ @include transition(border-color ease-in-out .15s);
22
+
23
+ &:focus {
24
+ border-color: $primary-color;
25
+ @include appearance();
26
+ @include transition(border .25s linear,color .25s linear,background-color .25s linear);
27
+ }
28
+
29
+ &:disabled {
30
+ opacity: 0.6;
31
+ }
32
+
33
+ &:-webkit-autofill, &:-webkit-autofill:hover, &:-webkit-autofill:focus {
34
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
35
+ -webkit-text-fill-color: $text-color;
36
+ }
37
+ }
38
+
39
+ input[type="submit"] {
40
+ @include appearance();
41
+ @include primary-button($primary-color, white);
42
+ width: 100%;
43
+ padding: 0 12px;
44
+ font-size: 15px;
45
+ font-weight: 500;
46
+ @include box-shadow(0 1px 0 rgba(0,0,0,.05));
47
+ border: none;
48
+ cursor: pointer;
49
+ }
50
+
51
+ input[type="checkbox"] {
52
+ height: 15px;
53
+ width: 15px;
54
+ -webkit-appearance: none!important;
55
+ background-color: #fff;
56
+ border: 1px solid #e6e6e6;
57
+ border-radius: $border-radius;
58
+ box-sizing: border-box;
59
+ @include outline();
60
+ @include transition-button();
61
+ cursor: pointer;
62
+
63
+ &:checked {
64
+ border-color: $primary-color;
65
+ background-color: $primary-color;
66
+ }
67
+ }
68
+
69
+ input[type="radio"] {
70
+ @include appearance();
71
+ border: 2px solid $primary-color;
72
+ width: 15px;
73
+ height: 15px;
74
+ border-radius: 50%;
75
+ margin: 1px 5px 1px 1px;
76
+ display: inline-flex;
77
+ @include outline();
78
+ @include transition-button();
79
+
80
+ &:checked {
81
+ background-color: $primary-color;
82
+ }
83
+ }
84
+
85
+ select {
86
+ background-color: #fff;
87
+ background-image: none;
88
+ border: 1px solid $border-color;
89
+ outline: 0;
90
+ border-radius: $border-radius;
91
+ font-size: 14px;
92
+ color: #5a5a5a;
93
+ @include transition(border-color ease-in-out .15s);
94
+
95
+ &:focus {
96
+ border-color: $primary-color;
97
+ @include box-shadow(none);
98
+ @include transition(border .25s linear,color .25s linear,background-color .25s linear);
99
+ }
100
+
101
+ &:-webkit-autofill {
102
+ -webkit-box-shadow: 0 0 0px 1000px white inset;
103
+ }
104
+ }
105
+
106
+ textarea {
107
+ height: 80px;
108
+ padding: 5px 10px;
109
+ }
@@ -0,0 +1,25 @@
1
+ .pagination {
2
+ font-size: 13px;
3
+ margin-bottom: 10px;
4
+
5
+ .page {
6
+ text-align: center;
7
+ }
8
+
9
+ .page a, .next a, .last a, .first a, .prev a {
10
+ padding: .3rem .4rem;
11
+ color: $text-color;
12
+ @include transition-button();
13
+
14
+ &:hover {
15
+ color: $primary-color;
16
+ }
17
+ }
18
+ .page.current {
19
+ background-color: $primary-color;
20
+ color: #fff;
21
+ border-radius: $border-radius;
22
+ padding: .3rem .4rem;
23
+ cursor: normal;
24
+ }
25
+ }
@@ -0,0 +1,14 @@
1
+ .panel_contents {
2
+ .paginated_collection {
3
+ #index_footer {
4
+ margin: 10px;
5
+ text-align: right;
6
+ font-size: 12px;
7
+ }
8
+ }
9
+
10
+ th {
11
+ text-align: left;
12
+ padding: 8px;
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ .status_tag {
2
+ background: $status-tag-background-color;
3
+ color: $status-tag-text-color;
4
+ text-transform: uppercase;
5
+ letter-spacing: 0.15em;
6
+ padding: 3px 5px 2px 5px;
7
+ font-size: 0.8em;
8
+ border-radius: $border-radius;
9
+ }
10
+
11
+ .status_tag.ok, .status_tag.published, .status_tag.complete, .status_tag.completed, .status_tag.green {
12
+ background-color: $status-tag-background-valid-color;
13
+ }
14
+
15
+ .status_tag.cancel, .status_tag.red {
16
+ background-color: $status-tag-background-error-color;
17
+ }
@@ -0,0 +1,65 @@
1
+ table {
2
+ width: 100%;
3
+ border-collapse: collapse;
4
+
5
+ &:not(.index_table) {
6
+ border-radius: $border-radius;
7
+ margin-bottom: 10px;
8
+ }
9
+ }
10
+
11
+ thead tr {
12
+ border: 1px solid $border-color;
13
+ background-color: $border-color;
14
+ }
15
+
16
+ thead th {
17
+ font-size: 12px;
18
+ text-align: left;
19
+
20
+ a {
21
+ color: $text-color-important;
22
+ font-weight: normal;
23
+ width: 100%;
24
+ display: inline-block;
25
+ padding: 4px 20px 4px 4px;
26
+
27
+ @media screen and (min-width: $md-width) {
28
+ padding: 8px 20px 8px 8px;
29
+ }
30
+ }
31
+
32
+ &.col-selectable {
33
+ padding-left: 4px;
34
+
35
+ @media screen and (min-width: $md-width) {
36
+ padding-left: 8px;
37
+ }
38
+ }
39
+ }
40
+
41
+ tbody tr {
42
+ border: 1px solid $border-color;
43
+
44
+ &:hover {
45
+ background-color: rgba(228, 234, 236, 0.3);
46
+ }
47
+
48
+ th {
49
+ font-size: 14px;
50
+ }
51
+
52
+ td {
53
+ padding: 4px;
54
+ vertical-align: middle;
55
+ color: $text-color;
56
+ font-size: 12px;
57
+ &.col-actions {
58
+ padding: 6px 8px;
59
+ }
60
+
61
+ @media screen and (min-width: $md-width) {
62
+ padding: 8px;
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,33 @@
1
+ .tabs.ui-tabs {
2
+ border: 1px solid $border-color;
3
+
4
+ .nav {
5
+ text-align: center;
6
+ border-bottom: 1px solid $border-color;
7
+
8
+ li {
9
+ display: inline-block;
10
+ @include outline();
11
+
12
+ a {
13
+ color: $text-color;
14
+ display: inline-block;
15
+ padding: 15px 25px;
16
+ @include outline();
17
+ @include transition-button();
18
+ }
19
+
20
+ &.ui-tabs-active {
21
+ border-bottom: 2px solid $primary-color;
22
+
23
+ a {
24
+ color: $primary-color;
25
+ }
26
+ }
27
+ }
28
+ }
29
+
30
+ .tab-content {
31
+ padding: 10px 20px;
32
+ }
33
+ }
@@ -0,0 +1,64 @@
1
+ #sidebar {
2
+ width: $filter-width;
3
+ background-color: #fff;
4
+ border-radius: $border-radius;
5
+ @include box-shadow(0 0 4px 0 rgba(0,0,0,.04));
6
+ margin-bottom: 30px;
7
+
8
+ @media screen and (min-width: $x-lg-width) {
9
+ width: $lg-filter-width;
10
+ }
11
+
12
+ .sidebar_section {
13
+ padding: 15px 20px;
14
+
15
+ h3 {
16
+ margin: 0 0 10px 0;
17
+ }
18
+
19
+ .label {
20
+ display: block;
21
+ text-align: left;
22
+ }
23
+
24
+ .input {
25
+ margin-bottom: 15px;
26
+
27
+ input, select {
28
+ height: 30px;
29
+ padding: 3px 5px;
30
+ font-size: 12px;
31
+ }
32
+ }
33
+
34
+ .select_and_search {
35
+ input, select {
36
+ width: 45%;
37
+ display: inline-block;
38
+ }
39
+
40
+ input {
41
+ float: right;
42
+ }
43
+ }
44
+
45
+ .filter_select select {
46
+ width: 100%;
47
+ }
48
+
49
+ .filter_date_range input {
50
+ width: 45%;
51
+ display: inline-block;
52
+ }
53
+
54
+ input[type="submit"] {
55
+ width: auto;
56
+ line-height: 31px;
57
+ margin-right: 10px;
58
+ }
59
+ }
60
+
61
+ #search-status-_sidebar_section {
62
+ font-size: 14px;
63
+ }
64
+ }
@@ -0,0 +1,4 @@
1
+ .footer {
2
+ display: inline-block;
3
+ padding: 0 15px;
4
+ }
@@ -0,0 +1,237 @@
1
+ body.active_admin.logged_in {
2
+ padding-top: 50px;
3
+
4
+ @media screen and (min-width: $sm-width) {
5
+ padding-top: 60px;
6
+ }
7
+
8
+ @media screen and (min-width: $lg-width) {
9
+ padding-left: $header-width;
10
+ }
11
+
12
+ @media screen and (min-width: $x-lg-width) {
13
+ padding-left: $lg-header-width;
14
+ }
15
+
16
+ #active_admin_content {
17
+ padding: 30px 0;
18
+ @include clear-fix();
19
+
20
+ @media screen and (min-width: $lg-width) {
21
+ padding: 30px 25px;
22
+ }
23
+ }
24
+ }
25
+
26
+ .header {
27
+ .site_title {
28
+ width: 160px;
29
+ height: 50px;
30
+ font-size: 16px;
31
+ line-height: 50px;
32
+ position: fixed;
33
+ top: 0;
34
+ left: 0;
35
+ background-color: $header-background;
36
+ border-bottom: 1px solid $header-border-color;
37
+ margin: 0;
38
+ padding-left: 20px;
39
+
40
+ @media screen and (min-width: $sm-width) {
41
+ width: $header-width;
42
+ height: 60px;
43
+ font-size: 20px;
44
+ line-height: 60px;
45
+ }
46
+
47
+ @media screen and (min-width: $x-lg-width) {
48
+ width: $lg-header-width;
49
+ }
50
+
51
+ #site_title_image {
52
+ height: 100%;
53
+ padding: 6px 0;
54
+ }
55
+ }
56
+
57
+ #utility_nav {
58
+ height: 50px;
59
+ width: calc(100% - 160px);
60
+ position: fixed;
61
+ top: 0;
62
+ right: 0;
63
+ z-index: 3;
64
+ text-align: right;
65
+ background-color: $header-background;
66
+ border-bottom: 1px solid $header-border-color;
67
+
68
+ &:before {
69
+ @include icon("\f0c9");
70
+
71
+ display: inline;
72
+ visibility: visible;
73
+ cursor: pointer;
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ color: $text-color;
78
+ padding: 15px 0;
79
+ text-align: center;
80
+ width: 40px;
81
+ font-size: 20px;
82
+ }
83
+
84
+ @media screen and (min-width: $sm-width) {
85
+ height: 60px;
86
+ width: $screen-header-width;
87
+
88
+ &:before {
89
+ padding: 20px 0;
90
+ }
91
+ }
92
+
93
+ @media screen and (min-width: $lg-width) {
94
+ &:before {
95
+ display: none;
96
+ }
97
+ }
98
+
99
+ @media screen and (min-width: $x-lg-width) {
100
+ width: $lg-screen-header-width;
101
+ }
102
+
103
+ li {
104
+ display: inline-block;
105
+ @include transition-button();
106
+
107
+ &:hover {
108
+ background-color: $header-nav-action-hover-background;
109
+ }
110
+
111
+ &:active {
112
+ background-color: $header-nav-action-active-background;
113
+ }
114
+ }
115
+
116
+ #current_user {
117
+ a {
118
+ visibility: hidden;
119
+ position: relative;
120
+ width: 50px;
121
+ height: 49px;
122
+ display: inline-block;
123
+
124
+ &:before {
125
+ @include icon("\f007");
126
+
127
+ display: inline;
128
+ visibility: visible;
129
+ cursor: pointer;
130
+ position: absolute;
131
+ top: 0;
132
+ right: 0;
133
+ color: $text-color;
134
+ padding: 15px 0;
135
+ text-align: center;
136
+ width: 50px;
137
+ font-size: 20px;
138
+ }
139
+
140
+ @media screen and (min-width: $sm-width) {
141
+ width: 60px;
142
+ height: 59px;
143
+
144
+ &:before {
145
+ padding: 20px 0;
146
+ width: 60px;
147
+ }
148
+ }
149
+ }
150
+ }
151
+
152
+ #logout {
153
+ min-width: 50px;
154
+ min-height: 49px;
155
+ float: right;
156
+
157
+ a {
158
+ visibility: hidden;
159
+ position: relative;
160
+ width: 50px;
161
+ display: block;
162
+
163
+ &:before {
164
+ @include icon("\f011");
165
+
166
+ display: inline;
167
+ visibility: visible;
168
+ cursor: pointer;
169
+ position: absolute;
170
+ top: 0;
171
+ right: 0;
172
+ color: $text-color;
173
+ padding: 15px 0;
174
+ text-align: center;
175
+ width: 50px;
176
+ font-size: 20px;
177
+ }
178
+
179
+ }
180
+
181
+ @media screen and (min-width: $sm-width) {
182
+ min-width: 60px;
183
+ min-height: 59px;
184
+
185
+ a {
186
+ width: 60px;
187
+ height: 59px;
188
+
189
+ &:before {
190
+ padding: 20px 0;
191
+ width: 60px;
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+
199
+ #title_bar {
200
+ background-color: #fff;
201
+ @include box-shadow($box-shadow);
202
+ margin: 15px 0 0 0;
203
+ padding: 8px 10px;
204
+ @include clear-fix();
205
+
206
+ @media screen and (min-width: $lg-width) {
207
+ padding: 8px 20px;
208
+ border-radius: $border-radius;
209
+ margin: 15px 25px 0 25px;
210
+ }
211
+
212
+ #titlebar_left {
213
+ display: inline-block;
214
+ float: left;
215
+ line-height: 29px;
216
+
217
+ h2 {
218
+ display: inline-block;
219
+ font-size: 16px;
220
+ }
221
+ }
222
+
223
+ #titlebar_right {
224
+ display: inline-block;
225
+ float: right;
226
+
227
+ .action_item a {
228
+ @include primary-button($primary-color, #fff);
229
+ padding: 5px 8px;
230
+ }
231
+ }
232
+
233
+ #page_title {
234
+ font-weight: normal;
235
+ margin: 0;
236
+ }
237
+ }
@@ -0,0 +1,44 @@
1
+ #main_content_wrapper {
2
+ float: left;
3
+ width: 100%;
4
+
5
+ @include clear-fix();
6
+ }
7
+
8
+ #active_admin_content.with_sidebar #main_content_wrapper {
9
+ width: 100%;
10
+
11
+ @media screen and (min-width: $sm-width) {
12
+ #main_content {
13
+ border-top-right-radius: $border-radius;
14
+ border-bottom-right-radius: $border-radius;
15
+ }
16
+ }
17
+
18
+ @media screen and (min-width: $lg-width) {
19
+ #main_content {
20
+ margin-right: 20px;
21
+ }
22
+ }
23
+
24
+ @media screen and (min-width: $lg-width) {
25
+ #main_content {
26
+ margin-right: 20px;
27
+ }
28
+ }
29
+ }
30
+
31
+ #main_content {
32
+ background-color: #fff;
33
+ @include box-shadow(0 0 4px 0 rgba(0,0,0,.04));
34
+ padding: 15px 10px;
35
+
36
+ @media screen and (max-width: 576px) {
37
+ overflow-x: scroll;
38
+ }
39
+
40
+ @media screen and (min-width: $lg-width) {
41
+ padding: 20px;
42
+ border-radius: $border-radius;
43
+ }
44
+ }
@@ -0,0 +1,104 @@
1
+ .header #tabs {
2
+ width: $header-width;
3
+ height: calc(100% - 60px);
4
+ position: fixed;
5
+ top: 50px;
6
+ background-color: $sidebar-background;
7
+ border-right: 1px solid $sidebar-border-color;
8
+ z-index: 1;
9
+ overflow: auto;
10
+ left: - $header-width;
11
+
12
+ @media screen and (min-width: $sm-width) {
13
+ top: 60px;
14
+ }
15
+
16
+ @media screen and (min-width: $lg-width) {
17
+ left: 0px !important;
18
+ }
19
+
20
+ @media screen and (min-width: $x-lg-width) {
21
+ width: $lg-header-width;
22
+ }
23
+
24
+ li {
25
+ width: 100%;
26
+ font-size: 14px;
27
+ line-height: 38px;
28
+ cursor: pointer;
29
+
30
+ a {
31
+ width: 100%;
32
+ height: 100%;
33
+ display: inline-block;
34
+ color: $text-color;
35
+ padding: 0 20px;
36
+
37
+ &:hover {
38
+ background-color: $sidebar-item-hover-background;
39
+ }
40
+ }
41
+
42
+ &.current {
43
+ a {
44
+ color: $primary-color;
45
+ }
46
+ }
47
+
48
+ &.has_nested {
49
+ & > a:nth-child(1) {
50
+ position: relative;
51
+
52
+ &:after {
53
+ @include icon("\f0d7");
54
+ display: inline;
55
+ position: absolute;
56
+ top: 50%;
57
+ right: 20px;
58
+ @include transform(translateY(-50%));
59
+ color: $text-color;
60
+ }
61
+ }
62
+
63
+ ul {
64
+ border-top: 1px solid $sidebar-border-color;
65
+ border-bottom: 1px solid $sidebar-border-color;
66
+ background-color: $body-background;
67
+ padding: 10px 0;
68
+ cursor: auto;
69
+ display: none;
70
+
71
+ a {
72
+ padding: 0px 15px 0px 35px;
73
+ color: $text-color;
74
+
75
+ &:hover {
76
+ background-color: $sidebar-nested-item-hover-background;
77
+ }
78
+
79
+ @media screen and (min-width: $x-lg-width) {
80
+ padding: 0px 15px 0px 40px;
81
+ }
82
+ }
83
+
84
+ .current a {
85
+ color: $primary-color;
86
+ }
87
+ }
88
+
89
+ &.open, &.current {
90
+ & > a:nth-child(1) {
91
+ position: relative;
92
+
93
+ &:after {
94
+ @include icon("\f0d8");
95
+ }
96
+ }
97
+
98
+ ul {
99
+ display: block;
100
+ }
101
+ }
102
+ }
103
+ }
104
+ }