diff --git a/app/views/cms/_form.rhtml b/app/views/cms/_form.rhtml index a7fff3a..71c54a4 100644 --- a/app/views/cms/_form.rhtml +++ b/app/views/cms/_form.rhtml @@ -1,3 +1,6 @@ + +<%= javascript_include_tag 'cms' %> + <%= error_messages_for :page %> <% form_for :page, @page do |f| %> diff --git a/app/views/cms/edit.rhtml b/app/views/cms/edit.rhtml index 6b2f158..400a718 100644 --- a/app/views/cms/edit.rhtml +++ b/app/views/cms/edit.rhtml @@ -1,3 +1,21 @@ + <%= javascript_include_tag 'tiny_mce/tiny_mce.js' %> + <%= javascript_include_tag 'noosfero_tiny_mce.js' %> + + + +

<%= _("Edit Page") %>

diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 456a77c..ebbe7b3 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -2,50 +2,12 @@ - <%= javascript_include_tag 'prototype' %> - <%# javascript_include_tag 'sweetTitles' %> - <%= javascript_include_tag 'tiny_mce/tiny_mce.js' %> - <%# javascript_include_tag 'scriptaculous' %> - <%= javascript_include_tag 'dragdrop' %> - <%= javascript_include_tag 'effects' %> - <%= javascript_include_tag 'noosfero_tiny_mce.js' %> - - <%= design_all_header_tags %> - <%= javascript_include_tag 'cms' %> - <% if params[:controller] == 'cms' %> - <%= stylesheet_link_tag 'cms' %> - <% end %> <%= stylesheet_link_tag 'common' %> - - <%= stylesheet_link_tag 'menu' %> <%= stylesheet_link_tag 'help' %> - + <%= stylesheet_link_tag 'menu' %> <%= javascript_include_tag 'menu' %> - + <%= javascript_include_tag 'search_box' %> diff --git a/public/designs/templates/default/stylesheets/cms.css b/public/designs/templates/default/stylesheets/cms.css new file mode 100644 index 0000000..abb8b70 --- /dev/null +++ b/public/designs/templates/default/stylesheets/cms.css @@ -0,0 +1,128 @@ + +/************************************ + * listing stuff + ************************************/ +#content .handle, #content .do-reorder UL LI .handle { + display: none; +} +#content .do-reorder LI .handle { + display: inline; + background: gray; + color: white; + padding: 1px 3px; + cursor: move; +} + +ul.page-list li { + list-style: none; +} + +ul.page-list li table, +ul.page-list li td { + border: none; + padding: 3px; +} + +ul.page-list a.page { + font-weight: bold; +} + +ul.page-list a:visited, ul.page-list a:link { + color: #000; +} + +ul.page-list a:hover { + background: #aa9; +} + +#content .page-list .hover { + background: #F1F0DB; +} + +#content .page-list .commands A.delete-page:hover { + color: white; + background: black; +} +#content .page-list .hover-delete { + background: red; + color: #FF8E90; +} +#content .page-list .hover-delete A, +#content .page-list .hover-delete .commands A { + color: #FF8E90; +} +#content .page-list .hover-delete A.page { + color: white; + border-bottom: 0px; +} +#content .page-list .hover-delete UL LI A.page { + color: red; + border-bottom: 0px; +} + +/*********************************** + * from stuff + ***********************************/ +div.comatose_field { +} +div.comatose_field label { + display: block; + font-weight: bold; +} + +div.comatose_field textarea { + width: 90%; +} +div.comatose_field textarea, +div.comatose_field input, +div.comatose_field select { + border: 1px solid gray; +} + +/**************************************** + * revisions page stuff + ****************************************/ + +.older-content { + float: right; +} +.current-content { + float: left; +} + +.revisions { + width: 47%; + border: 1px solid gray; + padding: 0.25em; +} + +.revisions .header { + font-weight: bold; + border-bottom: 1px solid black; + margin-bottom: 10px; + height: 40px; +} + +.revisions .meta { + border-bottom: 1px solid black; + margin-bottom: 10px; +} + +.revisions .footer { + border-top: 1px solid black; + margin-top: 10px; + padding: 0.25em; +} + +.revisions .meta label span { + font-weight: bold; +} + +.revisions .meta label { + font-weight: normal; + display: block; +} + +.collapsed { + display: none; +} diff --git a/public/designs/templates/leftbar/stylesheets/cms.css b/public/designs/templates/leftbar/stylesheets/cms.css new file mode 100644 index 0000000..abb8b70 --- /dev/null +++ b/public/designs/templates/leftbar/stylesheets/cms.css @@ -0,0 +1,128 @@ + +/************************************ + * listing stuff + ************************************/ +#content .handle, #content .do-reorder UL LI .handle { + display: none; +} +#content .do-reorder LI .handle { + display: inline; + background: gray; + color: white; + padding: 1px 3px; + cursor: move; +} + +ul.page-list li { + list-style: none; +} + +ul.page-list li table, +ul.page-list li td { + border: none; + padding: 3px; +} + +ul.page-list a.page { + font-weight: bold; +} + +ul.page-list a:visited, ul.page-list a:link { + color: #000; +} + +ul.page-list a:hover { + background: #aa9; +} + +#content .page-list .hover { + background: #F1F0DB; +} + +#content .page-list .commands A.delete-page:hover { + color: white; + background: black; +} +#content .page-list .hover-delete { + background: red; + color: #FF8E90; +} +#content .page-list .hover-delete A, +#content .page-list .hover-delete .commands A { + color: #FF8E90; +} +#content .page-list .hover-delete A.page { + color: white; + border-bottom: 0px; +} +#content .page-list .hover-delete UL LI A.page { + color: red; + border-bottom: 0px; +} + +/*********************************** + * from stuff + ***********************************/ +div.comatose_field { +} +div.comatose_field label { + display: block; + font-weight: bold; +} + +div.comatose_field textarea { + width: 90%; +} +div.comatose_field textarea, +div.comatose_field input, +div.comatose_field select { + border: 1px solid gray; +} + +/**************************************** + * revisions page stuff + ****************************************/ + +.older-content { + float: right; +} +.current-content { + float: left; +} + +.revisions { + width: 47%; + border: 1px solid gray; + padding: 0.25em; +} + +.revisions .header { + font-weight: bold; + border-bottom: 1px solid black; + margin-bottom: 10px; + height: 40px; +} + +.revisions .meta { + border-bottom: 1px solid black; + margin-bottom: 10px; +} + +.revisions .footer { + border-top: 1px solid black; + margin-top: 10px; + padding: 0.25em; +} + +.revisions .meta label span { + font-weight: bold; +} + +.revisions .meta label { + font-weight: normal; + display: block; +} + +.collapsed { + display: none; +} diff --git a/public/designs/templates/onecolumn/stylesheets/cms.css b/public/designs/templates/onecolumn/stylesheets/cms.css new file mode 100644 index 0000000..abb8b70 --- /dev/null +++ b/public/designs/templates/onecolumn/stylesheets/cms.css @@ -0,0 +1,128 @@ + +/************************************ + * listing stuff + ************************************/ +#content .handle, #content .do-reorder UL LI .handle { + display: none; +} +#content .do-reorder LI .handle { + display: inline; + background: gray; + color: white; + padding: 1px 3px; + cursor: move; +} + +ul.page-list li { + list-style: none; +} + +ul.page-list li table, +ul.page-list li td { + border: none; + padding: 3px; +} + +ul.page-list a.page { + font-weight: bold; +} + +ul.page-list a:visited, ul.page-list a:link { + color: #000; +} + +ul.page-list a:hover { + background: #aa9; +} + +#content .page-list .hover { + background: #F1F0DB; +} + +#content .page-list .commands A.delete-page:hover { + color: white; + background: black; +} +#content .page-list .hover-delete { + background: red; + color: #FF8E90; +} +#content .page-list .hover-delete A, +#content .page-list .hover-delete .commands A { + color: #FF8E90; +} +#content .page-list .hover-delete A.page { + color: white; + border-bottom: 0px; +} +#content .page-list .hover-delete UL LI A.page { + color: red; + border-bottom: 0px; +} + +/*********************************** + * from stuff + ***********************************/ +div.comatose_field { +} +div.comatose_field label { + display: block; + font-weight: bold; +} + +div.comatose_field textarea { + width: 90%; +} +div.comatose_field textarea, +div.comatose_field input, +div.comatose_field select { + border: 1px solid gray; +} + +/**************************************** + * revisions page stuff + ****************************************/ + +.older-content { + float: right; +} +.current-content { + float: left; +} + +.revisions { + width: 47%; + border: 1px solid gray; + padding: 0.25em; +} + +.revisions .header { + font-weight: bold; + border-bottom: 1px solid black; + margin-bottom: 10px; + height: 40px; +} + +.revisions .meta { + border-bottom: 1px solid black; + margin-bottom: 10px; +} + +.revisions .footer { + border-top: 1px solid black; + margin-top: 10px; + padding: 0.25em; +} + +.revisions .meta label span { + font-weight: bold; +} + +.revisions .meta label { + font-weight: normal; + display: block; +} + +.collapsed { + display: none; +} diff --git a/public/designs/themes/default/default.css b/public/designs/themes/default/default.css deleted file mode 100644 index 7c47962..0000000 --- a/public/designs/themes/default/default.css +++ /dev/null @@ -1,90 +0,0 @@ -/* Default Plain Theme for Blocks */ - -div.block -{ - background: #FFFFFF; - border: 3px solid #000000; - margin-bottom: 10px; -} - -div.block ul -{ - list-style: none; - margin-left: 15px; -} - -div.block h3 -{ - color: #FFFFFF; - background: #545454; - font-family: Sans-serif; - font-size: 13px; - font-weight: normal; - border-bottom: 1px solid black; - height: 27px; - margin: 0px; - line-height: 27px; - padding-left: 10px; -} - -div.block span { -display: none; -} - -div.block a.button_block_hide:hover span { -display: inline; -position: absolute; -color: #dfdfdf; -background: #000000; -font-family: Sans-serif; -font-size: 13px; -font-weight: normal; -margin: 10px; -padding-left: 5px; -padding-right: 5px; -} - -div.block a.button_block { -display: block; -width: 10px; -height: 10px; -margin-top: 10px; -margin-right: 5px; -float: right; -} - -div.block a.button_block_hide { -border-bottom: 2px solid #dfdfdf; -} - -div.block a:hover.button_block_hide { -border-bottom: 2px solid #000000; -} - -div.block a.button_block_remove { -background: #dfdfdf; -} - -div.block a:hover.button_block_remove { -background: #000000; -} - -div.block_content -{ - padding: 5px; -} - -div.block ul { - padding-left: 0px; - margin: 0px; -} - -div.block ul li a:link, -div.block ul li a:hover { - display: block; - color: #000; -} -div.block ul li a:hover { - background: #ddd; - color: red; -} diff --git a/public/designs/themes/default/style.css b/public/designs/themes/default/style.css new file mode 100644 index 0000000..7c47962 --- /dev/null +++ b/public/designs/themes/default/style.css @@ -0,0 +1,90 @@ +/* Default Plain Theme for Blocks */ + +div.block +{ + background: #FFFFFF; + border: 3px solid #000000; + margin-bottom: 10px; +} + +div.block ul +{ + list-style: none; + margin-left: 15px; +} + +div.block h3 +{ + color: #FFFFFF; + background: #545454; + font-family: Sans-serif; + font-size: 13px; + font-weight: normal; + border-bottom: 1px solid black; + height: 27px; + margin: 0px; + line-height: 27px; + padding-left: 10px; +} + +div.block span { +display: none; +} + +div.block a.button_block_hide:hover span { +display: inline; +position: absolute; +color: #dfdfdf; +background: #000000; +font-family: Sans-serif; +font-size: 13px; +font-weight: normal; +margin: 10px; +padding-left: 5px; +padding-right: 5px; +} + +div.block a.button_block { +display: block; +width: 10px; +height: 10px; +margin-top: 10px; +margin-right: 5px; +float: right; +} + +div.block a.button_block_hide { +border-bottom: 2px solid #dfdfdf; +} + +div.block a:hover.button_block_hide { +border-bottom: 2px solid #000000; +} + +div.block a.button_block_remove { +background: #dfdfdf; +} + +div.block a:hover.button_block_remove { +background: #000000; +} + +div.block_content +{ + padding: 5px; +} + +div.block ul { + padding-left: 0px; + margin: 0px; +} + +div.block ul li a:link, +div.block ul li a:hover { + display: block; + color: #000; +} +div.block ul li a:hover { + background: #ddd; + color: red; +} diff --git a/public/designs/themes/green/green.css b/public/designs/themes/green/green.css deleted file mode 100644 index a833ce3..0000000 --- a/public/designs/themes/green/green.css +++ /dev/null @@ -1,77 +0,0 @@ -/* Green Theme for Blocks */ - -div.block -{ - background: #FFFFFF; - border: 3px solid #060; - margin-bottom: 10px; -} - -div.block ul -{ - list-style: none; - margin-left: 15px; -} - -div.block h3 -{ - color: #afa; - background: green; - font-family: Sans-serif; - font-size: 13px; - font-weight: normal; - border-bottom: 1px solid black; - height: 27px; - margin: 0px; - line-height: 27px; - padding-left: 10px; -} - -div.block span { -display: none; -} - -div.block a:hover span { -display: inline; -position: absolute; -color: white; -background: #009900; -font-family: Sans-serif; -font-size: 13px; -font-weight: normal; -margin: 10px; -padding-left: 5px; -padding-right: 5px; -} - -div.block a { -display: block; -width: 10px; -height: 10px; -margin-top: 10px; -margin-right: 5px; -float: right; -} - -div.block a.button_block_hide { -border-bottom: 2px solid #dfdfdf; -} - -div.block a:hover.button_block_hide { -border-bottom: 2px solid #000000; -} - -div.block a.button_block_remove { -background: #dfdfdf; -} - -div.block a:hover.button_block_remove { -background: #000000; -} - -div.block_content -{ - padding: 5px; -} - - diff --git a/public/designs/themes/green/style.css b/public/designs/themes/green/style.css new file mode 100644 index 0000000..a833ce3 --- /dev/null +++ b/public/designs/themes/green/style.css @@ -0,0 +1,77 @@ +/* Green Theme for Blocks */ + +div.block +{ + background: #FFFFFF; + border: 3px solid #060; + margin-bottom: 10px; +} + +div.block ul +{ + list-style: none; + margin-left: 15px; +} + +div.block h3 +{ + color: #afa; + background: green; + font-family: Sans-serif; + font-size: 13px; + font-weight: normal; + border-bottom: 1px solid black; + height: 27px; + margin: 0px; + line-height: 27px; + padding-left: 10px; +} + +div.block span { +display: none; +} + +div.block a:hover span { +display: inline; +position: absolute; +color: white; +background: #009900; +font-family: Sans-serif; +font-size: 13px; +font-weight: normal; +margin: 10px; +padding-left: 5px; +padding-right: 5px; +} + +div.block a { +display: block; +width: 10px; +height: 10px; +margin-top: 10px; +margin-right: 5px; +float: right; +} + +div.block a.button_block_hide { +border-bottom: 2px solid #dfdfdf; +} + +div.block a:hover.button_block_hide { +border-bottom: 2px solid #000000; +} + +div.block a.button_block_remove { +background: #dfdfdf; +} + +div.block a:hover.button_block_remove { +background: #000000; +} + +div.block_content +{ + padding: 5px; +} + + diff --git a/public/designs/themes/macstyle/macstyle.css b/public/designs/themes/macstyle/macstyle.css deleted file mode 100644 index 3addc63..0000000 --- a/public/designs/themes/macstyle/macstyle.css +++ /dev/null @@ -1,89 +0,0 @@ -/* MacStyle Theme for Blocks */ - -div.block -{ - background: #FFFFFF; - border: 0px; -} - -div.block ul -{ - list-style: none; - margin-left: 15px; -} - -ul.block_list div.block h3 { - cursor:move; -} - -div.block h3 -{ - background: url('images/h3bg.png') repeat-x; - font-family: Sans-serif; - font-size: 15px; - margin: 0px; - line-height: 25px; - overflow: hidden; - vertical-align: middle; - color: #545454; - padding-left: 10px; - height: 35px; -} - -div.block span { -display: none; -padding: 1px; -color: #000; -background: #dfdfdf; -font-family: Sans-serif; -font-size: 10px; -font-weight: normal; -border: 1px inset #545454; -} - -div.block a:hover span { -display: inline; -position: absolute; -margin-top: -20px; -} - -div.block a { -display: block; -float: right; -position: absolute; -width: 20px; -height: 20px; -text-decoration: none; -} - -div.block a.button_block_hide { -right: 25px; -background:url('images/button.png') no-repeat; -background-position: 0px 0px; -} - -div.block a:hover.button_block_hide { -background: url('images/button.png') no-repeat; -background-position: 0px -20px; -} - -div.block a.button_block_remove { -right: 5px; -background: url('images/button.png') no-repeat; -background-position:-20px 0; -} - -div.block a:hover.button_block_remove { -background: url('images/button.png') no-repeat; -background-position:-20px -20px; -} - -div.block_content -{ - margin: 0; - padding: 5px 10px 9px 10px; - background: url(images/bottom.png) repeat-x 0 100%; - overflow: hidden; -} - - diff --git a/public/designs/themes/macstyle/style.css b/public/designs/themes/macstyle/style.css new file mode 100644 index 0000000..3addc63 --- /dev/null +++ b/public/designs/themes/macstyle/style.css @@ -0,0 +1,89 @@ +/* MacStyle Theme for Blocks */ + +div.block +{ + background: #FFFFFF; + border: 0px; +} + +div.block ul +{ + list-style: none; + margin-left: 15px; +} + +ul.block_list div.block h3 { + cursor:move; +} + +div.block h3 +{ + background: url('images/h3bg.png') repeat-x; + font-family: Sans-serif; + font-size: 15px; + margin: 0px; + line-height: 25px; + overflow: hidden; + vertical-align: middle; + color: #545454; + padding-left: 10px; + height: 35px; +} + +div.block span { +display: none; +padding: 1px; +color: #000; +background: #dfdfdf; +font-family: Sans-serif; +font-size: 10px; +font-weight: normal; +border: 1px inset #545454; +} + +div.block a:hover span { +display: inline; +position: absolute; +margin-top: -20px; +} + +div.block a { +display: block; +float: right; +position: absolute; +width: 20px; +height: 20px; +text-decoration: none; +} + +div.block a.button_block_hide { +right: 25px; +background:url('images/button.png') no-repeat; +background-position: 0px 0px; +} + +div.block a:hover.button_block_hide { +background: url('images/button.png') no-repeat; +background-position: 0px -20px; +} + +div.block a.button_block_remove { +right: 5px; +background: url('images/button.png') no-repeat; +background-position:-20px 0; +} + +div.block a:hover.button_block_remove { +background: url('images/button.png') no-repeat; +background-position:-20px -20px; +} + +div.block_content +{ + margin: 0; + padding: 5px 10px 9px 10px; + background: url(images/bottom.png) repeat-x 0 100%; + overflow: hidden; +} + + diff --git a/public/stylesheets/cms.css b/public/stylesheets/cms.css deleted file mode 100644 index abb8b70..0000000 --- a/public/stylesheets/cms.css +++ /dev/null @@ -1,128 +0,0 @@ - -/************************************ - * listing stuff - ************************************/ -#content .handle, #content .do-reorder UL LI .handle { - display: none; -} -#content .do-reorder LI .handle { - display: inline; - background: gray; - color: white; - padding: 1px 3px; - cursor: move; -} - -ul.page-list li { - list-style: none; -} - -ul.page-list li table, -ul.page-list li td { - border: none; - padding: 3px; -} - -ul.page-list a.page { - font-weight: bold; -} - -ul.page-list a:visited, ul.page-list a:link { - color: #000; -} - -ul.page-list a:hover { - background: #aa9; -} - -#content .page-list .hover { - background: #F1F0DB; -} - -#content .page-list .commands A.delete-page:hover { - color: white; - background: black; -} -#content .page-list .hover-delete { - background: red; - color: #FF8E90; -} -#content .page-list .hover-delete A, -#content .page-list .hover-delete .commands A { - color: #FF8E90; -} -#content .page-list .hover-delete A.page { - color: white; - border-bottom: 0px; -} -#content .page-list .hover-delete UL LI A.page { - color: red; - border-bottom: 0px; -} - -/*********************************** - * from stuff - ***********************************/ -div.comatose_field { -} -div.comatose_field label { - display: block; - font-weight: bold; -} - -div.comatose_field textarea { - width: 90%; -} -div.comatose_field textarea, -div.comatose_field input, -div.comatose_field select { - border: 1px solid gray; -} - -/**************************************** - * revisions page stuff - ****************************************/ - -.older-content { - float: right; -} -.current-content { - float: left; -} - -.revisions { - width: 47%; - border: 1px solid gray; - padding: 0.25em; -} - -.revisions .header { - font-weight: bold; - border-bottom: 1px solid black; - margin-bottom: 10px; - height: 40px; -} - -.revisions .meta { - border-bottom: 1px solid black; - margin-bottom: 10px; -} - -.revisions .footer { - border-top: 1px solid black; - margin-top: 10px; - padding: 0.25em; -} - -.revisions .meta label span { - font-weight: bold; -} - -.revisions .meta label { - font-weight: normal; - display: block; -} - -.collapsed { - display: none; -} -- libgit2 0.21.2