Example #1
0
$app = $m->get('app');
if (!isset($app)) {
    $app = YuppContext::getInstance()->getApp();
}
?>
      <a href="create?app=<?php 
echo $app;
?>
&class=<?php 
echo $m->get('class');
?>
">Create</a>
    </div>
    <br/>
    
    <?php 
echo DisplayHelper::model($m->get('list'), "list", $m->get('class'));
?>
    </br></br>
    
    <?php 
/*
<?php h('template', array('name'=>'list', 'url'=>'./apps/core/views', 'args'=>array('list'=>$m->get('list'), 'class'=>$m->get('class')))); ?>
*/
?>
    
    <?php 
echo h('pager', array('count' => $m->get('count'), 'max' => $m->get('max'), 'offset' => $m->get('offset'), 'params' => array('app' => $app), 'class' => $m->get('class')));
?>
  </body>
</html>
 private static function inlist($constraint, $attr, $value)
 {
     // 0=value
     // 1=attr
     // 2=lista
     $msg = DisplayHelper::message(self::MSG_INLIST);
     $msg = str_replace('{0}', $value, $msg);
     $msg = str_replace('{1}', $attr, $msg);
     $values = '';
     foreach ($constraint->getList() as $value) {
         $values .= $value . ', ';
     }
     $values = substr($values, 0, -2);
     return str_replace('{2}', $values, $msg);
 }
Example #3
0
      
    <form action="save" method="post">
        <input type="hidden" name="id" value="<?php 
echo $m->get('object')->aGet('id');
?>
" />
        <input type="hidden" name="class" value="<?php 
echo $m->get('object')->aGet('class');
?>
" />
        <input type="hidden" name="app" value="<?php 
echo $m->get('app');
?>
" />
      
        <?php 
echo DisplayHelper::model($m->get('object'), "edit");
?>
<br/>
      
        <input type="submit" value="Save" />
        <a href="show?class=<?php 
echo $m->get('object')->aGet('class');
?>
&id=<?php 
echo $m->get('object')->aGet('id');
?>
">Cancel</a>
    </form>
  </body>
</html>
Example #4
0
        padding: 7px 12px;
        background-color: #fff;
        margin: 10px;
        min-height: 80px;
        overflow: auto;
      }
    </style>
  </head>
  <body>
    <h1><?php 
echo h('img', array('src' => 'app_32.png', 'align' => 'top'));
?>
 Error 404</h1>
    <div class="message">
      <?php 
echo DisplayHelper::message('error.404.NotFound');
?>
    </div>
    <div class="body">
      Aplicaci&oacute;n: <?php 
echo $ctx->getApp();
?>
<br/>
      Controlador: <?php 
echo $ctx->getController();
?>
<br/>
      Acci&oacute;n: <?php 
echo $ctx->getAction();
?>
<br/>
Example #5
0
?>
<br/><br/>
        HTML:     <?php 
DisplayHelper::html('html');
?>
<br/><br/>
        Calendar: <?php 
DisplayHelper::calendar('calendar');
?>
<br/><br/>
        Escondido: <?php 
echo DisplayHelper::hidden('sshhh', 'unvalor');
?>
<br/><br/>
                  <?php 
echo DisplayHelper::submit('doit', 'Enviar');
?>
      </form>
      
    </div>
    
    <style>
      .yui-calcontainer {
         float: none;
         diplay: inline-block;
         width: 185px;
      }
    </style>
    
    <div style="width: 700px; height: auto; padding:10px; padding-right:10px; background-color: #8080ff; border: 1px dashed #000" id="content_div">
      <?php 
Example #6
0
echo $id;
?>
">Edit</a>
      |
      <a href="delete?app=<?php 
echo $app;
?>
&class=<?php 
echo $clazz;
?>
&id=<?php 
echo $id;
?>
">Delete</a>
      |
      <a href="list?app=<?php 
echo $app;
?>
&class=<?php 
echo $clazz;
?>
">List</a>
    </div>
    <br/>
    
    <?php 
echo DisplayHelper::model($m->get('object'), "show");
?>
     
  </body>
</html>
Example #7
0
        padding: 7px 12px;
        background-color: #fff;
        margin: 10px;
        min-height: 80px;
        overflow: auto;
      }
    </style>
  </head>
  <body>
    <h1><?php 
echo h('img', array('src' => 'app_32.png', 'align' => 'top'));
?>
 Error 403</h1>
    <div class="message">
      <?php 
echo DisplayHelper::message('error.403.Forbidden');
?>
    </div>
    <div class="body">
      Aplicaci&oacute;n: <?php 
echo $ctx->getApp();
?>
<br/>
      Controlador: <?php 
echo $ctx->getController();
?>
<br/>
      Acci&oacute;n: <?php 
echo $ctx->getAction();
?>
<br/>
function msg($key, $locale = NULL, $defaultMessage = "")
{
    // TODO: agregar un tercer parametro para indicar si se hace o no echo del resultado.
    return DisplayHelper::message($key, $locale = NULL, $defaultMessage = "");
}
Example #9
0
            <input type="text" class="input-xlarge" name="username" id="username">
            <span class="help-block"><?php 
echo DisplayHelper::fieldErrors($user, 'username');
?>
</span>
          </div>
        </div>
        <div class="control-group<?php 
echo $hasErrorPassword ? ' error' : '';
?>
">
          <label for="password"><?php 
echo msg('twitter.user.register.password');
?>
</label>
          <div class="controls">
            <input type="password" class="input-xlarge" name="password" id="password">
            <span class="help-block"><?php 
echo DisplayHelper::fieldErrors($user, 'password');
?>
</span>
          </div>
        </div>
      </fieldset>
      <div class="form-actions">
        <input type="submit" value="Register" name="doit" class="btn btn-primary" />
        <input type="submit" value="Cancel" name="_action_login" class="btn" />
      </div>
    </form>
  </body>
</html>
Example #10
0
        padding: 10px;
      }
      .lineNumber {
        color: #999;
        margin-right: 10px;
      }
    </style>
  </head>
  <body>
    <h1><?php 
echo h('img', array('src' => 'app_32.png', 'align' => 'top'));
?>
 Error 500</h1>
    <div class="message">
      <?php 
echo DisplayHelper::message('error.500.InternalServerError');
?>
    </div>
    <div class="body">
      Aplicaci&oacute;n: <?php 
echo $ctx->getApp();
?>
<br/>
      Controlador: <?php 
echo $ctx->getController();
?>
<br/>
      Acci&oacute;n: <?php 
echo $ctx->getAction();
?>
<br/>