<?php
defined('_JEXEC') or die('Restricted access');
?>
<!-- Attached Module Modal -->
<div class="modal fade" id="attached-module-modal" tabindex="-1" role="dialog" aria-labelledby="attached-module-modal-Label" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
        <h4 class="modal-title" id="attached-module-modal-Label"><?php echo cck_lang_text("COM_OS_CCK_ATTACHED_MODULE_MODAL_TITLE")?></h4>
      </div>
      <div class="modal-body">
        <div class="row">
          <span class="col-lg-6 col-lg-6 col-md-6 col-sm-6 col-xs-6"><label>Title</label></span>
          <span class="col-lg-4 col-lg-4 col-md-4 col-sm-4 col-xs-4"><label>Type</label></span>
          <span class="col-lg-2 col-lg-2 col-md-2 col-sm-2 col-xs-2"><label>ID</label></span>
        </div>
        <?php
        
        foreach ($layout->module_list as $key => $value) { ?>
          <div id="attached-module-row-<?php echo $value->id; ?>" class="row"
                onclick="addAttachedModule('<?php echo $value->id; ?>','<?php echo $value->title; ?>');">
            <span class="col-lg-6 col-lg-6 col-md-6 col-sm-6 col-xs-6"><?php echo $value->title; ?></span>
            <span class="col-lg-4 col-lg-4 col-md-4 col-sm-4 col-xs-4"><?php echo $value->type; ?></span>
            <span class="col-lg-2 col-lg-2 col-md-2 col-sm-2 col-xs-2"><?php echo $value->id; ?></span>
          </div>
          <?php
        } ?>
      </div>
    </div>
  </div>
</div>
<!-- Attached Module Modal -->