Note that there are some explanatory texts on larger screens.

plurals
  1. POProjector Orchard CMS and widget
    primarykey
    data
    text
    <p><em>I)</em> Imagine that I created a projector get a list of content types (<strong>Course</strong> in my case) and display it.</p> <p>The Create new course should satisfy 3 conditions:</p> <ol> <li><p>I would like to add new elements on this list using jQuery AJAX calls, including data validation on client and server side, and reusing the code of the data annotation at the Models.</p></li> <li><p>Before make the AJAX call, a pop-up dialog using jQuery UI appears, just like represented in the picture bellow: <img src="https://i.stack.imgur.com/VAjqb.png" alt="pop-up create new course"></p></li> <li><p>but I would like to add just a button on the left side of projector course list, this button would pop-up a dialog with a form and it would create a new element (if valid) for this projector using AJAX.</p></li> </ol> <p><em>II)</em> We 3 different projects that are participating on that <em>case scenario</em>:</p> <ul> <li><p><code>Course</code> - Is where I define the <strong>Course Content Type</strong> and a partial view <code>CreateCourse.cshtml</code> file where you can find the HTML template to create the form using jQuery UI dialog. </p> <p>At this project you can also find the Controller to <code>CourseController</code> with the action <code>CreateCourse</code> that call a service to create the new Course Content Type.</p></li> <li><p><code>Orchard.Projections</code> - Is where the Projector is defined.</p></li> <li><p><code>Orchard.Web</code> - Is where the theme is defined, and where I can possibly have an alternate of this projection, just adding a <strong>Create Item</strong> button in it, referencing the partial view <code>CreateCourse.cshtml</code> in Course project.</p></li> </ul> <p><strong>PROBLEM:</strong> I believe that most of my problems are architectural.</p> <p>First question, is there a better approach than explained in <em>II)</em>. If yes, please let me know.</p> <p>Considering that <em>II)</em> is the best approach:</p> <p>I would like to know witch alternate should I override at the <code>~\Orchard.Web\Themes\[Theme Name]\Views\[AlternateName].cshtml</code> to add the button at the top of the projector list.</p> <p>Is it possible to call the partial view on the <code>~\Course/Views/Shared/CreateCourse.cshtml</code> from the alternate ?</p> <p>Best regards</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload