|
1 | | -<script type="text/javascript" src="<?php echo $this->config->item('staticPath'); ?>/js/templates.js" /></script> |
2 | | - |
3 | 1 | <form method="post" action="<?php echo site_url($this->uri->uri_string()); ?>" class="default"> |
4 | 2 |
|
5 | | - <h1 class="headingleft">Add Template <small>(<a href="<?php echo site_url('/admin/pages/templates'); ?>">Back to Templates</a>)</small></h1> |
| 3 | +<!-- Content Header (Page header) --> |
| 4 | +<section class="content-header"> |
| 5 | + <h1> |
| 6 | + Pages : |
| 7 | + <small>Add Template</small> |
| 8 | + </h1> |
| 9 | + <ol class="breadcrumb"> |
| 10 | + <li><a href="<?= site_url('admin/pages'); ?>"><i class="fa fa-paint-brush"></i> Pages</a></li> |
| 11 | + <li class="active">Add Template</li> |
| 12 | + </ol> |
| 13 | +</section> |
6 | 14 |
|
7 | | - <div class="headingright"> |
8 | | - <input type="button" id="default" value="Reset to Default" class="button blue" /> |
9 | | - <input type="submit" value="Save Changes" class="button" /> |
10 | | - </div> |
| 15 | +<!-- Main content --> |
| 16 | +<section class="content container-fluid"> |
11 | 17 |
|
12 | | - <div class="clear"></div> |
| 18 | + <section class="content"> |
13 | 19 |
|
14 | | - <?php if ($errors = validation_errors()): ?> |
15 | | - <div class="error"> |
16 | | - <?php echo $errors; ?> |
| 20 | + <div class="row"> |
| 21 | + <div class="pull-left"> |
| 22 | + <a href="<?= site_url('/admin/pages/templates');?>" class="btn btn-crey margin-bottom" style="margin-left: 15px;">Back to Templates</a> |
| 23 | + </div> |
| 24 | + <div class="col-md-6 pull-right"> |
| 25 | + <input type="submit" value="Save Changes" name="save" id="save" class="btn btn-green margin-bottom save" /> |
| 26 | + <input type="button" value="Reset to Default" id="default" class="btn btn-blue margin-bottom" /> |
| 27 | + </div> |
17 | 28 | </div> |
18 | | - <?php endif; ?> |
19 | | - |
20 | | - <div class="showModuleName"> |
21 | | - <label for="templateName">Name:</label> |
22 | | - <?php echo @form_input('templateName',set_value('templateName', $data['templateName']), 'id="templateName" class="formelement"'); ?> |
23 | | - <br class="clear" /> |
24 | | - </div> |
25 | | - |
26 | | - <label for="moduleSelect">Module:</label> |
27 | | - <?php |
28 | | - $values = array(); |
29 | | - $values[''] = 'Not a module template'; |
30 | | - $values['!'] = '---------------------------'; |
31 | | - if (@in_array('blog', $this->permission->permissions)) $values['!blog'] = 'Blog'; |
32 | | - if (@in_array('blog', $this->permission->permissions)) $values['blog'] = '-- View Posts'; |
33 | | - if (@in_array('blog', $this->permission->permissions)) $values['blog_single'] = '-- Single Post'; |
34 | | - if (@in_array('blog', $this->permission->permissions)) $values['blog_search'] = '-- Blog Search Results'; |
35 | | - if (@in_array('community', $this->permission->permissions)) $values['!community'] = 'Community'; |
36 | | - if (@in_array('community', $this->permission->permissions)) $values['community_account'] = '-- Account'; |
37 | | - if (@in_array('community', $this->permission->permissions)) $values['community_create_account'] = '-- Create Account'; |
38 | | - if (@in_array('community', $this->permission->permissions)) $values['community_forgotten'] = '-- Forgotten Password'; |
39 | | - if (@in_array('community', $this->permission->permissions)) $values['community_home'] = '-- Home (My Profile)'; |
40 | | - if (@in_array('community', $this->permission->permissions)) $values['community_login'] = '-- Login'; |
41 | | - if (@in_array('community', $this->permission->permissions)) $values['community_members'] = '-- Members'; |
42 | | - if (@in_array('community', $this->permission->permissions)) $values['community_messages'] = '-- Messages'; |
43 | | - if (@in_array('community', $this->permission->permissions)) $values['community_messages_form'] = '-- Messages Form'; |
44 | | - if (@in_array('community', $this->permission->permissions)) $values['community_messages_popup'] = '-- Messages Popup'; |
45 | | - if (@in_array('community', $this->permission->permissions)) $values['community_messages_read'] = '-- Messages Read'; |
46 | | - if (@in_array('community', $this->permission->permissions)) $values['community_reset'] = '-- Reset Password'; |
47 | | - if (@in_array('community', $this->permission->permissions)) $values['community_view_profile'] = '-- View Profile'; |
48 | | - if (@in_array('community', $this->permission->permissions)) $values['community_view_profile_private'] = '-- View Private Profile'; |
49 | | - if (@in_array('events', $this->permission->permissions)) $values['!events'] = 'Events'; |
50 | | - if (@in_array('events', $this->permission->permissions)) $values['events'] = '-- View Events'; |
51 | | - if (@in_array('events', $this->permission->permissions)) $values['events_single'] = '-- Single Event'; |
52 | | - if (@in_array('events', $this->permission->permissions)) $values['events_featured'] = '-- Featured Events'; |
53 | | - if (@in_array('events', $this->permission->permissions)) $values['events_search'] = '-- Events Search Results'; |
54 | | - if (@in_array('forums', $this->permission->permissions)) $values['!forums'] = 'Forums'; |
55 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums'] = '-- Forums List'; |
56 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_delete'] = '-- Delete Forum'; |
57 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_forum'] = '-- View Forum'; |
58 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_post_reply'] = '-- Post Reply'; |
59 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_post_topic'] = '-- Post Topic'; |
60 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_search'] = '-- Forums Search Results'; |
61 | | - if (@in_array('forums', $this->permission->permissions)) $values['forums_topic'] = '-- View Topic'; |
62 | | - if (@in_array('shop', $this->permission->permissions)) $values['!shop'] = 'Shop'; |
63 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_account'] = '-- Account (Shop)'; |
64 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_browse'] = '-- Browse Products'; |
65 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_cancel'] = '-- Cancel Purchase'; |
66 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_cart'] = '-- Shopping Cart'; |
67 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_checkout'] = '-- Checkout'; |
68 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_create_account'] = '-- Create Account (Shop)'; |
69 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_donation'] = '-- Successful Donation'; |
70 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_featured'] = '-- Featured Products'; |
71 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_forgotten'] = '-- Forgotten Password (Shop)'; |
72 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_login'] = '-- Login (Shop)'; |
73 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_orders'] = '-- Orders'; |
74 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_prelogin'] = '-- Pre-login'; |
75 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_product'] = '-- View Product'; |
76 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_recommend'] = '-- Recommend Product'; |
77 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_reset'] = '-- Reset Password (Shop)'; |
78 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_review'] = '-- Review Product'; |
79 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_subscriptions'] = '-- Subscriptions'; |
80 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_success'] = '-- Successful Transaction'; |
81 | | - if (@in_array('shop', $this->permission->permissions)) $values['shop_view_order'] = '-- View Order'; |
82 | | - if (@in_array('wiki', $this->permission->permissions)) $values['!wiki'] = 'Wiki'; |
83 | | - if (@in_array('wiki', $this->permission->permissions)) $values['wiki'] = '-- Browse Pages'; |
84 | | - if (@in_array('wiki', $this->permission->permissions)) $values['wiki_form'] = '-- Edit Page'; |
85 | | - if (@in_array('wiki', $this->permission->permissions)) $values['wiki_page'] = '-- View Page'; |
86 | | - if (@in_array('wiki', $this->permission->permissions)) $values['wiki_search'] = '-- Wiki Search Results'; |
87 | | - |
88 | | - $values['custom'] = 'Custom Module'; |
89 | | - |
90 | | - echo @form_dropdown('moduleSelect',$values, (($data['templateName'] == 'custom') ? 'custom' : $data['modulePath']), 'id="moduleSelect" class="formelement" rel="'.site_url('/admin/pages/module').'"'); |
91 | | - ?> |
92 | | - <span class="tip">To make a module template (e.g. for the Blog) select the module here.</span> |
93 | | - <br class="clear" /> |
94 | | - |
95 | | - <div class="showModulePath"> |
96 | | - <label for="modulePath">Module Reference:</label> |
97 | | - <?php echo @form_input('modulePath',set_value('modulePath', $data['modulePath']), 'id="modulePath" class="formelement"'); ?> |
98 | | - <br class="clear" /> |
99 | | - </div> |
100 | | - |
101 | | - <div class="autosave"> |
102 | | - <script src="<?= site_url('static/themes/assets/editors/ckeditor/ckeditor.js'); ?>"></script> |
103 | | - <?php echo @form_textarea('body',set_value('body', $data['body']), 'id="body" class="code editor"'); ?> |
104 | | - <script type="text/javascript" > |
105 | | - <?=$this->config->item('settingsTemplates')?> |
106 | | - </script> |
107 | | - <br class="clear" /> |
108 | | - </div> |
109 | | - <br /> |
110 | | - |
111 | | - <p class="clear" style="text-align: right;"><a href="#" class="button grey" id="totop">Back to top</a></p> |
112 | | - |
113 | | -</form> |
| 29 | + |
| 30 | + |
| 31 | + <div class="row extra-padding"> |
| 32 | + |
| 33 | + <div class="box box-crey"> |
| 34 | + <div class="box-header with-border"> |
| 35 | + <i class="fa fa-paint-brush"></i> |
| 36 | + <h3 class="box-title">Templates / Themes</h3> |
| 37 | + </div><!-- End box header --> |
| 38 | + |
| 39 | + <div class="box-body"> |
| 40 | + |
| 41 | + <div class="hidden"> |
| 42 | + <p class="hide"><a href="#">x</a></p> |
| 43 | + <div class="inner"></div> |
| 44 | + </div> |
| 45 | + |
| 46 | + <div class="clear"></div> |
| 47 | + |
| 48 | + <?php if ($errors = validation_errors()): ?> |
| 49 | + <div class="callout callout-danger"> |
| 50 | + <h4>Warning!</h4> |
| 51 | + <?php echo $errors; ?> |
| 52 | + </div> |
| 53 | + <?php endif; ?> |
| 54 | + |
| 55 | + <?php if (isset($message)): ?> |
| 56 | + <div class="callout callout-info"> |
| 57 | + <h4>Notice</h4> |
| 58 | + <?php echo $message; ?> |
| 59 | + </div> |
| 60 | + <?php endif; ?> |
| 61 | + |
| 62 | + <div class="showModuleName"> |
| 63 | + <label for="templateName">Name:</label> |
| 64 | + <?php echo @form_input('templateName',set_value('templateName', $data['templateName']), 'id="templateName" class="formelement"'); ?> |
| 65 | + <br class="clear" /> |
| 66 | + </div> |
| 67 | + |
| 68 | + <br /> |
| 69 | + |
| 70 | + <label for="moduleSelect">Module:</label> |
| 71 | + <?php |
| 72 | + // we should really be grabbing avalible module values |
| 73 | + // not this temp mess... |
| 74 | + $values = array(); |
| 75 | + $values[''] = 'Not a module template'; |
| 76 | + $values['!'] = '---------------------------'; |
| 77 | + if (@in_array('blog', $this->permission->permissions)) $values['!blog'] = 'Blog'; |
| 78 | + if (@in_array('blog', $this->permission->permissions)) $values['blog'] = '-- View Posts'; |
| 79 | + if (@in_array('blog', $this->permission->permissions)) $values['blog_single'] = '-- Single Post'; |
| 80 | + if (@in_array('blog', $this->permission->permissions)) $values['blog_search'] = '-- Blog Search Results'; |
| 81 | + if (@in_array('community', $this->permission->permissions)) $values['!community'] = 'Community'; |
| 82 | + if (@in_array('community', $this->permission->permissions)) $values['community_account'] = '-- Account'; |
| 83 | + if (@in_array('community', $this->permission->permissions)) $values['community_create_account'] = '-- Create Account'; |
| 84 | + if (@in_array('community', $this->permission->permissions)) $values['community_forgotten'] = '-- Forgotten Password'; |
| 85 | + if (@in_array('community', $this->permission->permissions)) $values['community_home'] = '-- Home (My Profile)'; |
| 86 | + if (@in_array('community', $this->permission->permissions)) $values['community_login'] = '-- Login'; |
| 87 | + if (@in_array('community', $this->permission->permissions)) $values['community_members'] = '-- Members'; |
| 88 | + if (@in_array('community', $this->permission->permissions)) $values['community_messages'] = '-- Messages'; |
| 89 | + if (@in_array('community', $this->permission->permissions)) $values['community_messages_form'] = '-- Messages Form'; |
| 90 | + if (@in_array('community', $this->permission->permissions)) $values['community_messages_popup'] = '-- Messages Popup'; |
| 91 | + if (@in_array('community', $this->permission->permissions)) $values['community_messages_read'] = '-- Messages Read'; |
| 92 | + if (@in_array('community', $this->permission->permissions)) $values['community_reset'] = '-- Reset Password'; |
| 93 | + if (@in_array('community', $this->permission->permissions)) $values['community_view_profile'] = '-- View Profile'; |
| 94 | + if (@in_array('community', $this->permission->permissions)) $values['community_view_profile_private'] = '-- View Private Profile'; |
| 95 | + if (@in_array('events', $this->permission->permissions)) $values['!events'] = 'Events'; |
| 96 | + if (@in_array('events', $this->permission->permissions)) $values['events'] = '-- View Events'; |
| 97 | + if (@in_array('events', $this->permission->permissions)) $values['events_single'] = '-- Single Event'; |
| 98 | + if (@in_array('events', $this->permission->permissions)) $values['events_featured'] = '-- Featured Events'; |
| 99 | + if (@in_array('events', $this->permission->permissions)) $values['events_search'] = '-- Events Search Results'; |
| 100 | + if (@in_array('forums', $this->permission->permissions)) $values['!forums'] = 'Forums'; |
| 101 | + if (@in_array('forums', $this->permission->permissions)) $values['forums'] = '-- Forums List'; |
| 102 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_delete'] = '-- Delete Forum'; |
| 103 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_forum'] = '-- View Forum'; |
| 104 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_post_reply'] = '-- Post Reply'; |
| 105 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_post_topic'] = '-- Post Topic'; |
| 106 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_search'] = '-- Forums Search Results'; |
| 107 | + if (@in_array('forums', $this->permission->permissions)) $values['forums_topic'] = '-- View Topic'; |
| 108 | + if (@in_array('shop', $this->permission->permissions)) $values['!shop'] = 'Shop'; |
| 109 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_account'] = '-- Account (Shop)'; |
| 110 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_browse'] = '-- Browse Products'; |
| 111 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_cancel'] = '-- Cancel Purchase'; |
| 112 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_cart'] = '-- Shopping Cart'; |
| 113 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_checkout'] = '-- Checkout'; |
| 114 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_create_account'] = '-- Create Account (Shop)'; |
| 115 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_donation'] = '-- Successful Donation'; |
| 116 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_featured'] = '-- Featured Products'; |
| 117 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_forgotten'] = '-- Forgotten Password (Shop)'; |
| 118 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_login'] = '-- Login (Shop)'; |
| 119 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_orders'] = '-- Orders'; |
| 120 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_prelogin'] = '-- Pre-login'; |
| 121 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_product'] = '-- View Product'; |
| 122 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_recommend'] = '-- Recommend Product'; |
| 123 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_reset'] = '-- Reset Password (Shop)'; |
| 124 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_review'] = '-- Review Product'; |
| 125 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_subscriptions'] = '-- Subscriptions'; |
| 126 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_success'] = '-- Successful Transaction'; |
| 127 | + if (@in_array('shop', $this->permission->permissions)) $values['shop_view_order'] = '-- View Order'; |
| 128 | + if (@in_array('wiki', $this->permission->permissions)) $values['!wiki'] = 'Wiki'; |
| 129 | + if (@in_array('wiki', $this->permission->permissions)) $values['wiki'] = '-- Browse Pages'; |
| 130 | + if (@in_array('wiki', $this->permission->permissions)) $values['wiki_form'] = '-- Edit Page'; |
| 131 | + if (@in_array('wiki', $this->permission->permissions)) $values['wiki_page'] = '-- View Page'; |
| 132 | + if (@in_array('wiki', $this->permission->permissions)) $values['wiki_search'] = '-- Wiki Search Results'; |
| 133 | + |
| 134 | + $values['custom'] = 'Custom Module'; |
| 135 | + |
| 136 | + echo @form_dropdown('moduleSelect',$values, (($data['templateName'] == 'custom') ? 'custom' : $data['modulePath']), 'id="moduleSelect" class="formelement" rel="'.site_url('/admin/pages/module').'"'); |
| 137 | + ?> |
| 138 | + <span class="tip">To make a module template (e.g. for the Blog) select the module here.</span> |
| 139 | + <br class="clear" /> |
| 140 | + |
| 141 | + <div class="showModulePath"> |
| 142 | + <label for="modulePath">Module Reference:</label> |
| 143 | + <?php echo @form_input('modulePath',set_value('modulePath', $data['modulePath']), 'id="modulePath" class="formelement"'); ?> |
| 144 | + <br class="clear" /> |
| 145 | + </div> |
| 146 | + |
| 147 | + <br /> |
| 148 | + |
| 149 | + <div class="autosave"> |
| 150 | + <script src="<?= site_url('static/themes/assets/editors/ckeditor/ckeditor.js'); ?>"></script> |
| 151 | + <?php |
| 152 | + $data = [ |
| 153 | + 'name' => 'body', |
| 154 | + 'id' => 'body', |
| 155 | + 'class' => 'code editor', |
| 156 | + 'style' => 'width:70%', |
| 157 | + 'rows' => '20', |
| 158 | + 'cols' => '30', |
| 159 | + 'value' => @set_value('body', $data['body']) |
| 160 | + ]; |
| 161 | + echo form_textarea($data); |
| 162 | + ?> |
| 163 | +<!-- |
| 164 | + ckeditor setting it's own ID replacing body |
| 165 | + change so we can pull default module tpl's |
| 166 | + |
| 167 | + |
| 168 | + <script type="text/javascript" > |
| 169 | + <?php |
| 170 | + // $ckeditor_settingsTemplate = $this->config->item('settingsTemplates', 'ckeditor_config'); |
| 171 | + // echo $ckeditor_settingsTemplate; |
| 172 | + ?> |
| 173 | + </script> |
| 174 | +--> |
| 175 | + |
| 176 | + <br class="clear" /> |
| 177 | + </div> |
| 178 | + <br /> |
| 179 | + |
| 180 | + </form> |
| 181 | + |
| 182 | + |
| 183 | + </div> <!-- End box body --> |
| 184 | + </div> <!-- End Box --> |
| 185 | + |
| 186 | + </div> <!-- End row --> |
| 187 | + </section> |
| 188 | + |
| 189 | + |
| 190 | + <script type="text/javascript" src="<?=PATH['static'];?>/js/templates.js" /></script> |
0 commit comments