Ticket #29 (closed task: fixed)

Opened 3 years ago

Last modified 3 years ago

create preview feature

Reported by: demian Assigned to: demian
Priority: for approval Milestone: 1.7
Component: component1 Keywords:
Cc:

Description

  • preview must appear as big button on top of 'overview' block on RHS of Content Edit screen
  • use ContentViewMgr.php from bugfix CMS, but map with /foo/bar/preview route (needs some cleanup)
  • a few things need to be configured for previews, we need to automate as much of this as possible
    • user must create their own theme, and must be selected in config under ContentViewMgr, eg:
      [ContentViewMgr]
      requiresAuth    = false
      theme = eureka
      
    • defaultMasterTemplates group must be used, currently set in cms.ini:
      [defaultMasterTemplates]
      foo = master.html  ; where foo is the example content type
      Eureka course = eurekaCourseMaster.html
      
    • the master template must automatically point to the theme's master template
    • currently for each content type you can assign a different master, but for starters all CTs can have the same master
    • the derivation of the CT name is exact, ie, if you name your content "Foo baR BAZ", it must appear exactly like this where in above example it appears "Eureka course"
    • a content type template should be automatically created for each new CT created
    • it should be stored in sgl/var/cms/content_types/my_content_type.html and be web editable (this is part of another ticket)
    • a template should be written out as follows by default, then the admin can customise it:
    <div>
        <h4>{this.plugin(#renderAttributeAlias#,oContent,#courseTitle#)}</h4>
        <h4>{oContent.courseSubtitle}</h4>

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#description#)}</h4>
        {oContent.description:h}

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#mainTopicsCoveredDuringThisTraining#)}</h4>
        {oContent.mainTopicsCoveredDuringThisTraining:h}

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#whatWillYouLearnByTheEndOfThisTraining#)}</h4>
        {oContent.whatWillYouLearnByTheEndOfThisTraining:h}

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#whoShouldAttend#)}</h4>
        {oContent.whoShouldAttend:h}

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#teachingMethod#)}</h4>
        {oContent.teachingMethod:h}

        <h4>{this.plugin(#renderAttributeAlias#,oContent,#courseDirector#)}</h4>
        {oContent.courseDirector:h}
    </div>
  • ie one CT heading, then Content instance body
  • replace h4's with h3's

Overall

  • the first time a user creates a new CT, then an instance of Content, a preview should be possible
  • if the user hasn't assigned a theme, use current default theme
  • we must think of a friendlier way to set the config then current Admin > Config > General, etc, etc

Other details:

  • preview must appear in a new window
  • at some point we can put a close button on new window

Change History

01/15/09 14:59:11 changed by demian

  • owner changed from lakiboy to demian.

01/15/09 15:13:06 changed by demian

  • owner changed from demian to glycol.

01/15/09 15:15:42 changed by demian

  • owner changed from glycol to lakiboy.

01/15/09 15:29:43 changed by demian

  • owner changed from lakiboy to demian.

01/15/09 15:30:15 changed by demian

  • owner changed from demian to lakiboy.

01/16/09 16:38:12 changed by demian

  • priority changed from major to critical.

01/17/09 13:35:35 changed by lakiboy

  • status changed from new to assigned.

01/22/09 15:04:39 changed by lakiboy

  • owner changed from lakiboy to demian.
  • priority changed from critical to for approval.
  • status changed from assigned to new.

Implemented in various commits, please, see timeline...

01/22/09 17:26:32 changed by demian

  • status changed from new to closed.
  • resolution set to fixed.