summaryrefslogtreecommitdiff
path: root/app/helpers/content_helper.rb
AgeCommit message (Collapse)Author
9 daysFix docstring for the aggregate shortcodeerdgeist
12 daysAdd tree-position scoping to Page.aggregateerdgeist
New :children option ("direct" or "all") on the [aggregate] shortcode, composable with the existing :tags filter - both apply as independent successive .where clauses, ANDing together automatically, no special casing needed. content_helper.rb passes the current @page.node through as :node whenever :children is requested, since Page.aggregate has no way to resolve "which node" from the shortcode's bare option strings on its own. Guarded so nothing changes for any existing [aggregate] shortcode that never uses children= - :node stays nil, the new branch never fires. "all" resolves via node.descendants.pluck(:id) rather than embedding the descendants relation directly as a subquery. Not proven strictly necessary - extensive debugging this session initially pointed at a subquery/table-alias collision, but every actual failure traced instead to accumulated test-node debris left in the dev DB by earlier interrupted runs, confirmed by re-running against a cleaned database. Kept anyway as a one-round-trip-cheaper, more defensive default regardless.
2026-07-03Add weekday abbreviation for open-today widgeterdgeist
RruleHumanizer gains WEEKDAY_NAMES_ABBR (Mo/Di/Mi/...) alongside the existing WEEKDAY_NAMES and WEEKDAY_NAMES_ADVERBIAL hashes, plus a self.wday_abbr(time, locale) utility mapping a Time's wday to its RFC5545 code and looking up the abbreviation - keeping RFC5545 vocabulary in one place rather than teaching ContentHelper about day codes directly. ContentHelper#weekday_abbr is a thin wrapper passing I18n.locale through. The partial now renders "Fr 19:00" instead of just "19:00", joined with a non-breaking space so the pair can't split across a line wrap. Takes an explicit Time rather than reading Date.today, matching this file's existing style of passing state in rather than reading it ambiently - and staying correct if the currently-unused calendar/_front_page_calendar partial (spanning six weeks, not just today) is ever revived and reuses this helper.
2026-07-02Add 'open today' sidebar widget and open days in chapter listserdgeist
- open_erfas_today helper: samples 3 random open-day-tagged occurrences of the current day; widget hidden entirely on days without open chapters; heading shows current weekday - content/_open_erfas_today partial rendered in right column above tags and featured articles - _chapter partial: open-day schedules (event_schedule_text) shown inline in aggregated chapter lists with 'Offene Tage' label - ccc.css: open_erfas_today added to existing right-column widget selector groups (headings, lists, links)
2026-06-30Phase 2: chapter nodes, aggregate partial, fixeserdgeist
- _chapter.html.erb: new partial for erfa/chaostreff aggregated lists; renders title, location, external_url, sanitized body - content_helper: fix aggregate attr regex to allow hyphens in values (erfa-detail tag was silently dropped); add debug logging (remove) - page.rb: suppress libxml stderr noise in rewrite_links_in_body - db/seeds/chapters.rb: one-shot seed script for erfa and chaostreff chapter nodes under parent nodes 548/549; creates bilingual pages, external_url, primary events with RRULEs where known Note: run Node.rebuild!(false) after execution to fix lft/rgt values
2026-06-27Stage 7 click-testing fixeserdgeist
- aggregate: switch to shortcode syntax [aggregate ...]; fix paragraph wrapping by excising the shortcode and its surrounding <p> before sanitize, concatenating collection output outside sanitized content - page.rb: remove aggregate XML unwrapping from rewrite_links_in_body (no longer needed with shortcode approach) - rss builders: explicit CGI.escapeHTML on title/abstract; Builder 3.3.0 does not escape when target buffer is html_safe (ActionView default) - tinymce: disable menubar and promotion nag; add code plugin, remove paste plugin (built into TinyMCE 8 core); configure via admin_interface.js directly (config/tinymce.yml affects tinymce() helper only, not tinymce.init)
2026-06-24Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgradeerdgeist
- Converted plugins to gems (Gemfile) - Updated config structure (application.rb, boot.rb, environment.rb) - Converted routes to Rails 3 DSL - Converted named_scope to scope throughout models - Converted find(:all, :conditions) to where() chains - Fixed has_many :order to use ordering scope - Updated session store and secret token configuration - Fixed exception_notification middleware configuration - Patched Ruby 2.4 / Rails 3.2 incompatibilities: - Integer/Float duration arithmetic (ActiveSupport) - Arel visit_Integer for PostgreSQL adapter - create_database String/Integer coercion - ActionController consider_all_requests_local - Migrated taggings schema for acts-as-taggable-on - Replaced dynamic_form gem with custom form_error_messages helper - Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for) - Fixed admin layout yield - Updated test suite for Rails 3 APIs
2026-06-23Update deployed state to what's currently runningerdgeist
2025-01-28Big overhaul patch and style changesCharlie Root
2011-02-11reject events with no corresponding pagehukl
spaces
2009-11-08fixed typo - evilhukl
2009-10-17added sanitize statements to hopefully all critical templates to protect against cross site scripting.hukl
added section to environment.rb listing the whitelisted tags and attributes and examples on how to extend the list
2009-10-08enabled shadowbox for headline images on public pages. if js is disabled the regular html version is renderedhukl
2009-09-10show the next event if none are found for the next 14 days. Closes #19hukl
2009-09-07enabling featured articleshukl
2009-09-05added tag resource, widget and auxillary fileshukl
2009-09-04fixed the aggregate tag parsinghukl
2009-09-03took almost an hour to find the reason for the invalid html! anyway - fixed now!hukl
2009-09-01added expirimental routing for image galerieshukl
added plain image gallery template refinements
2009-08-15added pagination for aggregators. costed me the whole day. crappy plugins ARGH! More work to do!hukl
2009-08-15order of menu items sethukl
2009-08-08added dynamic main menuhukl
2009-07-19intermediate commit introducing main menu and calendar widget which will get refactored soon. need another feature firsthukl
2009-03-04minor fixeshukl
2009-03-03introducing page templates - need to add edit capabilitieshukl
renamed the custom template folder forgot one fix for the new custom template path page templates refined renamed page attribute template to template_name as i suspected it to be a reserved word. it still didn't work until i discovered that simon defined the accessible attributes! That costed me 40 minutes of lifetime. But he apologized ;) tests for public and custom page templates
2009-03-03no need to hand the page to the helperhukl
2009-03-03setting the title tag dynamicallyhukl
2009-02-28added author_for_page to content_helperhukl
2009-02-28added custom partials to aggregators, added test and refactored some methodshukl
2009-02-03added lots of comments to describe what thehukl
methods are doing. this will get everyone a better start. I hope
2009-02-02refactored the whole tagging thing. now usinghukl
acts_as_taggable_on_steroids instead of a homebrew solution
2009-02-02made the whole aggregate helper exception safe byhukl
always falling back to the original content if something went wrong. only executing substitution if tag is found
2009-02-01added first careful steps for aggregationhukl
2009-02-01split up the rendering a bithukl
2009-01-29added the content controller which will be responsible for rendering all public pages later on. added a new custom route for the public url schema as well ↵hukl
as a functional test which tests the correct mapping of the custom route