Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1313

Add support for copying content blocks between themes

    XMLWordPrintable

    Details

    • Type: Feature Request
    • Status: Needs Review
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 5.3.0-B1
    • Component/s: CMS
    • Labels:
      None
    • Change Log Group:
      Added
    • Change Log Message:
      Allow copying content block data between themes.
    • Story Points:
      2
    • Sprint:
      In-Portal's First Sprint, In-Portal's 2nd Sprint, In-Portal's 3rd Sprint, In-Portal's 4th Sprint
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

      Description

      1. Add new "Copy Data From" toolbar button to "Themes" grid.
      2. Once button is clicked a dropdown will open (see how it's down in catalog with product creation toolbar button) with a list of all themes.
      3. Button would be only enabled if at least 1 theme is selected.
      4. Once source theme in selected from toolbar button menu, then new theme:OnCopyData event will be called.
      5. New event will do following for each of themes selected in grid:
        • Look for matching templates between source & target themes to verify that 2 themes really have relationship (target theme at some point was copied from source theme and then have evolved).
        • If no matching themplates found remember theme_id somewhere locally:
          • A the end if some of themes weren't matched use $event->setRedirectParam method to put a note to url.
          • On theme list show alert with problematic themes if error is present in url.
        • If match was found:
          • Delete all content blocks (see below on how to locate them), from target theme theme.
          • Create mapping between Categories, associated with matching templates.
          • For each template get latest revision of all content blocks of each page and create revision #1 for matching category in target theme.
          • Only copy content blocks from physical template, since content blocks from virtual templates are shared between themes anyway.
        • Each category has ThemeId with associated theme ID. Then we need to take Template column of category and match it to corresponding record from ThemeFiles table. Content blocks are bound to category & page revision, so it's now possible to get them just knowing theme's template.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Time Spent - 1h 2m Remaining Estimate - 6h 50m
                  6h 50m
                  Logged:
                  Time Spent - 1h 2m Remaining Estimate - 6h 50m
                  1h 2m