Commit eb38a9dc6c320066c4f0e7751705f0536699dc38
1 parent
a6a1b0d6
Exists in
master
and in
29 other branches
ActionItem7: better comatose integration
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@288 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
6 changed files
with
336 additions
and
1 deletions
Show diff stats
app/views/layouts/application.rhtml
| ... | ... | @@ -2,6 +2,8 @@ |
| 2 | 2 | <head> |
| 3 | 3 | <%= javascript_include_tag :defaults %> |
| 4 | 4 | <%= design_all_header_tags %> |
| 5 | + <%= stylesheet_link_tag 'comatose_admin' %> | |
| 6 | + <%= javascript_include_tag 'comatose_admin' %> | |
| 5 | 7 | |
| 6 | 8 | </head> |
| 7 | 9 | |
| ... | ... | @@ -25,7 +27,9 @@ |
| 25 | 27 | <%= flash[:notice] %> |
| 26 | 28 | </div> |
| 27 | 29 | <a name='main_content'/></a> |
| 28 | - <%= design_display(yield) %> | |
| 30 | + <div id='content'> | |
| 31 | + <%= design_display(yield) %> | |
| 32 | + </div> | |
| 29 | 33 | |
| 30 | 34 | <div id="footer"> |
| 31 | 35 | <a name='footer'/></a> | ... | ... |
config/environment.rb
| ... | ... | @@ -63,4 +63,19 @@ Comatose.configure do |config| |
| 63 | 63 | Profile.exists?(:identifier => request.parameters[:profile]) |
| 64 | 64 | # FIXME: also check permissions |
| 65 | 65 | end |
| 66 | + config.admin_includes << :authenticated_system | |
| 67 | + config.admin_helpers << :application_helper | |
| 68 | +end | |
| 69 | +Comatose::AdminController.design :holder => 'virtual_community' | |
| 70 | +Comatose::AdminController.before_filter do |controller| | |
| 71 | + # TODO: copy/paste; extract this into a method (see | |
| 72 | + # app/controllers/application.rb) | |
| 73 | + domain = Domain.find_by_name(controller.request.host) | |
| 74 | + if domain.nil? | |
| 75 | + virtual_community = VirtualCommunity.default | |
| 76 | + else | |
| 77 | + virtual_community = domain.virtual_community | |
| 78 | + profile = domain.profile | |
| 79 | + end | |
| 80 | + controller.instance_variable_set('@virtual_community', virtual_community) | |
| 66 | 81 | end | ... | ... |
| ... | ... | @@ -0,0 +1,313 @@ |
| 1 | + | |
| 2 | +/* Page Listing */ | |
| 3 | +#content .tree-controller { | |
| 4 | + border: 0px; | |
| 5 | + cursor: pointer; | |
| 6 | +} | |
| 7 | +#content .page-list.root { | |
| 8 | + clear: both; | |
| 9 | + list-style: none; | |
| 10 | + margin: 0px; | |
| 11 | + padding: 0px; | |
| 12 | + margin-top: 10px; | |
| 13 | +} | |
| 14 | +#content .page-list.collapsed { | |
| 15 | + display: none; | |
| 16 | +} | |
| 17 | +#content .page-list { | |
| 18 | + /* background: white; */ | |
| 19 | + clear: both; | |
| 20 | + list-style: none; | |
| 21 | + border-left: none; | |
| 22 | + margin: 0px; | |
| 23 | + padding: 0px; | |
| 24 | + padding-left: 15px; | |
| 25 | + margin-top: 2px; | |
| 26 | +} | |
| 27 | +#content .page-list LI { | |
| 28 | + clear: both; | |
| 29 | + padding: 0px; | |
| 30 | + margin: 5px 0px; | |
| 31 | + padding-top: 2px; | |
| 32 | + padding-right: 0px; | |
| 33 | + padding-left: 2px; | |
| 34 | +} | |
| 35 | +#content .page-list .commands { | |
| 36 | + font-size: 90%; | |
| 37 | + padding-left: 5px; | |
| 38 | +} | |
| 39 | +#content .page-list .commands A { | |
| 40 | + /* color: gray; */ | |
| 41 | +} | |
| 42 | +#content .page-list .commands A.add-page:hover { | |
| 43 | + /* color: blue; */ | |
| 44 | +} | |
| 45 | +#content .page-list .commands A.reorder-children:hover { | |
| 46 | +/* color: black; */ | |
| 47 | +} | |
| 48 | +#content .page-list .commands A.delete-page:hover { | |
| 49 | +/* color: white; */ | |
| 50 | +} | |
| 51 | +#content .page-list .commands A.reordering { | |
| 52 | +/* background: navy; */ | |
| 53 | +/* color: white; */ | |
| 54 | +} | |
| 55 | +#content .page-list .commands A.reordering:hover { | |
| 56 | +/* color: white; */ | |
| 57 | +} | |
| 58 | +#content .page-list A.page { | |
| 59 | + text-decoration: none; | |
| 60 | +/* color: black; */ | |
| 61 | + margin-left: 3px; | |
| 62 | + font-size: 150%; | |
| 63 | + display: block; | |
| 64 | +} | |
| 65 | +#content .page-list A.page:hover { | |
| 66 | + /*color: blue;*/ | |
| 67 | + background: white url(../images/comatose/title-hover-bg.gif) top left repeat-y; | |
| 68 | +} | |
| 69 | +#content .handle, #content .do-reorder UL LI .handle { | |
| 70 | + display: none; | |
| 71 | +} | |
| 72 | + | |
| 73 | +#content .page-list .hover { | |
| 74 | +/* /* background: #F1F0DB; */ */ | |
| 75 | +} | |
| 76 | +#content .page-list .hover-delete { | |
| 77 | + background: red; | |
| 78 | +/* color: #FF8E90; */ | |
| 79 | +} | |
| 80 | +#content .page-list .hover-delete A, | |
| 81 | +#content .page-list .hover-delete .commands A { | |
| 82 | +/* color: #FF8E90; */ | |
| 83 | +} | |
| 84 | +#content .page-list .hover-delete A.page { | |
| 85 | +/* color: white; */ | |
| 86 | + border-bottom: 0px; | |
| 87 | +} | |
| 88 | +#content .page-list .hover-delete UL LI A.page { | |
| 89 | +/* color: red; */ | |
| 90 | + border-bottom: 0px; | |
| 91 | +} | |
| 92 | + | |
| 93 | +#content .do-reorder LI .handle { | |
| 94 | + display: inline; | |
| 95 | +/* background: gray; */ | |
| 96 | +/* color: white; */ | |
| 97 | + padding: 1px 3px; | |
| 98 | + cursor: move; | |
| 99 | +} | |
| 100 | + | |
| 101 | +#content .page-list .do-reorder .commands A { | |
| 102 | + display: none; | |
| 103 | +} | |
| 104 | + | |
| 105 | +/* Page Form */ | |
| 106 | +#content .page-form { | |
| 107 | + margin-top: 10px; | |
| 108 | +} | |
| 109 | +#content .page-form LABEL { | |
| 110 | + font-weight: bold; | |
| 111 | +/* color: #555; */ | |
| 112 | +} | |
| 113 | +#content .page-form .meta-info LABEL { | |
| 114 | +/* color: #999 !important; */ | |
| 115 | +} | |
| 116 | +#content .page-form .label { | |
| 117 | + padding-top: 5px; | |
| 118 | + width: 75px; | |
| 119 | + text-align: right; | |
| 120 | + padding-right: 10px; | |
| 121 | +} | |
| 122 | +#content .page-form .label.body { | |
| 123 | + vertical-align: top; | |
| 124 | + padding-top: 10px; | |
| 125 | +} | |
| 126 | +#content .page-form .field { | |
| 127 | + padding-top: 5px; | |
| 128 | +} | |
| 129 | +#content .page-form .field-help { | |
| 130 | +/* color: gray; */ | |
| 131 | +} | |
| 132 | +#content .page-form #page_title { | |
| 133 | + font-size: 125%; | |
| 134 | + font-weight: bold; | |
| 135 | +} | |
| 136 | +#content .page-form #page_slug { | |
| 137 | +/* color: gray; */ | |
| 138 | +} | |
| 139 | +#content .page-form #page_body { | |
| 140 | + font-family: monospace; | |
| 141 | + font-size: 110%; | |
| 142 | +} | |
| 143 | + | |
| 144 | +#content #button-group { | |
| 145 | + padding: 10px; | |
| 146 | + text-align: right; | |
| 147 | +/* background-color: #EAEAEA; */ | |
| 148 | + margin-top: 10px; | |
| 149 | +} | |
| 150 | +#content #button-group .last-update { | |
| 151 | + float: left; | |
| 152 | +/* color: gray; */ | |
| 153 | + padding-top: 4px; | |
| 154 | + font-weight: bold; | |
| 155 | +} | |
| 156 | +#content #button-group .last-update LABEL { | |
| 157 | + font-weight: normal; | |
| 158 | +} | |
| 159 | +#content #button-group .last-update A { | |
| 160 | +/* color: gray; */ | |
| 161 | +} | |
| 162 | +#content #button-group A { | |
| 163 | +/* color: maroon; */ | |
| 164 | +} | |
| 165 | +#content #button-group A:hover { | |
| 166 | +/* color: red; */ | |
| 167 | +} | |
| 168 | + | |
| 169 | +#content #preview-area { | |
| 170 | + margin-top: 10px; | |
| 171 | +} | |
| 172 | +#content #preview-area FIELDSET { | |
| 173 | +/* border: 1px solid silver; */ | |
| 174 | +} | |
| 175 | +#content #preview-area LEGEND { | |
| 176 | + font-size: 125%; | |
| 177 | +} | |
| 178 | +#content #preview-area .preview-body { | |
| 179 | + padding: 10px; | |
| 180 | +} | |
| 181 | +#content #preview-area .preview-note { | |
| 182 | +/* background: #FFFFD9; */ | |
| 183 | + padding: 15px; | |
| 184 | +} | |
| 185 | +#content #preview-area .commands { | |
| 186 | + text-align: right; | |
| 187 | +/* color: gray; */ | |
| 188 | +} | |
| 189 | +#content #preview-area .commands A { | |
| 190 | +/* color: gray; */ | |
| 191 | +} | |
| 192 | +#content #preview-area .commands A:hover { | |
| 193 | +/* color: black; */ | |
| 194 | +} | |
| 195 | +#content .revisions { | |
| 196 | + padding: 10px; | |
| 197 | + width: 49%; | |
| 198 | +} | |
| 199 | +#content .current-content { | |
| 200 | +} | |
| 201 | +#content .older-content { | |
| 202 | +/* background: #E9E9E9; */ | |
| 203 | + float: right; | |
| 204 | +} | |
| 205 | + | |
| 206 | +#content .revisions label { | |
| 207 | + display: block; | |
| 208 | +/* color: #000; */ | |
| 209 | +} | |
| 210 | +#content .revisions label span { | |
| 211 | +/* color: #999; */ | |
| 212 | + font-weight: normal !important; | |
| 213 | +} | |
| 214 | +#content .revisions .title { | |
| 215 | + font-weight: bold; | |
| 216 | + margin-top: 5px; | |
| 217 | +} | |
| 218 | +#content .revisions .header { | |
| 219 | + font-size: 110%; | |
| 220 | + vertical-align: middle; | |
| 221 | + font-weight: bold; | |
| 222 | +} | |
| 223 | +#content .revisions .header-actions { | |
| 224 | + float: right; | |
| 225 | + font-size: 90%; | |
| 226 | + font-weight: normal; | |
| 227 | +/* color: #999; */ | |
| 228 | +} | |
| 229 | +#content .revisions .meta { | |
| 230 | + margin-bottom: 15px; | |
| 231 | +} | |
| 232 | +#content .revisions .footer { | |
| 233 | + margin-top: 25px !important; | |
| 234 | + text-align: center !important; | |
| 235 | +} | |
| 236 | +#content #go-btn { | |
| 237 | + display: none; | |
| 238 | +} | |
| 239 | +/* Errors */ | |
| 240 | +#errorExplanation { | |
| 241 | + border: 1px solid red; | |
| 242 | +/* background: #FFEAEB; */ | |
| 243 | + padding: 10px; | |
| 244 | + margin-top: 10px; | |
| 245 | +} | |
| 246 | +#errorExplanation h2 { | |
| 247 | + margin: 0px; | |
| 248 | + padding: 0px; | |
| 249 | +/* color: maroon; */ | |
| 250 | +} | |
| 251 | +#errorExplanation p { | |
| 252 | + margin: 0px; | |
| 253 | + padding: 0px; | |
| 254 | + padding-top: 5px; | |
| 255 | + padding-left: 15px; | |
| 256 | +} | |
| 257 | +#errorExplanation ul { | |
| 258 | + margin: 0px; | |
| 259 | + padding: 0px; | |
| 260 | + padding-left: 35px; | |
| 261 | +} | |
| 262 | +#errorExplanation li { | |
| 263 | + margin: 0px; | |
| 264 | + padding: 0px; | |
| 265 | + padding-top: 5px; | |
| 266 | +} | |
| 267 | + | |
| 268 | +/* Footer Area*/ | |
| 269 | +/* | |
| 270 | +#footer { | |
| 271 | + border-top: 4px solid #AAA; | |
| 272 | + text-align: center; | |
| 273 | + font-size: 90%; | |
| 274 | + color: #AAA; | |
| 275 | + padding-top: 5px; | |
| 276 | + padding-bottom: 5px; | |
| 277 | +} | |
| 278 | +#footer A { | |
| 279 | + color: #AAA; | |
| 280 | + text-decoration: none; | |
| 281 | + font-weight: bold; | |
| 282 | +} | |
| 283 | +#footer A:hover { | |
| 284 | + color: #333; | |
| 285 | + text-decoration: underline; | |
| 286 | +} | |
| 287 | +*/ | |
| 288 | + | |
| 289 | +/* Modifiers */ | |
| 290 | + | |
| 291 | +/* When JavaScript is Turned Off... We need to adjust some things... */ | |
| 292 | +.noscript #more-options, | |
| 293 | +.noscript #preview-area, | |
| 294 | +.noscript #preview-btn, | |
| 295 | +.noscript .tree-controller { | |
| 296 | + display: none; | |
| 297 | +} | |
| 298 | +.noscript .page-list.collapsed { | |
| 299 | + display: block !important; | |
| 300 | +} | |
| 301 | +.noscript .delete-page:hover { | |
| 302 | + color: red !important; | |
| 303 | +} | |
| 304 | +.noscript #content .page-form #page_title, | |
| 305 | +.noscript #content .page-form #page_slug, | |
| 306 | +.noscript #content .page-form #page_parent, | |
| 307 | +.noscript #content .page-form #page_keywords, | |
| 308 | +.noscript #content .page-form #page_body { | |
| 309 | + width: 100% !important; | |
| 310 | +} | |
| 311 | +.noscript #content .revisions #go-btn { | |
| 312 | + display: inline; | |
| 313 | +} | ... | ... |