|
@@ -44,8 +44,40 @@
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
</form>
|
|
</form>
|
|
|
|
|
|
|
|
|
|
+ <form class="row form-horizontal m-t-15">
|
|
|
|
|
+ <fieldset class="col-xs-12">
|
|
|
|
|
+ <legend>Create template under <code>{{ parentPath(path) }}</code></legend>
|
|
|
|
|
+ <div class="d-flex create-page-input-container">
|
|
|
|
|
+ <div class="create-page-input-row d-flex align-items-center">
|
|
|
|
|
+ <select id="template-type" class="page-name-input form-control">
|
|
|
|
|
+ <option value="" disabled selected>Select tempate type</option>
|
|
|
|
|
+ <option value="local">Local Template(/@template) - Applies only to immediate decendant pages</option>
|
|
|
|
|
+ <option value="global">Global Template(/_template) - Applies to all decendant pages</option>
|
|
|
|
|
+ </select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="create-page-button-container">
|
|
|
|
|
+ <a id="link-to-template" href="{{ page.path }}"><button class="fcbtn btn btn-outline btn-rounded btn-primary btn-1b"><i class="icon-fw icon-doc"></i>{{ t('Create') }}</button></a>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </fieldset>
|
|
|
|
|
+ </form>
|
|
|
|
|
+
|
|
|
</div><!-- /.modal-body -->
|
|
</div><!-- /.modal-body -->
|
|
|
|
|
|
|
|
</div><!-- /.modal-content -->
|
|
</div><!-- /.modal-content -->
|
|
|
</div><!-- /.modal-dialog -->
|
|
</div><!-- /.modal-dialog -->
|
|
|
</div><!-- /.modal -->
|
|
</div><!-- /.modal -->
|
|
|
|
|
+<script>
|
|
|
|
|
+ const pagePath = $("#link-to-template").attr("href");
|
|
|
|
|
+
|
|
|
|
|
+ $('#template-type').on('change', () => {
|
|
|
|
|
+ if ($('#template-type').val() === 'local') {
|
|
|
|
|
+ href = pagePath + "/@template#edit-form";
|
|
|
|
|
+ $("#link-to-template").attr("href", href);
|
|
|
|
|
+ }
|
|
|
|
|
+ else if ($('#template-type').val() === 'global') {
|
|
|
|
|
+ href = pagePath + "/_template#edit-form";
|
|
|
|
|
+ $("#link-to-template").attr("href", href);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ </script>
|