From d11cce11a8e51f1fa2d91c8b37372b57474ddc00 Mon Sep 17 00:00:00 2001 From: revalidate Date: Fri, 5 Feb 2016 11:08:40 -0800 Subject: [PATCH 1/4] fixed sidebar styles --- app/views/admin/sidebar/Find Results | 2771 +++++++++++++++++ .../app/views/amazon_sidebar/Find Results | 16 + .../views/archives_sidebar/_content.html.erb | 4 +- 3 files changed, 2789 insertions(+), 2 deletions(-) create mode 100644 app/views/admin/sidebar/Find Results create mode 100644 lib/amazon_sidebar/app/views/amazon_sidebar/Find Results diff --git a/app/views/admin/sidebar/Find Results b/app/views/admin/sidebar/Find Results new file mode 100644 index 000000000..3f31142e1 --- /dev/null +++ b/app/views/admin/sidebar/Find Results @@ -0,0 +1,2771 @@ +Searching 1503 files for "sidebar" + +/Users/reva/dev/publify_debugging_lab/.rubocop_todo.yml: + 171 Style/SingleLineBlockParams: + 172 Exclude: + 173: - 'lib/tag_sidebar/lib/tag_sidebar.rb' + 174 + +/Users/reva/dev/publify_debugging_lab/CHANGELOG.md: + 54 * Changed navbar to dropdown onhover (jacemonje) + 55 * Improve Publify's default templates + 56: * Fix sidebar administration (mvz) + 57 * Various cleanups and improvements of code and specs + 58 * Fix several vulnerabilities reported by brakeman (mvz) + .. + 114 * Fix finders in migrations + 115 * Match files as generated by Rails 4.1 + 116: * Remove unused Sidebar methods + 117: * Introduce `valid` scope to find Sidebars safely + 118 * Remove unused methods + 119 * Wrap long comment + ... + 127 * Replace should contain with should match + 128 * Fix usage of have_selector matcher + 129: * Make sidebar generator Rails 3 compliant. + 130 * Declare assets for precompilation + 131 * Allow GET to /setup + ... + 180 * Fixes that very annoying bug in the editor save bar. + 181 * Fixing a bug where the article content is displayed twice when using the more tag. + 182: * Encloses the sidebar admin help text in a blue block (like every help text). Also fixes the style on the per widget submit button + removes button class on the cancel link (this should be the default) + 183 * Removes the btn class on cancel + 184 * Enables the close icon on the help messages + +/Users/reva/dev/publify_debugging_lab/README.md: + 103 ##The Bugs + 104 + 105: A number of issues have been added to the main github repo. Please fix each bug on its own branch (e.g. `fix_sidebar_styles`). + 106 + 107 > Make sure to visit the `issues` section of this repo for more detailed bug descriptions + screenshots. + 108 + 109: ####Issue \#1: Inconsistent Sidebar Styles + 110: * All titles in the sidebar should have `monospace` style font + 111 * All bullets should be circles. + 112 + ... + 117 The http://localhost:3000/users/sign_in page shows `= 9000 + 52: Sidebar.available_sidebars[sidebar_id - 9000].new + 53 else + 54: Sidebar.valid.find(sidebar_id) + 55 end + 56: sidebar.update_attributes(staged_position: staged_index) + 57 end + 58 end + 59 + 60: @ordered_sidebars = Sidebar.ordered_sidebars + 61: @available = Sidebar.available_sidebars + 62 respond_to do |format| + 63 format.js do + 64: render json: { html: render_to_string('admin/sidebar/_config.html.erb', layout: false) } + 65 end + 66 format.html do + 67: return redirect_to admin_sidebar_index_path + 68 end + 69 end + .. + 72 protected + 73 + 74: # TODO: Rename and move to a AdminSidebarHelpers module. Or use in instance variable. + 75 def available + 76: ::Sidebar.available_sidebars + 77 end + 78 + +/Users/reva/dev/publify_debugging_lab/app/helpers/application_helper.rb: + 9 attr_reader :page_title + 10 + 11: def render_sidebars(*sidebars) + 12: rendered_sidebars = (sidebars.blank? ? Sidebar.order(:active_position) : sidebars).map do |sb| + 13: @sidebar = sb + 14 sb.parse_request(content_array, params) + 15: render_sidebar(sb) + 16 end + 17: safe_join rendered_sidebars + 18 rescue => e + 19 logger.error e + 20 logger.error e.backtrace.join("\n") + 21: I18n.t('errors.render_sidebar') + 22 end + 23 + 24: def render_sidebar(sidebar) + 25: if sidebar.view_root + 26: render_deprecated_sidebar_view_in_view_root sidebar + 27 else + 28: render_to_string(partial: sidebar.content_partial, locals: sidebar.to_locals_hash, layout: false).html_safe + 29 end + 30 end + 31 + 32: def render_deprecated_sidebar_view_in_view_root(sidebar) + 33: logger.warn "Sidebar#view_root is deprecated. Place your _content.html.erb in views/sidebar_name/ in your plugin's folder" + 34: # Allow themes to override sidebar views + 35: view_root = File.expand_path(sidebar.view_root) + 36 rails_root = File.expand_path(::Rails.root.to_s) + 37 if view_root =~ /^#{Regexp.escape(rails_root)}/ + .. + 42 view_root = new_root if File.exist?(File.join(new_root, 'content.rhtml')) + 43 end + 44: render_to_string(file: "#{view_root}/content.rhtml", locals: sidebar.to_locals_hash, layout: false).html_safe + 45 end + 46 + +/Users/reva/dev/publify_debugging_lab/app/helpers/admin/base_helper.rb: + 6 end + 7 + 8: def class_for_admin_state(sidebar, this_position) + 9: case sidebar.admin_state + 10 when :active + 11 return 'active alert-info' + 12 when :will_change_position + 13: if this_position == sidebar.active_position + 14 return 'will_change ghost' + 15 else + .. + 17 end + 18 else + 19: raise sidebar.admin_state.inspect + 20 end + 21 end + +/Users/reva/dev/publify_debugging_lab/app/helpers/sidebars/plugin_helper.rb: + 1: module Sidebars::PluginHelper + 2 end + 3 + +/Users/reva/dev/publify_debugging_lab/app/models/ability.rb: + 25 can :manage, 'admin/seo' + 26 can :manage, 'admin/settings' + 27: can :manage, 'admin/sidebar' + 28 can :manage, 'admin/textfilters' + 29 can :manage, 'admin/themes' + +/Users/reva/dev/publify_debugging_lab/app/models/blog.rb: + 23 + 24 has_many :redirects + 25: has_many :sidebars, ->() { order('active_position ASC') } + 26 + 27 attr_accessor :custom_permalink + +/Users/reva/dev/publify_debugging_lab/app/views/admin/dashboard/_overview.html.erb: + 15 <% if can? :index, 'admin/themes' %> + 16

+ 17: <%= t(".customization_explain_html", theme_link: link_to(t(".change_your_blog_presentation"), controller: 'themes'), sidebar_link: link_to(t(".enable_plugins"), controller: 'sidebar')) %> + 18

+ 19 <% end %> + +/Users/reva/dev/publify_debugging_lab/app/views/admin/shared/_menu.html.erb: + 2 + 11: