typo 5.0.3.98.1 → 5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES-5.1 +54 -0
- data/app/apis/meta_weblog_service.rb +7 -6
- data/app/controllers/accounts_controller.rb +2 -1
- data/app/controllers/admin/content_controller.rb +45 -3
- data/app/controllers/admin/pages_controller.rb +1 -1
- data/app/controllers/admin/textfilters_controller.rb +4 -4
- data/app/controllers/admin/users_controller.rb +14 -2
- data/app/controllers/application.rb +4 -1
- data/app/controllers/articles_controller.rb +1 -3
- data/app/controllers/backend_controller.rb +2 -0
- data/app/controllers/comments_controller.rb +6 -0
- data/app/helpers/admin/base_helper.rb +24 -26
- data/app/helpers/admin/feedback_helper.rb +0 -20
- data/app/helpers/application_helper.rb +1 -0
- data/app/models/article.rb +2 -0
- data/app/models/blog.rb +1 -0
- data/app/models/blog_sweeper.rb +8 -9
- data/app/models/page_cache.rb +1 -0
- data/app/models/tag.rb +2 -2
- data/app/models/user.rb +5 -1
- data/app/views/admin/blacklist/destroy.html.erb +1 -1
- data/app/views/admin/categories/destroy.html.erb +1 -1
- data/app/views/admin/comments/destroy.html.erb +1 -1
- data/app/views/admin/content/_articles.html.erb +4 -4
- data/app/views/admin/content/_attachment.html.erb +6 -7
- data/app/views/admin/content/_drafts.html.erb +6 -0
- data/app/views/admin/content/_form.html.erb +47 -34
- data/app/views/admin/content/destroy.html.erb +1 -1
- data/app/views/admin/content/edit.html.erb +1 -1
- data/app/views/admin/content/index.html.erb +1 -6
- data/app/views/admin/content/new.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +4 -3
- data/app/views/admin/pages/_pages.html.erb +3 -3
- data/app/views/admin/pages/destroy.html.erb +1 -1
- data/app/views/admin/resources/destroy.html.erb +1 -1
- data/app/views/admin/settings/index.html.erb +10 -0
- data/app/views/admin/shared/_edit.html.erb +1 -6
- data/app/views/admin/textfilters/destroy.html.erb +3 -0
- data/app/views/admin/textfilters/edit.html.erb +3 -1
- data/app/views/admin/textfilters/index.html.erb +1 -1
- data/app/views/admin/textfilters/new.html.erb +3 -1
- data/app/views/admin/trackbacks/show.html.erb +1 -1
- data/app/views/admin/users/destroy.html.erb +1 -1
- data/app/views/admin/users/edit.html.erb +1 -5
- data/app/views/admin/users/index.html.erb +1 -1
- data/app/views/articles/_comment_failed.html.erb +3 -0
- data/config/initializers/access_rules.rb +3 -3
- data/db/migrate/070_add_users_to_non_admins.rb +17 -0
- data/installer/rails_installer_defaults.yml +1 -1
- data/lib/tasks/release.rake +3 -3
- data/lib/typo_version.rb +1 -1
- data/public/images/admin/cancel.png +0 -0
- data/public/images/admin/checked.png +0 -0
- data/public/images/admin/delete.png +0 -0
- data/public/images/admin/edit.png +0 -0
- data/public/images/admin/show.png +0 -0
- data/public/javascripts/controls.js +2 -0
- data/public/javascripts/dragdrop.js +2 -0
- data/public/javascripts/effects.js +6 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fckcontextmenu.js +13 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckdataprocessor.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdocumentfragment_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange.js +189 -79
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_gecko.js +4 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrange_ie.js +16 -15
- data/public/javascripts/fckeditor/editor/_source/classes/fckdomrangeiterator.js +30 -9
- data/public/javascripts/fckeditor/editor/_source/classes/fckeditingarea.js +108 -90
- data/public/javascripts/fckeditor/editor/_source/classes/fckelementpath.js +22 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckenterkey.js +76 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckevents.js +7 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckhtmliterator.js +142 -0
- data/public/javascripts/fckeditor/editor/_source/classes/fckicon.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckiecleanup.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fckimagepreloader.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckkeystrokehandler.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublock.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenublockpanel.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fckmenuitem.js +6 -5
- data/public/javascripts/fckeditor/editor/_source/classes/fckpanel.js +85 -38
- data/public/javascripts/fckeditor/editor/_source/classes/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckspecialcombo.js +7 -8
- data/public/javascripts/fckeditor/editor/_source/classes/fckstyle.js +180 -17
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbar.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbreak_ie.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbutton.js +9 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarbuttonui.js +5 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontformatcombo.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontscombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarfontsizecombo.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarpanelbutton.js +15 -4
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarspecialcombo.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fcktoolbarstylecombo.js +13 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckw3crange.js +17 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_gecko.js +28 -13
- data/public/javascripts/fckeditor/editor/_source/classes/fckxml_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fck_othercommands.js +75 -19
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckblockquotecommand.js +64 -8
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckcorestylecommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckfitwindow.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckindentcommands.js +5 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckjustifycommands.js +6 -6
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcklistcommands.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcknamedcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpasteplaintextcommand.js +3 -1
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckpastewordcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckremoveformatcommand.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckshowblocks.js +7 -9
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_gecko.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckspellcheckcommand_ie.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fckstylecommand.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktablecommand.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/commandclasses/fcktextcolorcommand.js +28 -10
- data/public/javascripts/fckeditor/editor/_source/fckconstants.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/fckeditorapi.js +21 -13
- data/public/javascripts/fckeditor/editor/_source/fckjscoreextensions.js +5 -5
- data/public/javascripts/fckeditor/editor/_source/fckscriptloader.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck.js +148 -38
- data/public/javascripts/fckeditor/editor/_source/internals/fck_contextmenu.js +4 -4
- data/public/javascripts/fckeditor/editor/_source/internals/fck_gecko.js +45 -47
- data/public/javascripts/fckeditor/editor/_source/internals/fck_ie.js +50 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckbrowserinfo.js +4 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcodeformatter.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckcommands.js +28 -28
- data/public/javascripts/fckeditor/editor/_source/internals/fckconfig.js +12 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fckdebug.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckdialog.js +211 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fckdocumentprocessor.js +63 -39
- data/public/javascripts/fckeditor/editor/_source/internals/fckdomtools.js +177 -37
- data/public/javascripts/fckeditor/editor/_source/internals/fcklanguagemanager.js +2 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcklisthandler.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcklistslib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckplugins.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckregexlib.js +5 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection.js +3 -3
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_gecko.js +36 -27
- data/public/javascripts/fckeditor/editor/_source/internals/fckselection_ie.js +91 -17
- data/public/javascripts/fckeditor/editor/_source/internals/fckstyles.js +22 -13
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler.js +15 -15
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_gecko.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktablehandler_ie.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbaritems.js +1 -1
- data/public/javascripts/fckeditor/editor/_source/internals/fcktoolbarset.js +32 -6
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools.js +181 -22
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_gecko.js +19 -7
- data/public/javascripts/fckeditor/editor/_source/internals/fcktools_ie.js +8 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckundo.js +8 -5
- data/public/javascripts/fckeditor/editor/_source/internals/fckurlparams.js +2 -2
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml.js +116 -61
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_gecko.js +6 -10
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtml_ie.js +51 -56
- data/public/javascripts/fckeditor/editor/_source/internals/fckxhtmlentities.js +1 -1
- data/public/javascripts/fckeditor/editor/css/fck_editorarea.css +3 -2
- data/public/javascripts/fckeditor/editor/css/fck_internal.css +19 -2
- data/public/javascripts/fckeditor/editor/css/fck_showtableborders_gecko.css +8 -1
- data/public/javascripts/fckeditor/editor/css/images/fck_plugin.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.css +8 -1
- data/public/javascripts/fckeditor/editor/dialog/common/fck_dialog_common.js +199 -26
- data/public/javascripts/fckeditor/editor/dialog/fck_about.html +20 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_about/sponsors/spellchecker_net.gif +0 -0
- data/public/javascripts/fckeditor/editor/dialog/fck_anchor.html +15 -10
- data/public/javascripts/fckeditor/editor/dialog/fck_button.html +9 -14
- data/public/javascripts/fckeditor/editor/dialog/fck_checkbox.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_colorselector.html +4 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops.html +6 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_docprops/fck_document_preview.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_flash.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash.js +18 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_flash/fck_flash_preview.html +7 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_form.html +7 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_hiddenfield.html +12 -15
- data/public/javascripts/fckeditor/editor/dialog/fck_image.html +9 -3
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image.js +24 -12
- data/public/javascripts/fckeditor/editor/dialog/fck_image/fck_image_preview.html +24 -18
- data/public/javascripts/fckeditor/editor/dialog/fck_link.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_link/fck_link.js +41 -20
- data/public/javascripts/fckeditor/editor/dialog/fck_listprop.html +8 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_paste.html +53 -54
- data/public/javascripts/fckeditor/editor/dialog/fck_radiobutton.html +8 -13
- data/public/javascripts/fckeditor/editor/dialog/fck_replace.html +157 -79
- data/public/javascripts/fckeditor/editor/dialog/fck_select.html +14 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_select/fck_select.js +2 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_smiley.html +9 -4
- data/public/javascripts/fckeditor/editor/dialog/fck_source.html +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_specialchar.html +9 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages.html +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.cfm +3 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php +5 -2
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.pl +2 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js +0 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_table.html +10 -5
- data/public/javascripts/fckeditor/editor/dialog/fck_tablecell.html +8 -6
- data/public/javascripts/fckeditor/editor/dialog/fck_template.html +1 -1
- data/public/javascripts/fckeditor/editor/dialog/fck_textarea.html +10 -11
- data/public/javascripts/fckeditor/editor/dialog/fck_textfield.html +10 -14
- data/public/javascripts/fckeditor/editor/dtd/fck_dtd_test.html +0 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10strict.js +2 -2
- data/public/javascripts/fckeditor/editor/dtd/fck_xhtml10transitional.js +3 -3
- data/public/javascripts/fckeditor/editor/fckdebug.html +1 -1
- data/public/javascripts/fckeditor/editor/fckdialog.html +660 -213
- data/public/javascripts/fckeditor/editor/fckeditor.html +66 -16
- data/public/javascripts/fckeditor/editor/fckeditor.original.html +70 -16
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.css +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/browser.html +37 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmactualfolder.html +33 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmcreatefolder.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmfolders.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourceslist.html +3 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmresourcetype.html +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/frmupload.html +2 -1
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/common.js +34 -2
- data/public/javascripts/fckeditor/editor/filemanager/browser/default/js/fckxml.js +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/connector.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/aspx/upload.aspx +5 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/basexml.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/commands.pl +50 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/connector.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/io.pl +14 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload.cgi +2 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/upload_fck.pl +23 -4
- data/public/javascripts/fckeditor/editor/filemanager/connectors/perl/util.pl +1 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/config.py +43 -32
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/connector.py +16 -16
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckcommands.py +26 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckconnector.py +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckoutput.py +40 -9
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/fckutil.py +20 -21
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/htaccess.txt +2 -2
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/upload.py +13 -13
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/wsgi.py +3 -3
- data/public/javascripts/fckeditor/editor/filemanager/connectors/py/zope.py +4 -5
- data/public/javascripts/fckeditor/editor/filemanager/connectors/test.html +34 -1
- data/public/javascripts/fckeditor/editor/filemanager/connectors/uploadtest.html +47 -4
- data/public/javascripts/fckeditor/editor/js/fckadobeair.js +176 -0
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_gecko.js +77 -77
- data/public/javascripts/fckeditor/editor/js/fckeditorcode_ie.js +74 -74
- data/public/javascripts/fckeditor/editor/lang/_translationstatus.txt +55 -54
- data/public/javascripts/fckeditor/editor/lang/af.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ar.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/bg.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/bs.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ca.js +27 -28
- data/public/javascripts/fckeditor/editor/lang/cs.js +18 -19
- data/public/javascripts/fckeditor/editor/lang/da.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/de.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/el.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-au.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-ca.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en-uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/en.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/eo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/es.js +34 -35
- data/public/javascripts/fckeditor/editor/lang/et.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/eu.js +32 -33
- data/public/javascripts/fckeditor/editor/lang/fa.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fi.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/fo.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/fr-ca.js +515 -0
- data/public/javascripts/fckeditor/editor/lang/fr.js +5 -6
- data/public/javascripts/fckeditor/editor/lang/gl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/he.js +15 -16
- data/public/javascripts/fckeditor/editor/lang/hi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/hu.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/it.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ja.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/km.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ko.js +25 -26
- data/public/javascripts/fckeditor/editor/lang/lt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/lv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/mn.js +199 -200
- data/public/javascripts/fckeditor/editor/lang/ms.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nb.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/nl.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/no.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/pl.js +51 -52
- data/public/javascripts/fckeditor/editor/lang/pt-br.js +16 -17
- data/public/javascripts/fckeditor/editor/lang/pt.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ro.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/ru.js +31 -32
- data/public/javascripts/fckeditor/editor/lang/sk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sl.js +39 -40
- data/public/javascripts/fckeditor/editor/lang/sr-latn.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/sv.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/th.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/tr.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/uk.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/vi.js +1 -2
- data/public/javascripts/fckeditor/editor/lang/zh-cn.js +2 -3
- data/public/javascripts/fckeditor/editor/lang/zh.js +1 -2
- data/public/javascripts/fckeditor/editor/plugins/autogrow/fckplugin.js +9 -2
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.config.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/_sample/sample.html +1 -1
- data/public/javascripts/fckeditor/editor/plugins/bbcode/fckplugin.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/dragresizetable/fckplugin.js +35 -11
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fck_placeholder.html +10 -5
- data/public/javascripts/fckeditor/editor/plugins/placeholder/fckplugin.js +3 -3
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/de.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/en.js +2 -2
- data/public/javascripts/fckeditor/editor/{filemanager/connectors/cfm/upload.cfm → plugins/placeholder/lang/es.js} +9 -13
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/fr.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/it.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/placeholder/lang/pl.js +2 -2
- data/public/javascripts/fckeditor/editor/plugins/simplecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/plugins/tablecommands/fckplugin.js +1 -1
- data/public/javascripts/fckeditor/editor/skins/_fckviewstrips.html +1 -1
- data/public/javascripts/fckeditor/editor/skins/default/fck_dialog.css +271 -8
- data/public/javascripts/fckeditor/editor/skins/default/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_dialog.css +270 -8
- data/public/javascripts/fckeditor/editor/skins/office2003/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/editor/skins/silver/fck_dialog.css +270 -11
- data/public/javascripts/fckeditor/editor/skins/silver/fck_editor.css +2 -2
- data/public/javascripts/fckeditor/fckconfig.js +58 -55
- data/public/javascripts/fckeditor/fckeditor.js +99 -8
- data/public/javascripts/fckeditor/fckeditor.py +2 -4
- data/public/javascripts/fckeditor/fckpackager.xml +12 -12
- data/public/javascripts/fckeditor/fckstyles.xml +2 -5
- data/public/javascripts/fckeditor/fcktemplates.xml +1 -1
- data/public/javascripts/fckeditor/license.txt +1 -2
- data/public/javascripts/prototype.js +46 -101
- data/public/javascripts/scriptaculous.js +28 -17
- data/public/stylesheets/administration.css +5 -1
- data/themes/dirtylicious/about.markdown +3 -0
- data/themes/dirtylicious/images/body.jpg +0 -0
- data/themes/dirtylicious/images/container.jpg +0 -0
- data/themes/dirtylicious/images/gravatar.gif +0 -0
- data/themes/dirtylicious/images/header.jpg +0 -0
- data/themes/dirtylicious/images/li.gif +0 -0
- data/themes/dirtylicious/images/main.gif +0 -0
- data/themes/dirtylicious/images/nav.gif +0 -0
- data/themes/dirtylicious/images/quote.gif +0 -0
- data/themes/dirtylicious/images/spinner.gif +0 -0
- data/themes/dirtylicious/layouts/default.html.erb +60 -0
- data/themes/dirtylicious/preview.png +0 -0
- data/themes/dirtylicious/stylesheets/application.css +327 -0
- data/themes/dirtylicious/views/articles/_article.html.erb +33 -0
- data/themes/dirtylicious/views/articles/_comment.html.erb +14 -0
- data/themes/dirtylicious/views/articles/_comment_form.html.erb +37 -0
- data/themes/dirtylicious/views/articles/_comment_list.html.erb +7 -0
- data/themes/dirtylicious/views/articles/_trackback.html.erb +9 -0
- data/themes/dirtylicious/views/articles/comment_preview.html.erb +10 -0
- data/themes/dirtylicious/views/articles/index.html.erb +5 -0
- data/themes/dirtylicious/views/articles/read.html.erb +42 -0
- data/themes/dirtylicious/views/shared/_search.html.erb +16 -0
- data/themes/standard_issue/about.markdown +5 -0
- data/themes/standard_issue/images/img01.gif +0 -0
- data/themes/standard_issue/images/img02.gif +0 -0
- data/themes/standard_issue/images/img03.gif +0 -0
- data/themes/standard_issue/images/img04.jpg +0 -0
- data/themes/standard_issue/images/img05.gif +0 -0
- data/themes/standard_issue/images/img06.gif +0 -0
- data/themes/standard_issue/images/img07.gif +0 -0
- data/themes/standard_issue/images/img08.gif +0 -0
- data/themes/standard_issue/images/img09.gif +0 -0
- data/themes/standard_issue/images/img10.gif +0 -0
- data/themes/standard_issue/images/spacer.gif +0 -0
- data/themes/standard_issue/images/spinner.gif +0 -0
- data/themes/standard_issue/layouts/default.html.erb +59 -0
- data/themes/standard_issue/preview.png +0 -0
- data/themes/standard_issue/stylesheets/application.css +461 -0
- data/themes/standard_issue/views/articles/_article.html.erb +37 -0
- data/themes/standard_issue/views/articles/_comment.html.erb +12 -0
- data/themes/standard_issue/views/articles/_comment_form.html.erb +48 -0
- data/themes/standard_issue/views/articles/_comment_list.html.erb +7 -0
- data/themes/standard_issue/views/articles/_trackback.html.erb +9 -0
- data/themes/standard_issue/views/articles/comment_preview.html.erb +10 -0
- data/themes/standard_issue/views/articles/index.html.erb +5 -0
- data/themes/standard_issue/views/articles/read.html.erb +42 -0
- data/themes/standard_issue/views/shared/_search.html.erb +17 -0
- data/themes/standard_issue/views/theme/static_view_test.html.erb +1 -0
- data/themes/typographic/images/accept.gif +0 -0
- data/themes/typographic/images/accept50.gif +0 -0
- data/themes/typographic/images/bg_white.gif +0 -0
- data/themes/typographic/images/bg_wrapper.gif +0 -0
- data/themes/typographic/images/bullet_bottom.gif +0 -0
- data/themes/typographic/images/bullet_right.gif +0 -0
- data/themes/typographic/images/email_open.gif +0 -0
- data/themes/typographic/images/email_open50.gif +0 -0
- data/themes/typographic/images/meta.gif +0 -0
- data/themes/typographic/images/page_edit.gif +0 -0
- data/themes/typographic/images/page_edit50.gif +0 -0
- data/themes/typographic/images/spinner.gif +0 -0
- data/themes/typographic/images/tag.gif +0 -0
- data/themes/typographic/images/user.gif +0 -0
- data/themes/typographic/images/user50.gif +0 -0
- data/themes/typographic/images/world_link.gif +0 -0
- data/themes/typographic/images/world_link50.gif +0 -0
- data/themes/typographic/layouts/default.html.erb +5 -2
- data/themes/typographic/stylesheets/ie6.css +86 -0
- data/themes/typographic/views/articles/_article.html.erb +2 -2
- data/vendor/plugins/fckeditor/README +0 -7
- data/vendor/plugins/fckeditor/app/helpers/fckeditor_helper.rb +1 -3
- data/vendor/plugins/fckeditor/lib/fckeditor_version.rb +2 -2
- data/vendor/plugins/fckeditor/tasks/fckeditor_tasks.rake +1 -1
- data/vendor/plugins/fckeditor/test/fckeditor_test.rb +8 -0
- metadata +98 -66
- data/CHANGES-5.0.4 +0 -33
- data/SIDEBARS +0 -39
- data/app/views/admin/content/_quick_post.html.erb +0 -20
- data/db/schema.rb +0 -224
- data/public/.DS_Store +0 -0
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/basexml.asp +0 -62
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/class_upload.asp +0 -353
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/commands.asp +0 -198
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/config.asp +0 -128
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/connector.asp +0 -88
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/io.asp +0 -222
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/upload.asp +0 -61
- data/public/javascripts/fckeditor/editor/filemanager/connectors/asp/util.asp +0 -55
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/ImageObject.cfc +0 -273
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_connector.cfm +0 -315
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf5_upload.cfm +0 -296
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_basexml.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_commands.cfm +0 -225
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_connector.cfm +0 -89
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_io.cfm +0 -288
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_upload.cfm +0 -68
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/cf_util.cfm +0 -132
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/config.cfm +0 -183
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/connector.cfm +0 -31
- data/public/javascripts/fckeditor/editor/filemanager/connectors/cfm/image.cfc +0 -1325
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/config.lasso +0 -65
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/connector.lasso +0 -257
- data/public/javascripts/fckeditor/editor/filemanager/connectors/lasso/upload.lasso +0 -157
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/basexml.php +0 -93
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/commands.php +0 -245
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/config.php +0 -140
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/connector.php +0 -87
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/io.php +0 -272
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/phpcompat.php +0 -17
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/upload.php +0 -59
- data/public/javascripts/fckeditor/editor/filemanager/connectors/php/util.php +0 -185
- data/public/javascripts/fckeditor/fckeditor.afp +0 -161
- data/public/javascripts/fckeditor/fckeditor.asp +0 -235
- data/public/javascripts/fckeditor/fckeditor.cfc +0 -273
- data/public/javascripts/fckeditor/fckeditor.cfm +0 -210
- data/public/javascripts/fckeditor/fckeditor.lasso +0 -112
- data/test/mocks/themes/typographic/.DS_Store +0 -0
- data/themes/typographic/.DS_Store +0 -0
- data/vendor/plugins/audioscrobbler_sidebar/MAINTAINERS +0 -26
- data/vendor/plugins/audioscrobbler_sidebar/MIT-LICENSE +0 -21
- data/vendor/plugins/audioscrobbler_sidebar/README +0 -27
- data/vendor/plugins/audioscrobbler_sidebar/Rakefile +0 -22
- data/vendor/plugins/audioscrobbler_sidebar/init.rb +0 -5
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler.rb +0 -54
- data/vendor/plugins/audioscrobbler_sidebar/lib/audioscrobbler_sidebar.rb +0 -13
- data/vendor/plugins/audioscrobbler_sidebar/test/audioscrobbler_sidebar_test.rb +0 -8
- data/vendor/plugins/audioscrobbler_sidebar/views/content.rhtml +0 -10
data/CHANGES-5.1
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
Typo 5.1 "Cartier-Bresson" was released on sunday July the 20th at around 1AM and can be considered as a major Typo Version.
|
2
|
+
|
3
|
+
It contains :
|
4
|
+
|
5
|
+
|
6
|
+
** Multiple users and roles.
|
7
|
+
|
8
|
+
This point actually makes Typo 5.1 a major version. This release introduces 3 roles, coming along with various privileges :
|
9
|
+
– Administrator, who owns full administrative and publishing power.
|
10
|
+
– Publisher, who owns full publishing power on his own contents.
|
11
|
+
– Contributors, who only have the right to login and edit their profile.
|
12
|
+
|
13
|
+
There is now an option to allow new users to register by themselves or not. If not, the administrator will just have to add them himself in the admin.
|
14
|
+
|
15
|
+
|
16
|
+
** Improved admin
|
17
|
+
|
18
|
+
The admin has been heavily refactored to be lighter, easier to use, and offer more capabilities.
|
19
|
+
– You can now save your posts as drafts. Drafts now appear in a separate area of your administration to separarte them from offline posts.
|
20
|
+
– New editing interface.
|
21
|
+
– Tag autocompletion.
|
22
|
+
– A new dashboard that makes daily administration easier.
|
23
|
+
– Save as draft capabilities
|
24
|
+
– Autosave capabilities (only with simple visual editor)
|
25
|
+
– Revamped UI
|
26
|
+
– Many more...
|
27
|
+
|
28
|
+
|
29
|
+
** New default theme
|
30
|
+
|
31
|
+
After leaving the too much long used Azure theme for some templates found on open source design websites, we realized Typo needed a new default theme. We asked O2Source a French web Agency involved in many free and open source templates, and they came up with Typographic.
|
32
|
+
|
33
|
+
We wanted something new, far from the classic white and blue fixed width wordpressish thing, something with its own personnality, that would take the whole screen and adapt many resolutions, and we've been quite delighted with what Hélène produced.
|
34
|
+
|
35
|
+
|
36
|
+
** Come back of the gem and the installer
|
37
|
+
|
38
|
+
After fixing numerous bugs happening with Typo installed through our installer, we were able to provide the gem again, making Typo installation easier than ever.
|
39
|
+
|
40
|
+
MySQL is now the default database and SQLITE dependency has been removed.
|
41
|
+
|
42
|
+
** Lots of code improvement and refactoring
|
43
|
+
|
44
|
+
The code have been improved and refactored, maing Typo lighter than ever. This is a guarantee of less errors.
|
45
|
+
|
46
|
+
** New migrators
|
47
|
+
|
48
|
+
We've included new migrators, allowing easy import from Wordpress and Dotclear 1.2 and 2. Typepad and Textpattern may follow soon.
|
49
|
+
|
50
|
+
** New site with up to date documentation
|
51
|
+
|
52
|
+
The bugtracker has been moved from Trac to Redmine, so has the documentation, which has been rewriten in many ways. Access to the doc has also been made easier by merging redmine.typosphere.org with trac.typosphere.org.
|
53
|
+
|
54
|
+
Lots of bugfixes, too much to say here.
|
@@ -91,12 +91,12 @@ class MetaWeblogService < TypoWebService
|
|
91
91
|
article.user = @user
|
92
92
|
|
93
93
|
# Movable Type API support
|
94
|
-
article.allow_comments = struct['mt_allow_comments']
|
95
|
-
article.allow_pings = struct['mt_allow_pings']
|
96
|
-
article.extended = struct['mt_text_more']
|
97
|
-
article.excerpt = struct['mt_excerpt']
|
98
|
-
article.keywords = struct['mt_keywords'] || ''
|
94
|
+
article.allow_comments = struct['mt_allow_comments'] || this_blog.default_allow_comments
|
95
|
+
article.allow_pings = struct['mt_allow_pings'] || this_blog.default_allow_pings
|
96
|
+
article.extended = struct['mt_text_more'] || ''
|
97
|
+
article.excerpt = struct['mt_excerpt'] || ''
|
99
98
|
article.text_filter = TextFilter.find_by_name(struct['mt_convert_breaks'] || this_blog.text_filter)
|
99
|
+
article.keywords = struct['mt_keywords'] || ''
|
100
100
|
|
101
101
|
if !article.save
|
102
102
|
raise article.errors.full_messages * ", "
|
@@ -138,6 +138,7 @@ class MetaWeblogService < TypoWebService
|
|
138
138
|
article.categories << c if struct['categories'].include?(c.name)
|
139
139
|
end
|
140
140
|
end
|
141
|
+
|
141
142
|
RAILS_DEFAULT_LOGGER.info(struct['mt_tb_ping_urls'])
|
142
143
|
article.save
|
143
144
|
true
|
@@ -161,7 +162,7 @@ class MetaWeblogService < TypoWebService
|
|
161
162
|
:categories => article.categories.collect { |c| c.name },
|
162
163
|
:mt_text_more => article.extended.to_s,
|
163
164
|
:mt_excerpt => article.excerpt.to_s,
|
164
|
-
:mt_keywords => article.
|
165
|
+
:mt_keywords => article.tags.collect { |p| p.name }.join(', '),
|
165
166
|
:mt_allow_comments => article.allow_comments? ? 1 : 0,
|
166
167
|
:mt_allow_pings => article.allow_pings? ? 1 : 0,
|
167
168
|
:mt_convert_breaks => (article.text_filter.name.to_s rescue ''),
|
@@ -20,7 +20,7 @@ class AccountsController < ApplicationController
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def signup
|
23
|
-
unless User.count.zero?
|
23
|
+
unless User.count.zero? or this_blog.allow_signup == 1
|
24
24
|
redirect_to :action => 'login'
|
25
25
|
return
|
26
26
|
end
|
@@ -28,6 +28,7 @@ class AccountsController < ApplicationController
|
|
28
28
|
@user = User.new(params[:user])
|
29
29
|
|
30
30
|
if request.post? and @user.save
|
31
|
+
self.current_user = @user
|
31
32
|
session[:user_id] = @user.id
|
32
33
|
flash[:notice] = _("Signup successful")
|
33
34
|
redirect_to :controller => "admin/settings", :action => "index"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'base64'
|
2
2
|
module Admin; end
|
3
3
|
class Admin::ContentController < Admin::BaseController
|
4
|
-
layout "administration", :except =>
|
4
|
+
layout "administration", :except => [:show, :autosave]
|
5
5
|
|
6
6
|
def auto_complete_for_article_keywords
|
7
7
|
@items = Tag.find_with_char params[:article][:keywords].strip
|
@@ -15,7 +15,8 @@ class Admin::ContentController < Admin::BaseController
|
|
15
15
|
|
16
16
|
def index
|
17
17
|
# Filtering articles
|
18
|
-
|
18
|
+
@drafts = Article.find(:all, :conditions => "state='draft'")
|
19
|
+
conditions = "state in('published', 'withdrawn')"
|
19
20
|
if params[:search]
|
20
21
|
@search = params[:search]
|
21
22
|
|
@@ -52,10 +53,24 @@ class Admin::ContentController < Admin::BaseController
|
|
52
53
|
end
|
53
54
|
|
54
55
|
def new; new_or_edit; end
|
55
|
-
def edit
|
56
|
+
def edit
|
57
|
+
@drafts = Article.find(:all, :conditions => "state='draft'")
|
58
|
+
article = Article.find(params[:id])
|
59
|
+
if current_user.profile.label != 'admin' and article.user_id != current_user.id
|
60
|
+
redirect_to :action => 'list'
|
61
|
+
flash[:error] = _("Error, you are not allowed to perform this action")
|
62
|
+
end
|
63
|
+
new_or_edit
|
64
|
+
end
|
56
65
|
|
57
66
|
def destroy
|
58
67
|
@article = Article.find(params[:id])
|
68
|
+
|
69
|
+
if current_user.profile.label != 'admin' and @article.user_id != current_user.id
|
70
|
+
redirect_to :action => 'list'
|
71
|
+
flash[:error] = _("Error, you are not allowed to perform this action")
|
72
|
+
end
|
73
|
+
|
59
74
|
if request.post?
|
60
75
|
@article.destroy
|
61
76
|
redirect_to :action => 'list'
|
@@ -86,6 +101,30 @@ class Admin::ContentController < Admin::BaseController
|
|
86
101
|
end
|
87
102
|
end
|
88
103
|
|
104
|
+
def autosave
|
105
|
+
if params[:id]
|
106
|
+
@article = Article.find(params[:id])
|
107
|
+
else
|
108
|
+
@article = Article.new
|
109
|
+
end
|
110
|
+
|
111
|
+
unless @article.published
|
112
|
+
params[:article] ||= {}
|
113
|
+
@article.attributes = params[:article]
|
114
|
+
|
115
|
+
setup_categories
|
116
|
+
@selected = @article.categories.collect { |c| c.id }
|
117
|
+
set_article_author
|
118
|
+
save_attachments
|
119
|
+
@article.state = "draft" unless @article.state == "withdrawn"
|
120
|
+
if @article.save
|
121
|
+
set_article_categories
|
122
|
+
render :text => _("Article was successfully saved at ") + Time.now.to_s
|
123
|
+
return true
|
124
|
+
end
|
125
|
+
end
|
126
|
+
render :text => nil
|
127
|
+
end
|
89
128
|
protected
|
90
129
|
|
91
130
|
attr_accessor :resources, :categories, :resource, :category
|
@@ -103,17 +142,20 @@ class Admin::ContentController < Admin::BaseController
|
|
103
142
|
def real_action_for(action); { 'add' => :<<, 'remove' => :delete}[action]; end
|
104
143
|
|
105
144
|
def new_or_edit
|
145
|
+
@drafts = Article.find(:all, :conditions => "state='draft'")
|
106
146
|
get_or_build_article
|
107
147
|
params[:article] ||= {}
|
108
148
|
params[:bookmarklet_link] && post_from_bookmarklet
|
109
149
|
|
110
150
|
@resources = Resource.find(:all, :order => 'created_at DESC')
|
111
151
|
@article.attributes = params[:article]
|
152
|
+
|
112
153
|
setup_categories
|
113
154
|
@selected = @article.categories.collect { |c| c.id }
|
114
155
|
if request.post?
|
115
156
|
set_article_author
|
116
157
|
save_attachments
|
158
|
+
@article.state = "draft" if @article.draft
|
117
159
|
if @article.save
|
118
160
|
set_article_categories
|
119
161
|
set_the_flash
|
@@ -75,7 +75,7 @@ class Admin::PagesController < Admin::BaseController
|
|
75
75
|
@page.attributes = params[:page]
|
76
76
|
if request.post? and @page.save
|
77
77
|
flash[:notice] = 'Page was successfully updated.'
|
78
|
-
redirect_to :action => '
|
78
|
+
redirect_to :action => 'index'
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class Admin::TextfiltersController < Admin::BaseController
|
2
|
-
def
|
3
|
-
|
4
|
-
render :action => '
|
2
|
+
def list
|
3
|
+
index
|
4
|
+
render :action => 'index'
|
5
5
|
end
|
6
6
|
|
7
|
-
def
|
7
|
+
def index
|
8
8
|
@textfilters = TextFilter.find(:all, :order => "id DESC")
|
9
9
|
@textfilter_map = TextFilter.filters_map
|
10
10
|
@macros = TextFilter.available_filters.select { |filter| TextFilterPlugin::Macro > filter }
|
@@ -6,7 +6,11 @@ class Admin::UsersController < Admin::BaseController
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def index
|
9
|
-
|
9
|
+
if current_user.profile.label == 'admin'
|
10
|
+
@users = User.find :all
|
11
|
+
else
|
12
|
+
redirect_to :action => 'edit'
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def new
|
@@ -19,7 +23,15 @@ class Admin::UsersController < Admin::BaseController
|
|
19
23
|
end
|
20
24
|
|
21
25
|
def edit
|
22
|
-
|
26
|
+
if current_user.profile.label == 'admin'
|
27
|
+
@user = User.find_by_id(params[:id])
|
28
|
+
else
|
29
|
+
if params[:id] and params[:id] != current_user[:id]
|
30
|
+
flash[:error] = _("Error, you are not allowed to perform this action")
|
31
|
+
redirect_to :action => 'index'
|
32
|
+
end
|
33
|
+
@user = User.find_by_id(current_user.id)
|
34
|
+
end
|
23
35
|
setup_profiles
|
24
36
|
@user.attributes = params[:user]
|
25
37
|
if request.post? and @user.save
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Likewise will all the methods added be available for all controllers.
|
3
3
|
class ApplicationController < ActionController::Base
|
4
4
|
include ::LoginSystem
|
5
|
-
protect_from_forgery :secret => '1c8b953667056f1a3c324d6b369f6158', :
|
5
|
+
protect_from_forgery :secret => '1c8b953667056f1a3c324d6b369f6158', :only => [:create, :edit, :update]
|
6
6
|
before_filter :reset_local_cache, :fire_triggers, :load_lang
|
7
7
|
after_filter :reset_local_cache
|
8
8
|
|
@@ -35,6 +35,9 @@ class ApplicationController < ActionController::Base
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def reset_local_cache
|
38
|
+
if !session
|
39
|
+
session :session => new
|
40
|
+
end
|
38
41
|
CachedModel.cache_reset
|
39
42
|
@current_user = nil
|
40
43
|
end
|
@@ -14,8 +14,6 @@ class ArticlesController < ContentController
|
|
14
14
|
caches_page *cached_pages
|
15
15
|
end
|
16
16
|
|
17
|
-
session :new_session => true
|
18
|
-
|
19
17
|
helper :'admin/base'
|
20
18
|
|
21
19
|
def index
|
@@ -85,7 +83,7 @@ class ArticlesController < ContentController
|
|
85
83
|
end
|
86
84
|
|
87
85
|
def view_page
|
88
|
-
if(@page = Page.find_by_name(params[:name])) && @page.published?
|
86
|
+
if(@page = Page.find_by_name(params[:name].map { |c| c }.join("/"))) && @page.published?
|
89
87
|
@page_title = @page.title
|
90
88
|
else
|
91
89
|
render :nothing => true, :status => 404
|
@@ -14,6 +14,12 @@ class CommentsController < FeedbackController
|
|
14
14
|
else
|
15
15
|
redirect_to article_path(@article)
|
16
16
|
end
|
17
|
+
else
|
18
|
+
if request.xhr?
|
19
|
+
render :partial => '/articles/comment_failed', :object => @comment
|
20
|
+
else
|
21
|
+
redirect_to article_path(@article)
|
22
|
+
end
|
17
23
|
end
|
18
24
|
end
|
19
25
|
|
@@ -76,12 +76,34 @@ module Admin::BaseHelper
|
|
76
76
|
link_to image_tag('admin/edit.png', :alt => "edit", :title => "Edit content"),
|
77
77
|
:controller => controller, :action => 'edit', :id => record.id
|
78
78
|
end
|
79
|
+
|
80
|
+
def link_to_edit_with_profiles(record, controller = @controller.controller_name)
|
81
|
+
if current_user.profile.label == 'admin'
|
82
|
+
link_to image_tag('admin/edit.png', :alt => "edit", :title => "Edit content"),
|
83
|
+
:controller => controller, :action => 'edit', :id => record.id
|
84
|
+
else
|
85
|
+
link_to(image_tag('admin/edit.png', :alt => "edit", :title => "Edit content"),
|
86
|
+
:controller => controller, :action => 'edit', :id => record.id) if current_user.id == record.user_id
|
87
|
+
end
|
88
|
+
end
|
79
89
|
|
80
90
|
def link_to_destroy(record, controller = @controller.controller_name)
|
81
91
|
link_to image_tag('admin/delete.png', :alt => "delete", :title => "Delete content"),
|
82
92
|
:controller => controller, :action => 'destroy', :id => record.id
|
83
93
|
end
|
84
94
|
|
95
|
+
def link_to_destroy_with_profiles(record, controller = @controller.controller_name)
|
96
|
+
if current_user.profile.label == 'admin'
|
97
|
+
link_to(image_tag('admin/delete.png', :alt => "delete", :title => "Delete content"),
|
98
|
+
{ :controller => controller, :action => 'destroy', :id => record.id, :search => params[:search],
|
99
|
+
:page => params[:page] }, :confirm => "Are you sure?", :method => :post)
|
100
|
+
else
|
101
|
+
link_to(image_tag('admin/delete.png', :alt => "delete", :title => "Delete content"),
|
102
|
+
{ :controller => controller, :action => 'destroy', :id => record.id, :search => params[:search],
|
103
|
+
:page => params[:page] }, :confirm => "Are you sure?", :method => :post) if current_user.id == record.user_id
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
85
107
|
def text_filter_options
|
86
108
|
TextFilter.find(:all).collect do |filter|
|
87
109
|
[ filter.description, filter ]
|
@@ -100,34 +122,10 @@ module Admin::BaseHelper
|
|
100
122
|
link_to_function(title, toggle_effect('quick-post', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4"))
|
101
123
|
end
|
102
124
|
|
103
|
-
def task_quicknav(title)
|
104
|
-
content_tag :li, link_to_function(title, toggle_effect('quick-navigate', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4"))
|
105
|
-
end
|
106
|
-
|
107
125
|
def task_overview
|
108
126
|
task(_('Back to overview'), 'index')
|
109
127
|
end
|
110
128
|
|
111
|
-
def task_new(title)
|
112
|
-
task(title, 'new')
|
113
|
-
end
|
114
|
-
|
115
|
-
def task_destroy(title, id)
|
116
|
-
task(title, 'destroy', id)
|
117
|
-
end
|
118
|
-
|
119
|
-
def task_edit(title, id)
|
120
|
-
task(title, 'edit', id)
|
121
|
-
end
|
122
|
-
|
123
|
-
def task_show(title, id)
|
124
|
-
task(title, 'show', id)
|
125
|
-
end
|
126
|
-
|
127
|
-
def task_help(title, id)
|
128
|
-
task(title, 'show_help', id)
|
129
|
-
end
|
130
|
-
|
131
129
|
def task(title, action, id = nil)
|
132
130
|
content_tag :li, link_to(title, :action => action, :id => id)
|
133
131
|
end
|
@@ -185,7 +183,7 @@ module Admin::BaseHelper
|
|
185
183
|
end
|
186
184
|
|
187
185
|
def class_sidebar
|
188
|
-
if controller.controller_name =~ /sidebar
|
186
|
+
if controller.controller_name =~ /sidebar/
|
189
187
|
"current"
|
190
188
|
end
|
191
189
|
end
|
@@ -203,7 +201,7 @@ module Admin::BaseHelper
|
|
203
201
|
end
|
204
202
|
|
205
203
|
def class_settings
|
206
|
-
if controller.controller_name =~ /settings/
|
204
|
+
if controller.controller_name =~ /settings|textfilter/
|
207
205
|
"current"
|
208
206
|
end
|
209
207
|
end
|
@@ -3,26 +3,6 @@ module Admin::FeedbackHelper
|
|
3
3
|
link_to truncate(article.title, 60), :controller => '/admin/content', :action => 'edit', :id => article.id
|
4
4
|
end
|
5
5
|
|
6
|
-
def task_showmod(title, action, current=nil)
|
7
|
-
content_tag :li,
|
8
|
-
link_to(title, {:published => (action =~ /spam/ ? 'f' : ''),
|
9
|
-
:confirmed => (action =~ /unconfirmed/ ? 'f' : ''),
|
10
|
-
:search => params[:search]},
|
11
|
-
:class => current)
|
12
|
-
end
|
13
|
-
|
14
|
-
def count_spam
|
15
|
-
_('Limit to spam') + " (" + Feedback.count(:all, :conditions => "state = 'spam'").to_s + ")"
|
16
|
-
end
|
17
|
-
|
18
|
-
def count_unconfirmed
|
19
|
-
_("Limit to unconfirmed") + " (" + Feedback.count(:all, :conditions => "state in ('presumed_ham', 'presumed_spam')").to_s + ")"
|
20
|
-
end
|
21
|
-
|
22
|
-
def count_unconfirmed_spam
|
23
|
-
_('Limit to unconfirmed spam') + " (" + Feedback.count(:all, :conditions => "state = 'presumed_spam'").to_s + ")"
|
24
|
-
end
|
25
|
-
|
26
6
|
# Define if all_feedback is the current
|
27
7
|
def all_feedback
|
28
8
|
if params[:confirmed] != 'f' and params[:published] != 'f'
|
@@ -201,6 +201,7 @@ module ApplicationHelper
|
|
201
201
|
#{ stylesheet_link_tag 'user-styles.css', :media => 'all' }
|
202
202
|
#{ javascript_include_tag "lang/" + Localization.lang.to_s }
|
203
203
|
#{ javascript_include_tag "cookies" }
|
204
|
+
#{javascript_tag "window._token = '#{form_authenticity_token}'"}
|
204
205
|
#{ javascript_include_tag "prototype" }
|
205
206
|
#{ javascript_include_tag "effects" }
|
206
207
|
#{ javascript_include_tag "typo" }
|
data/app/models/article.rb
CHANGED