redde 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. data/.gitignore +20 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +4 -0
  4. data/Guardfile +24 -0
  5. data/LICENSE +22 -0
  6. data/README.md +57 -0
  7. data/Rakefile +2 -0
  8. data/lib/generators/redde/deploy/deploy_generator.rb +34 -0
  9. data/lib/generators/redde/deploy/templates/Capfile +4 -0
  10. data/lib/generators/redde/deploy/templates/deploy.rb +33 -0
  11. data/lib/generators/redde/deploy/templates/recipes/base.rb +16 -0
  12. data/lib/generators/redde/deploy/templates/recipes/check.rb +13 -0
  13. data/lib/generators/redde/deploy/templates/recipes/database.rb +66 -0
  14. data/lib/generators/redde/deploy/templates/recipes/imagemagick.rb +8 -0
  15. data/lib/generators/redde/deploy/templates/recipes/memcached.rb +10 -0
  16. data/lib/generators/redde/deploy/templates/recipes/monit.rb +35 -0
  17. data/lib/generators/redde/deploy/templates/recipes/nginx.rb +26 -0
  18. data/lib/generators/redde/deploy/templates/recipes/nodejs.rb +10 -0
  19. data/lib/generators/redde/deploy/templates/recipes/postfix.rb +37 -0
  20. data/lib/generators/redde/deploy/templates/recipes/rbenv.rb +17 -0
  21. data/lib/generators/redde/deploy/templates/recipes/templates/database.yml.erb +8 -0
  22. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.conf.erb +57 -0
  23. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-filter.defaults.erb +11 -0
  24. data/lib/generators/redde/deploy/templates/recipes/templates/dkim-keys.conf.erb +2 -0
  25. data/lib/generators/redde/deploy/templates/recipes/templates/gemrc.erb +1 -0
  26. data/lib/generators/redde/deploy/templates/recipes/templates/main.cf.erb +43 -0
  27. data/lib/generators/redde/deploy/templates/recipes/templates/memcached.erb +47 -0
  28. data/lib/generators/redde/deploy/templates/recipes/templates/monit_monitrc.erb +21 -0
  29. data/lib/generators/redde/deploy/templates/recipes/templates/monit_nginx.erb +5 -0
  30. data/lib/generators/redde/deploy/templates/recipes/templates/monit_unicorn.erb +14 -0
  31. data/lib/generators/redde/deploy/templates/recipes/templates/nginx_unicorn.erb +28 -0
  32. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn.rb.erb +36 -0
  33. data/lib/generators/redde/deploy/templates/recipes/templates/unicorn_init.erb +84 -0
  34. data/lib/generators/redde/deploy/templates/recipes/unicorn.rb +27 -0
  35. data/lib/generators/redde/layout/layout_generator.rb +57 -0
  36. data/lib/generators/redde/layout/templates/assets/images/admin/addphoto.png +0 -0
  37. data/lib/generators/redde/layout/templates/assets/images/admin/ajaxloader2.gif +0 -0
  38. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_down.png +0 -0
  39. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_enter.png +0 -0
  40. data/lib/generators/redde/layout/templates/assets/images/admin/arrow_right.png +0 -0
  41. data/lib/generators/redde/layout/templates/assets/images/admin/coins.png +0 -0
  42. data/lib/generators/redde/layout/templates/assets/images/admin/confirm.png +0 -0
  43. data/lib/generators/redde/layout/templates/assets/images/admin/del.png +0 -0
  44. data/lib/generators/redde/layout/templates/assets/images/admin/delete.png +0 -0
  45. data/lib/generators/redde/layout/templates/assets/images/admin/email.png +0 -0
  46. data/lib/generators/redde/layout/templates/assets/images/admin/error.png +0 -0
  47. data/lib/generators/redde/layout/templates/assets/images/admin/fio.png +0 -0
  48. data/lib/generators/redde/layout/templates/assets/images/admin/folder.png +0 -0
  49. data/lib/generators/redde/layout/templates/assets/images/admin/folder_.png +0 -0
  50. data/lib/generators/redde/layout/templates/assets/images/admin/icon_eye.gif +0 -0
  51. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/css/jquery.lightbox-0.5.css +101 -0
  52. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-blank.gif +0 -0
  53. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-close.gif +0 -0
  54. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-next.gif +0 -0
  55. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-btn-prev.gif +0 -0
  56. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/images/lightbox-ico-loading.gif +0 -0
  57. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.js +32 -0
  58. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.js +477 -0
  59. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.min.js +42 -0
  60. data/lib/generators/redde/layout/templates/assets/images/admin/lightbox/js/jquery.lightbox-0.5.pack.js +14 -0
  61. data/lib/generators/redde/layout/templates/assets/images/admin/logo.png +0 -0
  62. data/lib/generators/redde/layout/templates/assets/images/admin/logo_reddeshop.png +0 -0
  63. data/lib/generators/redde/layout/templates/assets/images/admin/move_handler.png +0 -0
  64. data/lib/generators/redde/layout/templates/assets/images/admin/phone.png +0 -0
  65. data/lib/generators/redde/layout/templates/assets/images/admin/photo_ico.png +0 -0
  66. data/lib/generators/redde/layout/templates/assets/images/admin/print.png +0 -0
  67. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/docstyle.css +123 -0
  68. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/redactor.css +369 -0
  69. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/style.css +119 -0
  70. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/css/wym.css +136 -0
  71. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/img/icons.png +0 -0
  72. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/by.js +72 -0
  73. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/de.js +75 -0
  74. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/en.js +76 -0
  75. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/es.js +76 -0
  76. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/fr.js +74 -0
  77. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/hu.js +76 -0
  78. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/it.js +76 -0
  79. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ja.js +76 -0
  80. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/lv.js +74 -0
  81. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/nl.js +76 -0
  82. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pl.js +75 -0
  83. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/pt_br.js +81 -0
  84. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ru.js +75 -0
  85. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/sq.js +76 -0
  86. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/tr.js +76 -0
  87. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/ua.js +75 -0
  88. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/langs/zh_cn.js +77 -0
  89. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/file.html +3 -0
  90. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image.html +39 -0
  91. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/image_edit.html +35 -0
  92. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/link.html +74 -0
  93. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/table.html +25 -0
  94. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/plugins/video.html +15 -0
  95. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.js.erb +2260 -0
  96. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/redactor.min.js +1 -0
  97. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/default.js +219 -0
  98. data/lib/generators/redde/layout/templates/assets/images/admin/redactor/toolbars/mini.js +103 -0
  99. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/_jquery.reddebox.js.erb +214 -0
  100. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/close.png +0 -0
  101. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.js.erb +246 -0
  102. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/jquery.reddebox.scss +31 -0
  103. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/next.png +0 -0
  104. data/lib/generators/redde/layout/templates/assets/images/admin/reddebox/prev.png +0 -0
  105. data/lib/generators/redde/layout/templates/assets/images/admin/refresh.png +0 -0
  106. data/lib/generators/redde/layout/templates/assets/images/admin/submit.png +0 -0
  107. data/lib/generators/redde/layout/templates/assets/images/admin/submit_hover.png +0 -0
  108. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/change-log.txt +19 -0
  109. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/check-exists.php +15 -0
  110. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/index.php +50 -0
  111. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.js +888 -0
  112. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/jquery.uploadifive.min.js +6 -0
  113. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/license-standard.txt +71 -0
  114. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-cancel.png +0 -0
  115. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive-image-only.php +66 -0
  116. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.css +100 -0
  117. data/lib/generators/redde/layout/templates/assets/images/admin/uploadifive/uploadifive.php +33 -0
  118. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/#swfobject.js +4 -0
  119. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/cancel.png +0 -0
  120. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/jquery.uploadify.min.js +315 -0
  121. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify-cancel.png +0 -0
  122. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.css +66 -0
  123. data/lib/generators/redde/layout/templates/assets/images/admin/uploadify/uploadify.swf +0 -0
  124. data/lib/generators/redde/layout/templates/assets/images/admin/view.png +0 -0
  125. data/lib/generators/redde/layout/templates/assets/images/admin/view_mk.png +0 -0
  126. data/lib/generators/redde/layout/templates/assets/javascripts/admin/jquery.ui.nestedSortable.js +390 -0
  127. data/lib/generators/redde/layout/templates/assets/javascripts/admin/swfobject.js +4 -0
  128. data/lib/generators/redde/layout/templates/assets/javascripts/admin/zen_textarea.min.js +17 -0
  129. data/lib/generators/redde/layout/templates/assets/javascripts/admin.js +88 -0
  130. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/_reset.scss +32 -0
  131. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_list.scss +22 -0
  132. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_notice.scss +39 -0
  133. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_orders.scss +22 -0
  134. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_partners.scss +15 -0
  135. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_photos.scss +31 -0
  136. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/blocks/_sortable.scss +17 -0
  137. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/default.scss +127 -0
  138. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_input.scss +43 -0
  139. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/defaults/_table.scss +24 -0
  140. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_header.scss +57 -0
  141. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_launchbar.scss +35 -0
  142. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_login.scss +10 -0
  143. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_main.scss +59 -0
  144. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/layouts/_sidebar.scss +35 -0
  145. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_filter.scss +16 -0
  146. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_order-sh.scss +59 -0
  147. data/lib/generators/redde/layout/templates/assets/stylesheets/admin/shop/_pe.scss +43 -0
  148. data/lib/generators/redde/layout/templates/assets/stylesheets/admin.scss +12 -0
  149. data/lib/generators/redde/layout/templates/controllers/base_controller.rb +6 -0
  150. data/lib/generators/redde/layout/templates/helpers/admin_helper.rb +37 -0
  151. data/lib/generators/redde/layout/templates/layouts/admin.html.haml +30 -0
  152. data/lib/generators/redde/layout/templates/layouts/login.html.haml +32 -0
  153. data/lib/generators/redde/layout/templates/shared/_header.html.haml +13 -0
  154. data/lib/generators/redde/layout/templates/shared/_launchbar.html.haml +9 -0
  155. data/lib/generators/redde/layout/templates/shared/_sidebar.html.haml +23 -0
  156. data/lib/generators/redde/scaffold/scaffold_generator.rb +114 -0
  157. data/lib/generators/redde/scaffold/templates/controllers/controller.rb +55 -0
  158. data/lib/generators/redde/scaffold/templates/edit.html.haml +36 -0
  159. data/lib/generators/redde/scaffold/templates/index.html.haml +37 -0
  160. data/lib/redde/version.rb +3 -0
  161. data/lib/redde.rb +4 -0
  162. data/redde.gemspec +26 -0
  163. data/spec/deploy_generator_spec.rb +29 -0
  164. data/spec/layout_generator_spec.rb +41 -0
  165. data/spec/scaffold_generator_spec.rb +25 -0
  166. data/spec/spec_helper.rb +10 -0
  167. metadata +327 -0
@@ -0,0 +1,127 @@
1
+ a.del {
2
+ background:image-url("admin/del.png") no-repeat 100% 0; display:inline-block; height:20px; line-height:20px; padding:0 22px 0 0;
3
+ &:hover {background-position:100% -80px;}
4
+ }
5
+
6
+ .actions {margin:10px 0;}
7
+
8
+ .ac_results {
9
+ padding: 0px;
10
+ border: 1px solid black;
11
+ background-color: white;
12
+ overflow: hidden;
13
+ z-index: 99999;
14
+ }
15
+
16
+ .ac_results ul {width: 100%;list-style-position: outside;list-style: none;padding: 0;margin: 0;}
17
+
18
+ .ac_results li {
19
+ margin: 0px;
20
+ padding: 2px 5px;
21
+ cursor: default;
22
+ display: block;
23
+ /*
24
+ if width will be 100% horizontal scrollbar will apear
25
+ when scroll mode will be used
26
+ */
27
+ /*width: 100%;*/
28
+ font: menu;
29
+ font-size: 12px;
30
+ /*
31
+ it is very important, if line-height not setted or setted
32
+ in relative units scroll will be broken in firefox
33
+ */
34
+ line-height: 16px;
35
+ overflow: hidden;
36
+ color:#004D83;
37
+ }
38
+
39
+ /*.ac_results li strong {color:#4490BC;}
40
+ */
41
+ .ac_loading {
42
+ background: white image-url('admin/ajaxloader2.gif') right center no-repeat;
43
+ }
44
+
45
+ .ac_odd {
46
+ background-color: #eee;
47
+ }
48
+
49
+ .ac_over {
50
+ background-color: #4490BC;
51
+ color: #fff !important;
52
+ }
53
+
54
+ .ac_results2 {min-width:333px; max-width:600px; width:auto !important;}
55
+
56
+ table.lang {
57
+ td {text-align:right;}
58
+ a.selected {color:#000;}
59
+ }
60
+
61
+ #main #page-header {
62
+ h1.partner {font-size:22px; line-height:22px; font-weight:normal; float:none;}
63
+ p.partner {color:#777; float:none; }
64
+ a.partner-lnk { font-size:12px; color:#0047B3; line-height:12px; }
65
+ }
66
+
67
+ .edit-box {
68
+ float:right; margin-left:-100%;
69
+ a.red {color:#f00;}
70
+ }
71
+
72
+ .full #page_sidebar {display:none;}
73
+
74
+ .order-list {list-style-position: inside}
75
+
76
+ .tbl {
77
+ border-collapse:collapse; width:100%;
78
+ .for_img {width:1px; text-align:left; padding-right:5px; border-bottom:3px solid #EDEDED; vertical-align:bottom; }
79
+ tr.bot {
80
+ th, td {border-bottom-width:3px;}
81
+ th {vertical-align:top;}
82
+ }
83
+ th, td {vertical-align:middle;}
84
+ th {padding:5px 10px 5px 5px; width:1%;}
85
+ td {width:auto; padding-top:4px; }
86
+ td.handle { width:25px; text-align:left; vertical-align:middle;}
87
+ th.handle {width:auto;}
88
+ td.handle img {display:block;}
89
+ th {width:auto;}
90
+ td.last {text-align:right; width:1px;}
91
+ }
92
+
93
+ .tusers {
94
+ tr:hover td {background:#ffc; cursor:pointer;}
95
+ .plast { width:1px; text-align:left; padding-left:10px; padding-right:10px; border-left:1px solid #ededed;}
96
+ }
97
+
98
+ .tmenu {
99
+ .i2 {width:40%;}
100
+ }
101
+
102
+ .article {
103
+ clear:both; overflow:hidden; margin-bottom:10px;
104
+ p.delete-link {clear:both;}
105
+ }
106
+
107
+ #showcases {
108
+ .red {color:#f00;}
109
+ .green {color:green;}
110
+ }
111
+
112
+ #sales_sortable {
113
+ td,th {vertical-align:middle;}
114
+ }
115
+ #sale_product_ids {
116
+ optgroup option {
117
+ margin-left:17px;
118
+ &.red {
119
+ background:red !important; color:#fff !important;
120
+ &:after {content:"*"};
121
+ }
122
+ }
123
+ }
124
+
125
+ .vam {vertical-align:middle !important;}
126
+ .vab {vertical-align:bottom !important;}
127
+
@@ -0,0 +1,43 @@
1
+ input[type=submit] {
2
+ cursor:pointer;
3
+ padding:3px 17px;
4
+ font-family: Helvetica, Arial, sans-serif;
5
+ font-weight:bold;
6
+ color:#444;
7
+ background:image-url("admin/submit.png") repeat-x 0 50%;
8
+ @include background(linear-gradient(top, #f2f2f2 0%,#ebebeb 50%,#dddddd 51%,#cfcfcf 100%));
9
+ border:1px solid #707070;
10
+ border-radius: 2px;
11
+ text-shadow:0 1px 1px rgba(255,255,255,0.85);
12
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 1px 1px 0 #fff inset, -1px -1px 0 #fff inset;
13
+
14
+ &[value=Сохранить], &[value=Применить] {
15
+ padding-left: 37px;
16
+ }
17
+ &[value=Сохранить] {
18
+ @include background(image-url("admin/arrow_enter.png") 4px -102px no-repeat, linear-gradient(top, #f2f2f2 0%,#ebebeb 50%,#dddddd 51%,#cfcfcf 100%));
19
+ &:hover {
20
+ @include background(image-url("admin/arrow_enter.png") 4px -1px no-repeat,linear-gradient(top, #eaf6fd 0%,#d9f0fc 50%,#bee6fd 51%,#a7d9f5 100%));
21
+ }
22
+ }
23
+ &[value=Применить] {
24
+ @include background(image-url("admin/arrow_down.png") 4px -102px no-repeat, linear-gradient(top, #f2f2f2 0%,#ebebeb 50%,#dddddd 51%,#cfcfcf 100%));
25
+ &:hover {
26
+ @include background(image-url("admin/arrow_down.png") 4px -1px no-repeat,linear-gradient(top, #eaf6fd 0%,#d9f0fc 50%,#bee6fd 51%,#a7d9f5 100%));
27
+ }
28
+ }
29
+ &[value=Далее] {
30
+ padding-right: 37px;
31
+ @include background(image-url("admin/arrow_right.png") right -100px no-repeat, linear-gradient(top, #f2f2f2 0%,#ebebeb 50%,#dddddd 51%,#cfcfcf 100%));
32
+ &:hover {
33
+ @include background(image-url("admin/arrow_right.png") right 2px no-repeat,linear-gradient(top, #eaf6fd 0%,#d9f0fc 50%,#bee6fd 51%,#a7d9f5 100%));
34
+ }
35
+ }
36
+ &:hover {
37
+ background-image:image-url("admin/submit_hover.png");
38
+ @include background(linear-gradient(top, #eaf6fd 0%,#d9f0fc 50%,#bee6fd 51%,#a7d9f5 100%));
39
+ border-color:#3c7fb1;
40
+ box-shadow: 0 1px 6px rgb(44, 146, 193);
41
+ color:#025984;
42
+ }
43
+ }
@@ -0,0 +1,24 @@
1
+ table {
2
+ border-collapse:collapse; width:100%;
3
+ thead {
4
+ th, td {padding-top:0; padding-bottom:0; }
5
+ }
6
+ th, td {vertical-align:baseline; padding: 4px 0; border-bottom: 1px solid #EDEDED;}
7
+ th {
8
+ border-bottom: 1px solid #EDEDED; width:1px; padding-right:10px;
9
+ label {white-space:nowrap;}
10
+ }
11
+ td {
12
+ padding-left:2px;
13
+ a { color: #999; text-decoration: none; font-size: 11px; }
14
+ input[type=text], input[type=password], textarea {
15
+ border-radius:1px;
16
+ width:100%; margin-left:-2px; border:1px solid #000; border-color:#abadb3 #dbdfe6 #e3e9ef #e2e3ea;
17
+ &:hover {border-color:#5794bf #b7d5ea #c7e2f1 #c5daed;}
18
+ }
19
+ textarea.mini {height:60px; resize:none;}
20
+ input[type=password] {width:auto;}
21
+ select {margin-left:-2px;}
22
+ .imp_redactor_box {margin-left:-2px;}
23
+ }
24
+ }
@@ -0,0 +1,57 @@
1
+ #header {
2
+ padding:1px 30px;
3
+ color: white;
4
+ font-size: 14px;
5
+ line-height:23px;
6
+ text-decoration: none;
7
+ overflow: hidden;
8
+ margin-bottom: 20px;
9
+ box-shadow: #666 0 0 3px;
10
+ background-color: #005782;
11
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1A719C', endColorstr='#005782');
12
+ @include background(linear-gradient(top, #1A719C 0%, #005782 100%));
13
+ background: linear-gradient(to bottom, #1A719C 0%, #005782 100%);
14
+ #header_wrapper {
15
+ max-width: 980px;
16
+ min-width:580px;
17
+ padding:0 29px 0 249px;
18
+ margin: 10px auto;
19
+ overflow:hidden;
20
+ position:relative;
21
+ }
22
+ #app_logo {
23
+ width: 220px;
24
+ right: 220px;
25
+ position:absolute; top:0; left:29px;
26
+ overflow:hidden;
27
+ a {
28
+ margin-top:8px;
29
+ background:image-url('admin/logo.png') no-repeat 0 0;
30
+ width:148px;
31
+ height:32px;
32
+ overflow:hidden;
33
+ text-indent:-9999px;
34
+ display:block;
35
+ }
36
+ }
37
+ #center {
38
+ overflow: hidden;
39
+ float:left;
40
+ font-size: 14px;
41
+ a {color:#fff}
42
+ }
43
+
44
+ #links {
45
+ float: right;
46
+ margin-right:4px;
47
+ a {
48
+ padding-bottom: 2px;
49
+ margin-left: 8px;
50
+ color: white;
51
+ font-size: 10px;
52
+ text-decoration: none;
53
+ white-space: nowrap;
54
+ line-height: 46px;
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,35 @@
1
+ #launchbar {
2
+ background: black;
3
+ overflow: hidden;
4
+ position: relative;
5
+ text-align: left;
6
+ ul.menus {padding: 0 25px;}
7
+ li {
8
+ float: left;
9
+ position: relative;
10
+ margin-right: 4px;
11
+ display: list-item;
12
+ list-style-type: none;
13
+ line-height: normal;
14
+ padding: 0;
15
+ &.fr {
16
+ float:right;
17
+ color:#fff;
18
+ padding: 5px 2px 6px 4px;
19
+ font-size:14px;
20
+ }
21
+ a {
22
+ position: relative;
23
+ display: block;
24
+ padding: 5px 7px 6px 4px;
25
+ font-size: 14px;
26
+ color: #999;
27
+ border-right: 1px solid #222;
28
+ text-decoration: none;
29
+ }
30
+ &.active a {
31
+ color: #DDD;
32
+ font-weight: bold;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,10 @@
1
+ html.login {
2
+ &, body { width:100%; height:100%; }
3
+ #main {min-height:0; width:370px; margin:0 auto; margin-bottom:100px;}
4
+ table.login {border-collapse:collapse; width:100%; height:100%;}
5
+ td.login {vertical-align:middle;}
6
+ .fields {
7
+ margin:0 0 5px 0;
8
+ input {width:100%}
9
+ }
10
+ }
@@ -0,0 +1,59 @@
1
+ #main {
2
+ box-shadow: 0 0 3px #ccc;
3
+ border-radius: 6px;
4
+ border: 1px solid #D7D7D7;
5
+ min-height: 500px;
6
+ background-color: white;
7
+ padding: 0;
8
+ overflow: hidden;
9
+ border-bottom: 1px solid #DADEE5;
10
+ margin: 0;
11
+ #content {padding: 30px;}
12
+ .sidebar #content {
13
+ margin-right:305px;
14
+ }
15
+ .sidebar #page_sidebar {float:right;}
16
+
17
+ #page_sidebar{
18
+ float: right;
19
+ margin: 0 30px 0 0;
20
+ padding: 30px 0 0 30px;
21
+ width: 245px;
22
+ border-left: 1px solid #efefef;
23
+ ul.photos li {
24
+ display: inline;list-style-type: none;
25
+ }
26
+ h5 {
27
+ line-height: 1.0em;
28
+ padding: 0 0 3px 0;
29
+ font-size: 12px;
30
+ text-transform: none;
31
+ border-bottom: 1px solid #efefef;
32
+ color: #222;
33
+ font-weight: bold;
34
+ }
35
+ p {font-size:12px;}
36
+ }
37
+
38
+ #page-header{
39
+ overflow: hidden;
40
+ background: #F1F5F9;
41
+ border-bottom: 1px solid #DADEE5;
42
+ padding: 15px 30px;
43
+ margin: 0;
44
+ border-top-right-radius: 5px;
45
+ border-top-left-radius: 5px;
46
+ h1 {
47
+ font-size: 16px;
48
+ float: left;
49
+ font-weight:normal;
50
+ }
51
+ p {
52
+ margin: 0;
53
+ font-size: 11px;
54
+ float: right;
55
+ line-height: 1.8em;
56
+ a {color:#0047B3;}
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,35 @@
1
+ #sidebar {
2
+ width: 215px;
3
+ float: left;
4
+ }
5
+
6
+ ul#nav{
7
+ margin-top: 12px;
8
+ margin-left: -6px;
9
+ list-style: none;
10
+ li{
11
+ display: list-item;
12
+ span {
13
+ color: #999;
14
+ padding-left: 5px;
15
+ font-size: 10px;
16
+ float: right;
17
+ }
18
+ a {
19
+ display: block;
20
+ overflow: hidden;
21
+ padding: 0 6px 0 40px;
22
+ text-decoration: none;
23
+ line-height: 28px;
24
+ font-size: 13px;
25
+ color: #555;
26
+ text-shadow: 0px 1px 1px white;
27
+ }
28
+ &.active a {
29
+ font-weight: bold;
30
+ color: black;
31
+ background-color: #e5e3de;
32
+ border-radius: 4px 0 0 4px;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,16 @@
1
+ .filter {
2
+ border-collapse:collapse; margin-bottom:10px; width:auto;
3
+ td {padding:0 10px 0 0; vertical-align:bottom; width:auto; border-bottom:0;}
4
+ label {font-size:11px; font-weight:normal;}
5
+ input {font-size:12px;}
6
+ input[type='submit'] {padding-top:0; padding-bottom:0;}
7
+ select optgroup option {margin-left:20px;}
8
+ .view {
9
+ position:relative; width:49px; height:19px; background:url(admin/view.png) no-repeat 0 0;
10
+ a {position:absolute; top:0; height:25px; width:23px;}
11
+ .view1, &.act_photo .view2 {background:url(admin/view_mk.png) no-repeat 50% 100%;}
12
+ &.act_photo .view1 {background:none;}
13
+ .view1 {left:0;}
14
+ .view2 {right:0;}
15
+ }
16
+ }
@@ -0,0 +1,59 @@
1
+ .order-sh {
2
+ font-family:Tahoma; position:relative; z-index:0;
3
+ .order-name {
4
+ position:relative;
5
+ a.print { padding:0 0 0 21px; position:absolute; right:0; bottom:6px; background:image-url("admin/print.png") no-repeat 0 0; display:block;}
6
+ }
7
+ h2 {font-size:16px; text-transform:uppercase; border-bottom:1px solid #d9e6ed; padding:0 0 5px;}
8
+ h3 {color:#025984; font-size:12px; margin:10px 0 10px;}
9
+ .contact-data {
10
+ th, td {border:none; padding-top:1px; padding-bottom:1px;}
11
+ th {color:#636363; font-weight:normal;}
12
+ td.phone {font-weight:bold;}
13
+ }
14
+ .total-sum {
15
+ margin-top:20px;
16
+ text-align:right; font-size:16px; color:#025984;
17
+ strong {color:#000;}
18
+ }
19
+ .order-list {
20
+ thead {
21
+ td {background:#e5e3de; border-color:#e5e3de; color:#1e1e1e; font-size:10px; border-top-width:8px;}
22
+ .last {text-align:center;}
23
+ td.sep {width:1px; padding:0;}
24
+ }
25
+ td {vertical-align:middle; border-style:solid; border-width:0 0; }
26
+ td.first {width:1px; padding-left:10px; padding-right:10px; text-align:right;}
27
+ td.img {width:1px; padding-right:20px;}
28
+ img {border:1px solid #cdcdcc; vertical-align:top;}
29
+ tbody {
30
+ td {color:#636363; padding:0; border-width:8px 0;}
31
+ tr.line-0 td {padding-top:0; border-top-width:0;}
32
+ .odd td {background:#f7f7f5; border-color:#f7f7f5;}
33
+ .even td {background:#e5e3de; border-color:#e5e3de;}
34
+ .sep {width:1px; font-size:0px; padding:0; border-width:8px 2px;}
35
+ td.last {text-align:center; background-size:1px 100%; background-repeat:no-repeat !important; font-weight:bold;}
36
+ td.big-size {font-size:18px; color:#393838;}
37
+ td.desc a {color:#1e1e1e; font-weight:bold;}
38
+ .even td.sep {
39
+ background:#c3c1bd;
40
+ background-image:-moz-linear-gradient(top, #e5e3de 10%, #c3c1bd 10%, #c3c1bd 90%, #e5e3de 90%);
41
+ background-image:-webkit-linear-gradient(top, #e5e3de 10%, #c3c1bd 10%, #c3c1bd 90%, #e5e3de 90%);
42
+ background-image:-o-linear-gradient(top, #e5e3de 10%, #c3c1bd 10%, #c3c1bd 90%, #e5e3de 90%);
43
+ -pie-background:linear-gradient(top, #e5e3de 10%, #c3c1bd 10%, #c3c1bd 90%, #e5e3de 90%);
44
+ behavior:url("/PIE.htc");
45
+ }
46
+ .odd td.sep {
47
+ background:#c3c1bd;
48
+ background-image:-moz-linear-gradient(top, #f7f5f5 10%, #c3c1bd 10%, #c3c1bd 90%, #f7f5f5 90%);
49
+ background-image:-webkit-linear-gradient(top, #f7f5f5 10%, #c3c1bd 10%, #c3c1bd 90%, #f7f5f5 90%);
50
+ background-image:-o-linear-gradient(top, #f7f5f5 10%, #c3c1bd 10%, #c3c1bd 90%, #f7f5f5 90%);
51
+ -pie-background:linear-gradient(top, #f7f5f5 10%, #c3c1bd 10%, #c3c1bd 90%, #f7f5f5 90%);
52
+ behavior:url("/PIE.htc");
53
+ }
54
+ .spacer td {background:#fff; font-size:5px; line-height:5px; border-bottom:none; border-top:none;}
55
+ .even + .spacer td {background:#fff; border-color:#e5e3de #fff #f7f7f5;}
56
+ .odd + .spacer td {background:#fff; border-color:#f7f7f5 #fff #e5e3de;}
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,43 @@
1
+ table.pe {
2
+ width:auto; border-collapse:collapse;
3
+ .col-a, .col-b, .col-c {width:1%;}
4
+ .col-h { width:1%;}
5
+ a:hover {color:#737300;}
6
+ tr.selected td {background:#CCFFCC;}
7
+ tr:hover td {background:#ffc;}
8
+ td {vertical-align:middle; width:auto; padding:0 5px 0 0;}
9
+ th {font-size:13px; padding:0; font-weight:normal; background:#ededed; padding-left:5px;}
10
+ th.handle {background:none;}
11
+ .handle {border-bottom-color:#fff;}
12
+ td * {vertical-align:middle;}
13
+ td.ch-box {padding-left:5px; padding-right:12px;}
14
+ td.show {
15
+ a {border-radius:10px; border:1px solid transparent; display:inline-block; width:20px; height:20px; background:image-url("admin/icon_eye.gif") no-repeat 1px 1px;}
16
+ a.not-show {opacity:0.4; filter:progid:DXImageTransform.Microsoft.Alpha(opacity=40);}
17
+ }
18
+ a.new, a.sale {
19
+ display:inline-block; width:50px;
20
+ -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; text-align:center; color:#fff;
21
+ }
22
+ a.new:hover, a.sale:hover {opacity:0.8;}
23
+ a.new.active {
24
+ background-color: #005782;
25
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#1A719C), to(#005782));
26
+ background-image: -moz-linear-gradient(center top, #1A719C 0%, #005782 100% );
27
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1A719C', endColorstr='#005782');
28
+ }
29
+ a.sale.active {
30
+ background-color: #730707;
31
+ background-image: -webkit-gradient(linear, left top, left bottom, from(#f00), to(#730707));
32
+ background-image: -moz-linear-gradient(center top, #f00 0%, #730707 100% );
33
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f00', endColorstr='#730707');
34
+ }
35
+ a.sale, a.new {background:#ccc;}
36
+ .wr_img {
37
+ width:41px; height:41px; position:relative;
38
+ img {width:41px; height:41px; position:absolute; display:block;}
39
+ img:hover {width:72px; height:72px; z-index:10; border:1px solid #D7D7D7; top:-15px; left:-15px;}
40
+ }
41
+ .green {color:green; font-weight:bold; text-shadow:0 0 10px green; }
42
+ .red {color:red; font-weight:bold; text-shadow:0 0 10px red; }
43
+ }
@@ -0,0 +1,12 @@
1
+ @charset "UTF-8";
2
+
3
+ @import
4
+ "compass",
5
+ "admin/reset",
6
+ "admin/default",
7
+ "admin/layouts/*",
8
+ "admin/blocks/*",
9
+ "admin/redactor/css/redactor",
10
+ "admin/uploadify/uploadify",
11
+ "admin/uploadifive/uploadifive",
12
+ "admin/lightbox/css/jquery.lightbox-0.5";
@@ -0,0 +1,6 @@
1
+ #coding: utf-8
2
+
3
+ class Admin::BaseController < ActionController::Base
4
+ layout 'admin'
5
+ before_filter :authenticate_manager!
6
+ end
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ module AdminHelper
3
+ def act_menu(cond)
4
+ cond ? 'active' : nil
5
+ end
6
+
7
+ def sortable(url)
8
+ html = %Q{
9
+ <script type="text/javascript">
10
+ $(document).ready(function() {
11
+ $("table.sortable").each(function(){
12
+ var self = $(this);
13
+ self.sortable({
14
+ dropOnEmpty: false,
15
+ cursor: 'crosshair',
16
+ opacity: 0.75,
17
+ handle: '.handle',
18
+ axis: 'y',
19
+ items: 'tr',
20
+ scroll: true,
21
+ update: function() {
22
+ $.ajax({
23
+ type: 'post',
24
+ data: self.sortable('serialize') + '&authenticity_token=#{u(form_authenticity_token)}',
25
+ dataType: 'script',
26
+ url: '#{url}'
27
+ })
28
+ }
29
+ });
30
+ });
31
+ });
32
+ </script>
33
+ }.gsub(/[\n ]+/, ' ').strip.html_safe
34
+ return content_for(:js,html)
35
+ end
36
+
37
+ end
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ %html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en"}
3
+ %head
4
+ %title= @page_title || "Без Заголовка"
5
+ = stylesheet_link_tag "admin"
6
+ = javascript_include_tag "admin"
7
+ =# include_imperavi_stylesheet
8
+ =# include_imperavi_javascript
9
+ = yield :js
10
+ = csrf_meta_tag
11
+ %body
12
+ =render "admin/shared/launchbar"
13
+ =render "admin/shared/header"
14
+ #wrapper
15
+ #sidebar
16
+ =render "admin/shared/sidebar"
17
+ #main
18
+ #page-header
19
+ = yield(:page_header)
20
+ - if notice
21
+ .notice= notice
22
+ - if alert
23
+ .alert= alert
24
+ #page{:class => "#{yield(:page_sidebar).empty? ? 'full' : 'sidebar'}"}
25
+ #filter
26
+ = yield(:filter)
27
+ #page_sidebar
28
+ = yield(:page_sidebar)
29
+ #content
30
+ = yield
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ %html.login{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en"}
3
+ %head
4
+ %meta{"http-equiv" => "Content-Type", :content => "text/html;charset=UTF-8"}
5
+ %title= ("Вход на сайт")+" | Административная панель"
6
+ = stylesheet_link_tag 'admin'
7
+ = javascript_include_tag "admin"
8
+ = csrf_meta_tag
9
+ %body
10
+ %table.login
11
+ %tr.login
12
+ %td.login
13
+ #main
14
+ #page-header
15
+ %h1 Административная панель
16
+ #page
17
+ #content
18
+ = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
19
+ .fields
20
+ = f.label :email, "E-mail"
21
+ %br
22
+ = f.text_field :email
23
+ .fields
24
+ = f.label :password, "Пароль"
25
+ %br
26
+ = f.password_field :password, :size => 35
27
+ .actions
28
+ - if devise_mapping.rememberable?
29
+ = f.check_box :remember_me
30
+ = f.label :remember_me, "Оставаться в системе"
31
+ %br
32
+ = f.submit "Войти"
@@ -0,0 +1,13 @@
1
+ #header
2
+ #header_wrapper
3
+ #links
4
+ - if current_manager
5
+ = link_to current_manager.email, "#"
6
+ = link_to "Выход", destroy_manager_session_path, :method => :delete
7
+ #center
8
+ = link_to "<%= app_name %>", root_path, :target => :_blank
9
+ #app_logo
10
+ = link_to admin_root_path || "/admin" do
11
+ REDDESHOP
12
+ %br
13
+ %span e-commerce platform
@@ -0,0 +1,9 @@
1
+ - @active = :shop if (["products", "categories", "brands", "orders", "countries", "regions", "sliders"].include? controller.controller_name) && params[:slider_block] != "2"
2
+ - @active = :materials if (["articles", "categories", "works"].include? controller.controller_name) || params[:slider_block] == "2"
3
+ - @active = :system if ["users"].include? controller.controller_name
4
+ #launchbar
5
+ %ul.menus
6
+ %li{:class => "#{'active' if @active == :materials}"}= link_to "Материалы"
7
+ %li{:class => "#{'active' if @active == :shop}"}= link_to "Обратная связь"
8
+ %li{:class => "#{'active' if @active == :system}"}= link_to "Система"
9
+ %li.fr= Russian.strftime(Time.now,"%d %b, %Y %H:%M ")