Sha256: d9ddc88b9581d8ca9449d599eb03b67bcafcda6bdf7cfa85c96c9937393dada5

Contents?: true

Size: 1.96 KB

Versions: 29

Compression:

Stored size: 1.96 KB

Contents

<%
  cbNumColumns = 0;
  cbColWidth = 170;
  cbColHeight = 200;
  cbBorderWidth = 1;
  cbColWidthFull = 172;
-%>
<%= javascript_tag <<-EOF
  dojo.require("dojo.widget.*");
  dojo.require("dojo.widget.Dialog");
  
  cbColWidth = '#{cbColWidth}px';
  cbColHeight = '#{cbColHeight}px';
  cbBorderWidth = '#{cbBorderWidth}px';
  cbColWidthFull = '#{cbColWidthFull}';
EOF
%>

<div id="columnBrowserContainer" style="width: 100%; height: <%= cbColHeight + 20 %>px; overflow: auto;">
  <div id="columnBrowser" style="width: <%= cbColWidthFull * (@page_levels.size) %>px;">
    <% @page_levels.each_with_index do |name, i| %>
      <%
        if !name.blank?
          @path << '/' if !@path.blank?
          @path << name
        end
        @parent = @page
        @page = CmsPage.find_by_path @path
        @page_level = i
        @pages = @parent.children if @parent
        
        break_flag = false
        
        if !@page
          if @parent && @parent.children.first
            @page = @parent.children.first
          elsif @parent
            @page = @parent
          else
            @page = CmsPage.find(:first)
          end
          break_flag = true
        end
      -%>
      <div id="columnBrowserLevel<%= i %>" style="width: <%= cbColWidth %>px; height: <%= cbColHeight %>px; overflow: auto; float: left; border: <%= cbBorderWidth %>px solid gray;">
        <% if i == 0 -%>
          <%= render :partial => 'list_page_select', :locals => { :list_page_select => CmsPage.find(1) } %>
        <% else -%>
          <%= render :partial => 'list_pages_select' %>
        <% end -%>
        <%= javascript_tag "$('cb_item_#{@parent.id}').className = 'cb_item cb_item_selected';" if @parent %>
      </div>
      <%- break if break_flag -%>
    <% end -%>
  </div>
</div>
<%= javascript_tag "cbNumColumns = #{@page_levels.size - 1}; try { $('columnBrowserContainer').scrollLeft = $('columnBrowserContainer').scrollWidth; } catch (e) {}; $('page_browser_selection').value = '/#{@page.path}';" %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
imagine_cms-5.2.1 app/views/manage/cms_pages/select_page.html.erb
imagine_cms-5.2.0 app/views/manage/cms_pages/select_page.html.erb
imagine_cms-4.2.4 app/views/management/cms/select_page.html.erb
imagine_cms-4.1.4 app/views/management/cms/select_page.html.erb
imagine_cms-4.2.3 app/views/management/cms/select_page.html.erb
imagine_cms-4.2.2 app/views/management/cms/select_page.html.erb
imagine_cms-4.2.1 app/views/management/cms/select_page.html.erb
imagine_cms-4.2.0 app/views/management/cms/select_page.html.erb
imagine_cms-4.1.3 app/views/management/cms/select_page.html.erb
imagine_cms-4.1.2 app/views/management/cms/select_page.html.erb
imagine_cms-4.1.1 app/views/management/cms/select_page.html.erb
imagine_cms-4.1.0 app/views/management/cms/select_page.html.erb
imagine_cms-4.0.1 app/views/management/cms/select_page.html.erb
imagine_cms-4.0.0 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.33 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.32 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.31 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.30 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.29 app/views/management/cms/select_page.html.erb
imagine_cms-3.0.28 app/views/management/cms/select_page.html.erb