rapila / plugin-journal

The journal (blog) plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple/single mode for Journal

juergmessmer opened this issue · comments

It would be nice to use the Journal (duplicate of #1)
• in a single journal (on topic) mode
• or in a multiple topic mode (that would cover a basic need of categories also)

Of course this would affect quite a few things

Journal filter

• the query code would have to be refactored to make it work for JournalId = int or null. This would allow to make the query code also Propel 2 compatible.

Journal page type

• All the widgets would have to be refactored to be able to handle single or multiple (null?) journals
• A new JournalWidget (Topics) could be added and displayed per configuration in the sidebar
• Allow mixed configuration on one site? (Journal page 1: multiple, Journal page 2 single). This would require further attention in all related queries

JournalEntry detail

• display and process journal dropdown (journal_input) if Journal is in multiple mode
• add create/edit button to this select to easily create and edit new journals (topics).

Journal configuration

• this change would allow to remove the not very useful "configuration" tab.
• this configuration can be simply replaced by a create/edit button next to the journal dropdown in the tab "Page configuration" (options: all existing years + multiple mode option)

Last but not least I suggest to gently redesign the "Page configuration" and make 3 clearly distinguishable sections
• Journal entries display
• Comment handling
• Widget configuration

We decided to:

  • Use multiple (at least one) journal ids per page, using a multiselect to configure.
  • Try to have as few special-cased code paths as possible by always using an array for journal id.
  • Do not restrict onto how many pages a journal can be configured.

This means journals have to be configured and can't be added "on-the-fly" within the Journal entry detail (advantage: requires careful consideration).

Special care should be exercised pertaining to the following areas:

  • The blog_journal_id page property has to be split by the comma wherever used.
  • Journal->getJournalPage will have to be re-worked to work with this change. Either by splitting in SQL or by matching all four cases (id at the beginning, followed by a comma/id as only value/id at the end, preceded by a comma, id in the middle, followed and preceded by a comma).

Is implemented with d167e93 incl all missing files and bugfixes a421322

Tasks remaining:

  • JournalsWidget (journal list in multiple journal usage) correct links
    • CRUD actions on the edit_journal_button need to be more transparent and deletion implemented. The entries of the journals-dropdown are edited if only one is selected, otherwise a new one is created.

Thorough testing is also required and the roadmap discussed regarding improvement of admin

  • improve performance in admin, maybe by preventing that whole config part has to be loaded if only content management needs to be done.
  • how to handle journals with hundreds of entries (search, find, sort, filter)
  • discuss the possibility of creating detail widgets in preview there were we need to edit text, comment etc.

I added the proper add/remove journal_id to the JournalsWidget.

Reopened because closing was premature