alchemy_cms 2.5.0.rc3 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +1 -1
- data/README.md +22 -29
- data/alchemy_cms.gemspec +3 -2
- data/app/assets/javascripts/alchemy/alchemy.base.js +7 -0
- data/app/assets/javascripts/alchemy/alchemy.datepicker.js +3 -2
- data/app/assets/javascripts/alchemy/alchemy.image_cropper.js +5 -2
- data/app/assets/javascripts/alchemy/alchemy.js +8 -1
- data/app/assets/javascripts/alchemy/alchemy.menubar.js +4 -1
- data/app/assets/stylesheets/alchemy/archive.scss +1 -6
- data/app/assets/stylesheets/alchemy/base.scss +37 -17
- data/app/assets/stylesheets/alchemy/dashboard.scss +41 -24
- data/app/assets/stylesheets/alchemy/form_elements.scss +1 -1
- data/app/assets/stylesheets/alchemy/jquery-ui.scss +3 -2
- data/app/assets/stylesheets/alchemy/login.scss +1 -1
- data/app/assets/stylesheets/alchemy/menubar.css.scss +3 -1
- data/app/assets/stylesheets/alchemy/mixins.scss +9 -0
- data/app/assets/stylesheets/alchemy/notices.scss +1 -1
- data/app/assets/stylesheets/alchemy/sitemap.scss +1 -1
- data/app/controllers/alchemy/admin/dashboard_controller.rb +46 -3
- data/app/controllers/alchemy/admin/essence_pictures_controller.rb +3 -0
- data/app/controllers/alchemy/admin/pages_controller.rb +7 -7
- data/app/controllers/alchemy/attachments_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +5 -1
- data/app/helpers/alchemy/admin/essences_helper.rb +21 -0
- data/app/models/alchemy/attachment.rb +3 -1
- data/app/models/alchemy/page.rb +11 -8
- data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +38 -0
- data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +22 -0
- data/app/views/alchemy/admin/dashboard/_sites.html.erb +13 -0
- data/app/views/alchemy/admin/dashboard/_users.html.erb +19 -0
- data/app/views/alchemy/admin/dashboard/index.html.erb +35 -101
- data/app/views/alchemy/admin/dashboard/info.html.erb +57 -0
- data/app/views/alchemy/admin/elements/create.js.erb +4 -1
- data/app/views/alchemy/admin/elements/update.js.erb +1 -0
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +38 -41
- data/app/views/alchemy/admin/essence_pictures/update.js.erb +2 -4
- data/app/views/alchemy/essences/_essence_file_view.html.erb +1 -2
- data/app/views/alchemy/essences/_essence_picture_editor.html.erb +1 -18
- data/app/views/alchemy/essences/_essence_picture_tools.html.erb +1 -1
- data/app/views/layouts/alchemy/admin.html.erb +1 -0
- data/config/authorization_rules.rb +1 -0
- data/config/locales/alchemy.de.yml +5 -1
- data/config/locales/alchemy.en.yml +1 -0
- data/config/routes.rb +5 -1
- data/lib/alchemy/errors.rb +7 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +1 -0
- data/lib/tasks/ferret.rake +0 -3
- data/spec/models/attachment_spec.rb +27 -0
- data/spec/models/page_spec.rb +7 -0
- metadata +33 -7
| @@ -0,0 +1,57 @@ | |
| 1 | 
            +
            <p class="center with_margin"><%= image_tag('alchemy/alchemy-logo.png') %></p>
         | 
| 2 | 
            +
            <h2 class="center with_margin">
         | 
| 3 | 
            +
              <%= _t("Version") %>: <%= @alchemy_version %>
         | 
| 4 | 
            +
            </h2>
         | 
| 5 | 
            +
            <p class="center with_margin" id="update_check">
         | 
| 6 | 
            +
              <%= image_tag('alchemy/ajax_loader.gif', :id => 'load_info') %>
         | 
| 7 | 
            +
              <span id="update_available">
         | 
| 8 | 
            +
                <%= render_icon('warn') %>
         | 
| 9 | 
            +
                <%= _t 'Update available' %>
         | 
| 10 | 
            +
              </span>
         | 
| 11 | 
            +
              <span id="up_to_date">
         | 
| 12 | 
            +
                <%= render_icon('tick') %>
         | 
| 13 | 
            +
                <%= _t 'Alchemy is up to date' %>
         | 
| 14 | 
            +
              </span>
         | 
| 15 | 
            +
              <span id="error">
         | 
| 16 | 
            +
                <%= render_icon('error') %>
         | 
| 17 | 
            +
                <%= _t 'Update status unavailable' %>
         | 
| 18 | 
            +
              </span>
         | 
| 19 | 
            +
            </p>
         | 
| 20 | 
            +
            <div class="info with_margin">
         | 
| 21 | 
            +
              <%= render_icon('info') %>
         | 
| 22 | 
            +
              <p><%= _t('Alchemy is open software and itself uses open software and free resources:') %></p>
         | 
| 23 | 
            +
              <ul>
         | 
| 24 | 
            +
                <li>
         | 
| 25 | 
            +
                  <a href="http://rubyonrails.org" target="_blank">RubyOnRails</a>
         | 
| 26 | 
            +
                </li>
         | 
| 27 | 
            +
                <li>
         | 
| 28 | 
            +
                  <a href="http://jquery.com" target="_blank">jQuery Javascript Library</a>
         | 
| 29 | 
            +
                </li>
         | 
| 30 | 
            +
                <li>
         | 
| 31 | 
            +
                  <a href="http://jqueryui.com" target="_blank">jQuery UI Javascript GUI Library</a>
         | 
| 32 | 
            +
                </li>
         | 
| 33 | 
            +
                <li>
         | 
| 34 | 
            +
                  <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE - Javascript WYSIWYG Editor</a>
         | 
| 35 | 
            +
                </li>
         | 
| 36 | 
            +
                <li>
         | 
| 37 | 
            +
                  <a href="http://swfupload.org" target="_blank">SWFUpload</a>
         | 
| 38 | 
            +
                </li>
         | 
| 39 | 
            +
                <li>
         | 
| 40 | 
            +
                  <a href="http://p.yusukekamiyamane.com" target="_blank">Fugue Icons by Yusuke Kamiyamane</a>
         | 
| 41 | 
            +
                </li>
         | 
| 42 | 
            +
              </ul>
         | 
| 43 | 
            +
            </div>
         | 
| 44 | 
            +
            <script type="text/javascript">
         | 
| 45 | 
            +
              $('#load_info').show();
         | 
| 46 | 
            +
              $.get('/admin/dashboard/update_check', function(data, textStatus, jqXHR) {
         | 
| 47 | 
            +
                if (data == 'true') {
         | 
| 48 | 
            +
                  $('#update_available').show();
         | 
| 49 | 
            +
                } else {
         | 
| 50 | 
            +
                  $('#up_to_date').show();
         | 
| 51 | 
            +
                }
         | 
| 52 | 
            +
              }).fail(function(jqXHR, textStatus, errorThrown) {
         | 
| 53 | 
            +
                $('#error').show();
         | 
| 54 | 
            +
              }).always(function() {
         | 
| 55 | 
            +
                $('#load_info').hide();
         | 
| 56 | 
            +
              });
         | 
| 57 | 
            +
            </script>
         | 
| @@ -7,7 +7,10 @@ $('.element_editor[data-element-id="<%= @cutted_element_id %>"]').remove(); | |
| 7 7 | 
             
            <% end %>
         | 
| 8 8 |  | 
| 9 9 | 
             
            <% if @page.can_have_cells? %>
         | 
| 10 | 
            -
             | 
| 10 | 
            +
            if ($('#cells').length == 0) {
         | 
| 11 | 
            +
              Alchemy.buildTabbedCells('<%= _t(:main_content) %>');
         | 
| 12 | 
            +
            }
         | 
| 13 | 
            +
            Alchemy.selectOrCreateCellTab('<%= @cell_name -%>', '<%= @cell.nil? ? _t(:main_content) : @cell.name_for_label -%>');
         | 
| 11 14 | 
             
            <% end %>
         | 
| 12 15 |  | 
| 13 16 | 
             
            $element_area = $('#cell_<%= @cell_name -%>');
         | 
| @@ -19,6 +19,7 @@ $('#element_<%= @element.id %>_errors').html('<%= @error_message %><ul><li><%= @ | |
| 19 19 | 
             
            $("#element_<%= @element.id %>_errors").show();
         | 
| 20 20 | 
             
            $('div.content_editor').removeClass('validation_failed');
         | 
| 21 21 | 
             
            $('<%= @element.contents_with_errors.map { |content| "#" + content_dom_id(content) }.join(", ") %>').addClass('validation_failed');
         | 
| 22 | 
            +
            Alchemy.ElementEditorSelector.scrollToElement('#element_<%= @element.id %>');
         | 
| 22 23 | 
             
            Alchemy.Buttons.enable($el);
         | 
| 23 24 |  | 
| 24 25 | 
             
            <% end %>
         | 
| @@ -1,49 +1,46 @@ | |
| 1 | 
            +
            <div id="jscropper">
         | 
| 1 2 | 
             
            <% if @no_image_notice %>
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              <div class="info">
         | 
| 4 | 
            -
                <%= render_icon('info') %>
         | 
| 3 | 
            +
              <%= render_message do %>
         | 
| 5 4 | 
             
                <%= @no_image_notice %>
         | 
| 6 | 
            -
               | 
| 7 | 
            -
            </div>
         | 
| 5 | 
            +
              <% end %>
         | 
| 8 6 | 
             
            <% else %>
         | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 7 | 
            +
              <%= render_message do %>
         | 
| 8 | 
            +
                <%= _t('explain cropping') %>
         | 
| 9 | 
            +
              <% end %>
         | 
| 10 | 
            +
              <div class="thumbnail_background">
         | 
| 11 | 
            +
                <span class="picture_content_spinner">
         | 
| 12 | 
            +
                  <%= image_tag("alchemy/image_loader.gif", :alt => '') %>
         | 
| 13 | 
            +
                </span>
         | 
| 14 | 
            +
                <%= image_tag(show_alchemy_picture_path(@essence_picture.picture, :size => '800x600', :format => :png),
         | 
| 15 | 
            +
                  :id => 'imageToCrop',
         | 
| 16 | 
            +
                  :onload => %(
         | 
| 17 | 
            +
                    Alchemy.fadeImage(this, '#jscropper .picture_content_spinner');
         | 
| 18 | 
            +
                    Alchemy.ImageCropper.init(
         | 
| 19 | 
            +
                      [#{@initial_box[:x1]}, #{@initial_box[:y1]}, #{@initial_box[:x2]}, #{@initial_box[:y2]}],
         | 
| 20 | 
            +
                      #{@size_x},
         | 
| 21 | 
            +
                      #{@size_y},
         | 
| 22 | 
            +
                      [#{@default_box[:x1]}, #{@default_box[:y1]}, #{@default_box[:x2]}, #{@default_box[:y2]}],
         | 
| 23 | 
            +
                      #{@ratio},
         | 
| 24 | 
            +
                      [#{@essence_picture.picture.image_file_width}, #{@essence_picture.picture.image_file_height}]
         | 
| 25 | 
            +
                    );
         | 
| 26 | 
            +
                  ),
         | 
| 27 | 
            +
                  :style => "display: none;"
         | 
| 28 | 
            +
                ) %>
         | 
| 29 | 
            +
              </div>
         | 
| 30 | 
            +
              <%= form_for(
         | 
| 31 | 
            +
                @essence_picture,
         | 
| 32 | 
            +
                :url => alchemy.admin_essence_picture_path(@essence_picture, :options => @options),
         | 
| 33 | 
            +
                :id => 'image_cropper_form',
         | 
| 34 | 
            +
                :remote => true
         | 
| 35 | 
            +
              ) do |f| %>
         | 
| 11 36 | 
             
                <%= f.hidden_field :crop_from %>
         | 
| 12 37 | 
             
                <%= f.hidden_field :crop_size %>
         | 
| 13 | 
            -
                <%= hidden_field_tag  | 
| 14 | 
            -
                <%=  | 
| 15 | 
            -
              <% end %>
         | 
| 16 | 
            -
              <div class="toolbar_spacer"></div>
         | 
| 17 | 
            -
              <div class="button_with_label">
         | 
| 18 | 
            -
                <%= link_to(render_icon('delete-small'), '#', {
         | 
| 38 | 
            +
                <%= hidden_field_tag :content_id, @content.id %>
         | 
| 39 | 
            +
                <%= link_to(render_icon('delete-small') + _t('Reset Imagemask'), '#', {
         | 
| 19 40 | 
             
                  :onclick => 'Alchemy.ImageCropper.reset()',
         | 
| 20 | 
            -
                  :class => ' | 
| 21 | 
            -
                  :title => _t('Reset Imagemask')
         | 
| 41 | 
            +
                  :class => 'button with_icon'
         | 
| 22 42 | 
             
                }) %>
         | 
| 23 | 
            -
                 | 
| 24 | 
            -
               | 
| 25 | 
            -
            </div>
         | 
| 26 | 
            -
             | 
| 27 | 
            -
            <div id="crop_explain" class="tip">
         | 
| 28 | 
            -
              <%= _t('explain cropping') %>
         | 
| 29 | 
            -
            </div>
         | 
| 30 | 
            -
             | 
| 31 | 
            -
            <div id="jscropper">
         | 
| 32 | 
            -
              <%= image_tag(
         | 
| 33 | 
            -
                alchemy.zoom_picture_path(
         | 
| 34 | 
            -
                  :id => @essence_picture.picture.id,
         | 
| 35 | 
            -
                  :name => @essence_picture.picture.urlname,
         | 
| 36 | 
            -
                  :format => @options[:format],
         | 
| 37 | 
            -
                  :sh => @essence_picture.picture.security_token
         | 
| 38 | 
            -
                ),
         | 
| 39 | 
            -
                :id => 'imageToCrop',
         | 
| 40 | 
            -
                :onload => "Alchemy.ImageCropper.init(
         | 
| 41 | 
            -
                  [#{@initial_box[:x1]}, #{@initial_box[:y1]}, #{@initial_box[:x2]}, #{@initial_box[:y2]}],
         | 
| 42 | 
            -
                  #{@size_x},
         | 
| 43 | 
            -
                  #{@size_y},
         | 
| 44 | 
            -
                  [#{@default_box[:x1]}, #{@default_box[:y1]}, #{@default_box[:x2]}, #{@default_box[:y2]}],
         | 
| 45 | 
            -
                  #{@ratio}
         | 
| 46 | 
            -
                );"
         | 
| 47 | 
            -
              ) %>
         | 
| 48 | 
            -
            </div>
         | 
| 43 | 
            +
                <%= f.button _t("apply"), :class => 'button' %>
         | 
| 44 | 
            +
              <% end %>
         | 
| 49 45 | 
             
            <% end %>
         | 
| 46 | 
            +
            </div>
         | 
| @@ -1,8 +1,6 @@ | |
| 1 1 | 
             
            (function($) {
         | 
| 2 2 | 
             
              Alchemy.ImageCropper.destroy();
         | 
| 3 3 | 
             
              Alchemy.closeCurrentWindow();
         | 
| 4 | 
            -
              Alchemy.setElementDirty('#element_<%= @content.element.id  | 
| 5 | 
            -
             | 
| 6 | 
            -
              Alchemy.SortableContents('<%= form_authenticity_token -%>');
         | 
| 7 | 
            -
            <%- end -%>
         | 
| 4 | 
            +
              Alchemy.setElementDirty('#element_<%= @content.element.id %>');
         | 
| 5 | 
            +
              $('.thumbnail_background img', '#<%= content_dom_id(@content) %>').replaceWith('<%= essence_picture_thumbnail(@content, @options) %>');
         | 
| 8 6 | 
             
            })(jQuery);
         | 
| @@ -2,8 +2,7 @@ | |
| 2 2 | 
             
              h(content.essence.attachment.name),
         | 
| 3 3 | 
             
              alchemy.download_attachment_path(
         | 
| 4 4 | 
             
                :id => content.essence.attachment.id,
         | 
| 5 | 
            -
                :name => content.essence.attachment.urlname | 
| 6 | 
            -
                :format => content.essence.attachment.suffix
         | 
| 5 | 
            +
                :name => content.essence.attachment.urlname
         | 
| 7 6 | 
             
              ),
         | 
| 8 7 | 
             
              :class => "file_link #{content.essence.css_class.blank? ? "" : content.essence.css_class}",
         | 
| 9 8 | 
             
              :title => "#{content.essence.title.blank? ? content.essence.attachment.filename : content.essence.title}"
         | 
| @@ -38,24 +38,7 @@ | |
| 38 38 | 
             
                <div class="picture_image">
         | 
| 39 39 | 
             
                  <div class="thumbnail_background<%= ' missing' if content.ingredient.nil? %>">
         | 
| 40 40 | 
             
                    <%- if content.ingredient -%>
         | 
| 41 | 
            -
                     | 
| 42 | 
            -
                      :size => content.ingredient.cropped_thumbnail_size(content.essence.render_size.blank? ? options[:image_size] : content.essence.render_size),
         | 
| 43 | 
            -
                      :crop_from => content.essence.crop_from.blank? ? nil : content.essence.crop_from,
         | 
| 44 | 
            -
                      :crop_size => content.essence.crop_size.blank? ? nil : content.essence.crop_size,
         | 
| 45 | 
            -
                      :crop => content.essence.crop_size.blank? && content.essence.crop_from.blank? ? 'crop' : nil
         | 
| 46 | 
            -
                    } %>
         | 
| 47 | 
            -
                    <%= image_tag(
         | 
| 48 | 
            -
                      alchemy.thumbnail_path({
         | 
| 49 | 
            -
                        :id => content.ingredient.id,
         | 
| 50 | 
            -
                        :name => content.ingredient.urlname,
         | 
| 51 | 
            -
                        :sh => content.ingredient.security_token(image_options)
         | 
| 52 | 
            -
                      }.merge(image_options)),
         | 
| 53 | 
            -
                      :alt => content.ingredient.name,
         | 
| 54 | 
            -
                      :class => 'img_paddingtop',
         | 
| 55 | 
            -
                      :title => _t("image_name") + ": #{content.ingredient.name}",
         | 
| 56 | 
            -
                      :onload => "Alchemy.fadeImage(this, '##{content_dom_id(content)} .picture_content_spinner');",
         | 
| 57 | 
            -
                      :style => "display: none;"
         | 
| 58 | 
            -
                    ) %>
         | 
| 41 | 
            +
                    <%= essence_picture_thumbnail(content, options) %>
         | 
| 59 42 | 
             
                    <%= hidden_field_tag content.form_field_name(:picture_id), content.ingredient.id %>
         | 
| 60 43 | 
             
                    <% end %>
         | 
| 61 44 | 
             
                  </div>
         | 
| @@ -4,6 +4,7 @@ | |
| 4 4 | 
             
                <meta charset="UTF-8">
         | 
| 5 5 | 
             
                <title><%= render_alchemy_title %></title>
         | 
| 6 6 | 
             
                <%= csrf_meta_tag %>
         | 
| 7 | 
            +
                <meta name="robots" content="noindex">
         | 
| 7 8 | 
             
                <%= stylesheet_link_tag('alchemy/admin', :media => 'screen') %>
         | 
| 8 9 | 
             
                <%= stylesheet_link_tag('alchemy/print', :media => 'print') %>
         | 
| 9 10 | 
             
                <%= yield :stylesheets %>
         | 
| @@ -45,6 +45,7 @@ authorization do | |
| 45 45 | 
             
                has_permission_on :alchemy_admin_trash, :to => [:index, :clear]
         | 
| 46 46 | 
             
                has_permission_on :alchemy_admin_clipboard, :to => [:index, :insert, :remove, :clear]
         | 
| 47 47 | 
             
                has_permission_on :alchemy_admin_tags, :to => [:autocomplete]
         | 
| 48 | 
            +
                has_permission_on :alchemy_admin_dashboard, :to => [:info, :update_check]
         | 
| 48 49 | 
             
              end
         | 
| 49 50 |  | 
| 50 51 | 
             
              role :editor do
         | 
| @@ -197,6 +197,7 @@ de: | |
| 197 197 | 
             
                "Add global page": "Neue globale Seite"
         | 
| 198 198 | 
             
                "Adobe Website": "Adobe Webseite"
         | 
| 199 199 | 
             
                "Alchemy is open software and itself uses open software and free resources:": "Alchemy ist offene Software und benutzt selbst offene Software und freie Ressourcen:"
         | 
| 200 | 
            +
                "Alchemy is up to date": 'Alchemy ist aktuell'
         | 
| 200 201 | 
             
                "Change password": "Passwort ändern"
         | 
| 201 202 | 
             
                "Choose page": "Seite wählen"
         | 
| 202 203 | 
             
                "Cleared trash": "Der Papierkorb wurde geleert"
         | 
| @@ -408,7 +409,7 @@ de: | |
| 408 409 | 
             
                element_of_type: "Element"
         | 
| 409 410 | 
             
                element_saved: "Element wurde gespeichert."
         | 
| 410 411 | 
             
                enter_external_link: "Geben Sie hier die Adresse der Seite ein zu der Sie einen Link setzen wollen."
         | 
| 411 | 
            -
                explain cropping: "Sie können den Rahmen verschieben und in der Größe verändern um den Bildausschnitt festzulegen. Wenn Sie zufrieden sind, dann klicken Sie bitte auf speichern."
         | 
| 412 | 
            +
                'explain cropping': "Sie können den Rahmen verschieben und in der Größe verändern um den Bildausschnitt festzulegen. Wenn Sie zufrieden sind, dann klicken Sie bitte auf speichern."
         | 
| 412 413 | 
             
                explain_publishing: "Die gecachte Version vom Server löschen und die aktuellen Änderungen veröffentlichen"
         | 
| 413 414 | 
             
                explain_sitemap_dragndrop_sorting: "Tip: Halten Sie zum Sortieren der Seiten das Seitensymbol mit der Maus fest und bewegen Sie sie an ihre neue Position."
         | 
| 414 415 | 
             
                explain_unlocking: "Die Seite verlassen und für andere Benutzer zum Bearbeiten freigeben."
         | 
| @@ -456,6 +457,7 @@ de: | |
| 456 457 | 
             
                mail_to: "Empfängeradresse"
         | 
| 457 458 | 
             
                main_content: "Hauptinhalt"
         | 
| 458 459 | 
             
                male: "Herr"
         | 
| 460 | 
            +
                me: 'Ich'
         | 
| 459 461 | 
             
                medium_thumbnails: "mittlere Miniaturbilder"
         | 
| 460 462 | 
             
                meta_data: "Meta Daten"
         | 
| 461 463 | 
             
                meta_description: "Meta Beschreibung"
         | 
| @@ -618,6 +620,8 @@ de: | |
| 618 620 | 
             
                "Now drop the files": "Lassen Sie die Dateien nun los"
         | 
| 619 621 | 
             
                "Queued x files": "x Dateien in der Warteschlange."
         | 
| 620 622 | 
             
                complete: 'Abgeschlossen'
         | 
| 623 | 
            +
                "Update available": 'Es ist ein Update verfügbar'
         | 
| 624 | 
            +
                "Update status unavailable": 'Update Status konnte nicht ermittelt werden'
         | 
| 621 625 | 
             
                "Uploading": "Hochladen"
         | 
| 622 626 | 
             
                "Uploaded x files": "x Dateien hochgeladen."
         | 
| 623 627 |  | 
| @@ -249,6 +249,7 @@ en: | |
| 249 249 | 
             
                element_of_type: "Element"
         | 
| 250 250 | 
             
                element_saved: "Saved element."
         | 
| 251 251 | 
             
                enter_external_link: "Please enter the URL you want to link with"
         | 
| 252 | 
            +
                'explain cropping': "Move the frame and change its size to adjust the image section. Click on apply when you are satisfied."
         | 
| 252 253 | 
             
                explain_publishing: "Publish the page and remove the cached version from the server."
         | 
| 253 254 | 
             
                explain_sitemap_dragndrop_sorting: "Tip: Drag the pages at the icon in order to sort them."
         | 
| 254 255 | 
             
                explain_unlocking: "Leave page and unlock it for other users."
         | 
    
        data/config/routes.rb
    CHANGED
    
    | @@ -8,6 +8,10 @@ Alchemy::Engine.routes.draw do | |
| 8 8 |  | 
| 9 9 | 
             
              get '/admin/dashboard' => 'admin/dashboard#index',
         | 
| 10 10 | 
             
                    :as => :admin_dashboard
         | 
| 11 | 
            +
              get '/admin/dashboard/info' => 'admin/dashboard#info',
         | 
| 12 | 
            +
                    :as => :dashboard_info
         | 
| 13 | 
            +
              get '/admin/dashboard/update_check' => 'admin/dashboard#update_check',
         | 
| 14 | 
            +
                    :as => :update_check
         | 
| 11 15 |  | 
| 12 16 | 
             
              devise_scope :user do
         | 
| 13 17 | 
             
                get '/admin/login' => 'user_sessions#new', :as => :login
         | 
| @@ -34,7 +38,7 @@ Alchemy::Engine.routes.draw do | |
| 34 38 | 
             
              get '/admin/signup' => 'users#new', :as => :signup
         | 
| 35 39 | 
             
              post '/admin/signup' => 'users#create', :as => :signup
         | 
| 36 40 |  | 
| 37 | 
            -
              get '/attachment/:id/download(/:name) | 
| 41 | 
            +
              get '/attachment/:id/download(/:name)' => 'attachments#download',
         | 
| 38 42 | 
             
                    :as => :download_attachment
         | 
| 39 43 | 
             
              get '/attachment/:id/show' => 'attachments#show',
         | 
| 40 44 | 
             
                    :as => :show_attachment
         | 
    
        data/lib/alchemy/errors.rb
    CHANGED
    
    | @@ -42,4 +42,11 @@ module Alchemy | |
| 42 42 |  | 
| 43 43 | 
             
              class TinymceError < StandardError; end
         | 
| 44 44 |  | 
| 45 | 
            +
              class UpdateServiceUnavailable < StandardError
         | 
| 46 | 
            +
                # Raised it no succesful connection to GitHub was possible
         | 
| 47 | 
            +
                def message
         | 
| 48 | 
            +
                  "The update service is temporarily unavailable!"
         | 
| 49 | 
            +
                end
         | 
| 50 | 
            +
              end
         | 
| 51 | 
            +
             | 
| 45 52 | 
             
            end
         | 
    
        data/lib/alchemy/version.rb
    CHANGED
    
    
    
        data/lib/alchemy_cms.rb
    CHANGED
    
    
    
        data/lib/tasks/ferret.rake
    CHANGED
    
    | @@ -2,11 +2,8 @@ namespace :ferret do | |
| 2 2 |  | 
| 3 3 | 
             
              desc "Updates the Ferret index."
         | 
| 4 4 | 
             
              task :rebuild_index => :environment do
         | 
| 5 | 
            -
                puts "Rebuilding Ferret index for EssenceText"
         | 
| 6 5 | 
             
                Alchemy::EssenceText.where(:do_not_index => false).rebuild_index
         | 
| 7 | 
            -
                puts "Rebuilding Ferret index for EssenceRichtext"
         | 
| 8 6 | 
             
                Alchemy::EssenceRichtext.where(:do_not_index => false).rebuild_index
         | 
| 9 | 
            -
                puts "Completed Ferret index rebuild"
         | 
| 10 7 | 
             
              end
         | 
| 11 8 |  | 
| 12 9 | 
             
            end
         | 
| @@ -0,0 +1,27 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Alchemy
         | 
| 4 | 
            +
              describe Attachment do
         | 
| 5 | 
            +
             | 
| 6 | 
            +
                describe '#urlname' do
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                  context "with url characters in the filename" do
         | 
| 9 | 
            +
                    subject { Attachment.new(:filename => 'f#%&cking cute kitten pic.png') }
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                    it "should escape as uri" do
         | 
| 12 | 
            +
                      subject.urlname.should == 'f___cking_cute_kitten_pic.png'
         | 
| 13 | 
            +
                    end
         | 
| 14 | 
            +
                  end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                  context "with lot of dots in the name" do
         | 
| 17 | 
            +
                    subject { Attachment.new(:filename => 'cute.kitten.pic.png') }
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                    it "should convert dots in the name part into dashes" do
         | 
| 20 | 
            +
                      subject.urlname.should == 'cute-kitten-pic.png'
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
                  end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                end
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              end
         | 
| 27 | 
            +
            end
         | 
    
        data/spec/models/page_spec.rb
    CHANGED
    
    | @@ -736,6 +736,13 @@ module Alchemy | |
| 736 736 | 
             
                      subject.elements.should be_empty
         | 
| 737 737 | 
             
                    end
         | 
| 738 738 | 
             
                  end
         | 
| 739 | 
            +
             | 
| 740 | 
            +
                  context "with different page name given" do
         | 
| 741 | 
            +
                    subject { Page.copy(page, {:name => 'Different name'}) }
         | 
| 742 | 
            +
                    it "should take this name" do
         | 
| 743 | 
            +
                      subject.name.should == 'Different name'
         | 
| 744 | 
            +
                    end
         | 
| 745 | 
            +
                  end
         | 
| 739 746 | 
             
                end
         | 
| 740 747 |  | 
| 741 748 | 
             
              end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,8 +1,8 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: alchemy_cms
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2.5.0 | 
| 5 | 
            -
              prerelease:  | 
| 4 | 
            +
              version: 2.5.0
         | 
| 5 | 
            +
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| 8 8 | 
             
            - Thomas von Deyen
         | 
| @@ -13,7 +13,7 @@ authors: | |
| 13 13 | 
             
            autorequire: 
         | 
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 | 
            -
            date: 2013- | 
| 16 | 
            +
            date: 2013-02-04 00:00:00.000000000 Z
         | 
| 17 17 | 
             
            dependencies:
         | 
| 18 18 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 19 19 | 
             
              name: rails
         | 
| @@ -223,6 +223,22 @@ dependencies: | |
| 223 223 | 
             
                - - ~>
         | 
| 224 224 | 
             
                  - !ruby/object:Gem::Version
         | 
| 225 225 | 
             
                    version: 2.1.3
         | 
| 226 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 227 | 
            +
              name: jquery-ui-rails
         | 
| 228 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 229 | 
            +
                none: false
         | 
| 230 | 
            +
                requirements:
         | 
| 231 | 
            +
                - - ~>
         | 
| 232 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 233 | 
            +
                    version: 3.0.1
         | 
| 234 | 
            +
              type: :runtime
         | 
| 235 | 
            +
              prerelease: false
         | 
| 236 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 237 | 
            +
                none: false
         | 
| 238 | 
            +
                requirements:
         | 
| 239 | 
            +
                - - ~>
         | 
| 240 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 241 | 
            +
                    version: 3.0.1
         | 
| 226 242 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 227 243 | 
             
              name: attachment_magic
         | 
| 228 244 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -431,7 +447,7 @@ dependencies: | |
| 431 447 | 
             
                - - ! '>='
         | 
| 432 448 | 
             
                  - !ruby/object:Gem::Version
         | 
| 433 449 | 
             
                    version: '0'
         | 
| 434 | 
            -
            description: Alchemy is a  | 
| 450 | 
            +
            description: Alchemy is a powerful, userfriendly and flexible Rails 3 CMS.
         | 
| 435 451 | 
             
            email:
         | 
| 436 452 | 
             
            - alchemy@magiclabs.de
         | 
| 437 453 | 
             
            executables:
         | 
| @@ -610,7 +626,12 @@ files: | |
| 610 626 | 
             
            - app/views/alchemy/admin/contents/destroy.js.coffee
         | 
| 611 627 | 
             
            - app/views/alchemy/admin/contents/new.html.erb
         | 
| 612 628 | 
             
            - app/views/alchemy/admin/contents/order.js.erb
         | 
| 629 | 
            +
            - app/views/alchemy/admin/dashboard/_locked_pages.html.erb
         | 
| 630 | 
            +
            - app/views/alchemy/admin/dashboard/_recent_pages.html.erb
         | 
| 631 | 
            +
            - app/views/alchemy/admin/dashboard/_sites.html.erb
         | 
| 632 | 
            +
            - app/views/alchemy/admin/dashboard/_users.html.erb
         | 
| 613 633 | 
             
            - app/views/alchemy/admin/dashboard/index.html.erb
         | 
| 634 | 
            +
            - app/views/alchemy/admin/dashboard/info.html.erb
         | 
| 614 635 | 
             
            - app/views/alchemy/admin/elements/_add_picture.html.erb
         | 
| 615 636 | 
             
            - app/views/alchemy/admin/elements/_element.html.erb
         | 
| 616 637 | 
             
            - app/views/alchemy/admin/elements/_element_foot.html.erb
         | 
| @@ -953,6 +974,7 @@ files: | |
| 953 974 | 
             
            - spec/libraries/essence_spec.rb
         | 
| 954 975 | 
             
            - spec/libraries/resource_spec.rb
         | 
| 955 976 | 
             
            - spec/libraries/resources_helper_spec.rb
         | 
| 977 | 
            +
            - spec/models/attachment_spec.rb
         | 
| 956 978 | 
             
            - spec/models/cell_spec.rb
         | 
| 957 979 | 
             
            - spec/models/clipboard_spec.rb
         | 
| 958 980 | 
             
            - spec/models/content_spec.rb
         | 
| @@ -1101,16 +1123,19 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 1101 1123 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 1102 1124 | 
             
              none: false
         | 
| 1103 1125 | 
             
              requirements:
         | 
| 1104 | 
            -
              - - ! ' | 
| 1126 | 
            +
              - - ! '>='
         | 
| 1105 1127 | 
             
                - !ruby/object:Gem::Version
         | 
| 1106 | 
            -
                  version:  | 
| 1128 | 
            +
                  version: '0'
         | 
| 1129 | 
            +
                  segments:
         | 
| 1130 | 
            +
                  - 0
         | 
| 1131 | 
            +
                  hash: -4006673498087041620
         | 
| 1107 1132 | 
             
            requirements:
         | 
| 1108 1133 | 
             
            - ImageMagick (libmagick), v6.6 or greater.
         | 
| 1109 1134 | 
             
            rubyforge_project: 
         | 
| 1110 1135 | 
             
            rubygems_version: 1.8.24
         | 
| 1111 1136 | 
             
            signing_key: 
         | 
| 1112 1137 | 
             
            specification_version: 3
         | 
| 1113 | 
            -
            summary:  | 
| 1138 | 
            +
            summary: A powerful, userfriendly and flexible CMS for Rails 3
         | 
| 1114 1139 | 
             
            test_files:
         | 
| 1115 1140 | 
             
            - spec/alchemy_spec.rb
         | 
| 1116 1141 | 
             
            - spec/config_spec.rb
         | 
| @@ -1213,6 +1238,7 @@ test_files: | |
| 1213 1238 | 
             
            - spec/libraries/essence_spec.rb
         | 
| 1214 1239 | 
             
            - spec/libraries/resource_spec.rb
         | 
| 1215 1240 | 
             
            - spec/libraries/resources_helper_spec.rb
         | 
| 1241 | 
            +
            - spec/models/attachment_spec.rb
         | 
| 1216 1242 | 
             
            - spec/models/cell_spec.rb
         | 
| 1217 1243 | 
             
            - spec/models/clipboard_spec.rb
         | 
| 1218 1244 | 
             
            - spec/models/content_spec.rb
         |