Permalink
Browse files

adding a few views used specifically for the matrix celltype

  • Loading branch information...
1 parent bbb2b8b commit f5ee20ee8e4dd439d871c9acd8aeb340d8d56bf8 @bryantAXS committed Mar 7, 2012
Showing with 30 additions and 0 deletions.
  1. +6 −0 views/option_row_matrix.php
  2. +6 −0 views/option_row_matrix_dynamic.php
  3. +18 −0 views/options_matrix.php
@@ -0,0 +1,6 @@
+ <tr>
+ <td><?=form_input(sprintf('entry_type_options[%s][value]', $i), $value)?></td>
+ <td><?=form_input(sprintf('entry_type_options[%s][label]', $i), $label)?></td>
+ <td><?=form_multiselect(sprintf('entry_type_options[%s][hide_fields][]', $i), $fields, $hide_fields)?></td>
+ <td><a href="javascript:void(0);" class="entry_type_remove_row_matrix"><?=img(array('border' => '0', 'src' => $this->config->item('theme_folder_url').'cp_themes/default/images/content_custom_tab_delete.png'))?></a></td>
+ </tr>
@@ -0,0 +1,6 @@
+ <tr>
+ <td><?=form_input(sprintf('matrix[cols][col_id_%s][settings][entry_type_options][%s][value]',$col_id, $i), $value)?></td>
+ <td><?=form_input(sprintf('matrix[cols][col_id_%s][settings][entry_type_options][%s][label]',$col_id, $i), $label)?></td>
+ <td><?=form_multiselect(sprintf('matrix[cols][col_id_%s][settings][entry_type_options][%s][hide_fields][]',$col_id, $i), $fields, $hide_fields)?></td>
+ <td><a href="javascript:void(0);" class="entry_type_remove_row_matrix"><?=img(array('border' => '0', 'src' => $this->config->item('theme_folder_url').'cp_themes/default/images/content_custom_tab_delete.png'))?></a></td>
+ </tr>
View
@@ -0,0 +1,18 @@
+<table width="100%" id="entry_type_options_matrix" class="mainTable">
+ <thead>
+ <tr>
+ <th><?=lang('type_value')?></th>
+ <th><?=lang('type_label')?></th>
+ <th><?=lang('hide_fields')?></th>
+ <th style="width:1%;">&nbsp;</th>
+ </tr>
+ </thead>
+ <tbody>
+<?php $i = 0; ?>
+<?php foreach ($type_options as $value => $data) : ?>
+<?=$this->load->view('option_row_matrix', array('i' => (string) $i, 'value' => $value, 'label' => $data['label'], 'hide_fields' => $data['hide_fields'], 'fields' => $fields), TRUE)?>
+<?php $i++; ?>
+<?php endforeach; ?>
+ </tbody>
+</table>
+<p><a href="javascript:void(0);" id="entry_type_add_row_matrix"><?=lang('add_type')?></a></p>

0 comments on commit f5ee20e

Please sign in to comment.