Example #1
0
 /**
  *
  */
 public function toHtml(array $params = array(), array $innerCallbacks = array())
 {
     require_once 'lib/lib.htmlgen.php';
     $o = $this;
     //h::li(function () use ($o, $params, $innerCallbacks) {
     h::li(array('id' => $o->getInternalId()), function () use($o, $params, $innerCallbacks) {
         h::div(array('class' => 'builderElementLine'), function () use($o, $params) {
             h::h3($params['title']);
             /*
                       h::div(array('class' => 'builderElementActionItems'), function() use ($o) {
                         if ($o->isEditable()) {
                           h::a('Details', '#', array('class' => 'btn details'));
                         }
                         if ($o->isDeletable()) {
                           h::a('Delete', '#', array('class' => 'delete btn danger'));
                         }
                       });*/
         });
         h::div(array('class' => 'popover builderElementPopover right'), function () use($o, $params, $innerCallbacks) {
             h::div(array('class' => 'arrow'));
             h::div(array('class' => 'inner'), function () use($o, $params, $innerCallbacks) {
                 h::h3(array('class' => 'title'), function () use($o, $params) {
                     h::div(array('class' => 'actualTitle'), 'Details for ' . $params['title']);
                 });
                 h::div(array('class' => 'content'), function () use($o, $innerCallbacks) {
                     h::form(array('class' => 'form', 'action' => ''), function () use($o, $innerCallbacks) {
                         h::fieldset(function () use($o, $innerCallbacks) {
                             $params = array('help' => "Uncheck this if you don't want this task to execute at all.", 'label' => 'Active?', 'name' => 'active', 'checked' => $o->isActive());
                             $o->getHtmlInputCheckbox($params);
                             foreach ($innerCallbacks as $cb) {
                                 //
                                 // Filesets are special cases, because we might need to
                                 // iterate on more than one (in the future)
                                 //
                                 if ($cb['cb'] == 'getFilesets') {
                                     if ($o->getFilesets()) {
                                         $filesets = $o->getFilesets();
                                         foreach ($filesets as $fileset) {
                                             $fileset->toHtml();
                                         }
                                     }
                                     //
                                     // Normal to-HTML callbacks
                                     //
                                 } else {
                                     call_user_func(array($o, $cb['cb']), $cb);
                                 }
                             }
                             h::div(array('class' => 'actions'), function () {
                                 h::input(array('type' => 'submit', 'class' => 'btn', 'value' => 'Nothing to save', 'disabled' => 'disabled'));
                                 h::button(array('class' => 'btn delete danger'), 'Delete');
                             });
                         });
                     });
                 });
             });
         });
     });
     //});
 }
Example #2
0
 public function getViewExecutables()
 {
     require_once 'lib/lib.htmlgen.php';
     $o = $this;
     h::fieldset(function () use($o) {
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_PHP), 'PHP');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_PHP, 'value' => $o[SystemSettings::EXECUTABLE_PHP]));
                 h::span(array('class' => 'help-block'), "The path to the host system's PHP executable.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_GIT), 'Git');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_GIT, 'value' => $o[SystemSettings::EXECUTABLE_GIT]));
                 h::span(array('class' => 'help-block'), "The path to the host system's Git executable. Required in order to allow Git as the configured SCM for projects.");
             });
         });
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_SVN), 'SVN');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_SVN, 'value' => $o[SystemSettings::EXECUTABLE_SVN]));
                 h::span(array('class' => 'help-block'), "The path to the host system's SVN executable. Required in order to allow SVN as the configured SCM for projects.");
             });
         });
         /*    });
         
             h::fieldset(function () use ($o) {
               h::legend('Archivers');*/
         h::div(array('class' => 'clearfix'), function () use($o) {
             h::label(array('for' => SystemSettings::EXECUTABLE_TAR), 'tar');
             h::div(array('class' => 'input'), function () use($o) {
                 h::input(array('type' => 'text', 'class' => 'span6', 'name' => SystemSettings::EXECUTABLE_TAR, 'value' => $o[SystemSettings::EXECUTABLE_TAR]));
                 h::span(array('class' => 'help-block'), "The path to the host system's tar executable. Will be used to generate all release packages.");
             });
         });
     });
 }