[limb-svn] r6871 - in 3.x/trunk/limb/cms: src/controller template/_cms template/admin template/admin_user template/user

svn at limb-project.com svn at limb-project.com
Sun Mar 30 18:42:57 MSD 2008


Author: vasiatka
Date: 2008-03-30 18:42:56 +0400 (Sun, 30 Mar 2008)
New Revision: 6871
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6871

Added:
   3.x/trunk/limb/cms/template/_cms/central_part.phtml
   3.x/trunk/limb/cms/template/_cms/create_common_elements.phtml
   3.x/trunk/limb/cms/template/_cms/crumbs.phtml
   3.x/trunk/limb/cms/template/_cms/delete_common_elements.phtml
   3.x/trunk/limb/cms/template/_cms/dialog_central_part.phtml
   3.x/trunk/limb/cms/template/_cms/edit_common_elements.phtml
   3.x/trunk/limb/cms/template/_cms/form_errors.phtml
   3.x/trunk/limb/cms/template/_cms/image_select.phtml
   3.x/trunk/limb/cms/template/_cms/js.phtml
   3.x/trunk/limb/cms/template/_cms/menu.phtml
   3.x/trunk/limb/cms/template/_cms/move_common_elements.phtml
   3.x/trunk/limb/cms/template/_cms/node_breadcrumbs.phtml
   3.x/trunk/limb/cms/template/_cms/notify_zone.phtml
   3.x/trunk/limb/cms/template/_cms/page.phtml
   3.x/trunk/limb/cms/template/_cms/pager.phtml
   3.x/trunk/limb/cms/template/_cms/parent_select.phtml
   3.x/trunk/limb/cms/template/_cms/popup.phtml
   3.x/trunk/limb/cms/template/_cms/selector.phtml
   3.x/trunk/limb/cms/template/_cms/styles.phtml
   3.x/trunk/limb/cms/template/_cms/user_data.phtml
   3.x/trunk/limb/cms/template/admin/display.phtml
   3.x/trunk/limb/cms/template/admin_user/change_password.phtml
   3.x/trunk/limb/cms/template/admin_user/common_fields.phtml
   3.x/trunk/limb/cms/template/admin_user/create.phtml
   3.x/trunk/limb/cms/template/admin_user/create_form_fields.phtml
   3.x/trunk/limb/cms/template/admin_user/delete.phtml
   3.x/trunk/limb/cms/template/admin_user/detail.phtml
   3.x/trunk/limb/cms/template/admin_user/display.phtml
   3.x/trunk/limb/cms/template/admin_user/edit.phtml
   3.x/trunk/limb/cms/template/admin_user/edit_form_fields.phtml
   3.x/trunk/limb/cms/template/user/login.phtml
Modified:
   3.x/trunk/limb/cms/src/controller/AdminUserController.class.php
Log:
-- Added some templates for macro
-- Changed method delete of AdminUserController (deleted peformCommand)

Modified: 3.x/trunk/limb/cms/src/controller/AdminUserController.class.php
===================================================================
--- 3.x/trunk/limb/cms/src/controller/AdminUserController.class.php	2008-03-30 13:40:59 UTC (rev 6870)
+++ 3.x/trunk/limb/cms/src/controller/AdminUserController.class.php	2008-03-30 14:42:56 UTC (rev 6871)
@@ -1,6 +1,7 @@
 <?php
 lmb_require('limb/web_app/src/controller/lmbController.class.php');
 lmb_require('limb/validation/src/rule/lmbMatchRule.class.php');
+lmb_require('limb/cms/src/model/lmbCmsUser.class.php');
 
 class AdminUserController extends lmbController
 {
@@ -37,7 +38,10 @@
 
   function doDetail()
   {
-    $this->view->set('user', new lmbCmsUser((int)$this->request->get('id')));
+    if($id=$this->request->get('id'))
+    {
+      $this->view->set('user', new lmbCmsUser((int)$id));
+    }
   }
 
   protected function _import($item)
@@ -58,7 +62,16 @@
 
   function doDelete()
   {
-    $this->performCommand('limb/cms/src/command/lmbCmsDeleteObjectCommand', 'lmbCmsUser');
+    if($this->request->get('delete'))
+    {
+      foreach($this->request->getArray('ids') as $id)
+      {
+        $item = new lmbCmsUser((int)$id);
+        $item->destroy();
+      }
+      $this->closePopup();
+    }
+
   }
 
   function doChangePassword()

Added: 3.x/trunk/limb/cms/template/_cms/central_part.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/central_part.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/central_part.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,9 @@
+<div style='display:none'>{{slot id='icon_zone'/}}</div>
+
+<h1>{{slot id='title_zone'/}}</h1>
+{{slot id='description_zone'/}}
+<div id='actions'>
+{{slot id='actions'/}}
+</div>
+
+{{slot id='table'/}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/_cms/create_common_elements.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/create_common_elements.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/create_common_elements.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,5 @@
+<div class='form_buttons'>
+  {{input id='create' type="submit" value='Создать' class='button' runat='client'/}}
+  {{input id='cancel' type="button" value='Отмена' class='button' onclick='if(confirm("Вы уверены?")){window.close();}'  runat='client'/}}
+</div>
+

Added: 3.x/trunk/limb/cms/template/_cms/crumbs.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/crumbs.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/crumbs.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,12 @@
+{{fetch using='src/fetcher/BreadcrumbsFetcher' to="$crumbs"/>
+<div class="breadcrumbs">
+  {{list using='$crumbs'}}
+  &nbsp; &raquo; &nbsp;
+  {{list:item}}
+    <a href='{$path}'>{$title}</a>
+  {{list:glue}}
+    &nbsp; &raquo; &nbsp;
+  {{/list:glue}}
+  {{/list:item}}
+  {{/list}}
+</div>
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/_cms/delete_common_elements.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/delete_common_elements.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/delete_common_elements.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,5 @@
+<input name='delete' type='hidden' value='1' />
+<div class='list_actions' style='text-align:right'>
+  <input type="submit" value='Удалить' class='button'/>
+  <input type="button" value='Отмена' class='button' id='cancel' onclick='window.close();' />
+</div>

Added: 3.x/trunk/limb/cms/template/_cms/dialog_central_part.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/dialog_central_part.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/dialog_central_part.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,5 @@
+<div style='display:none'>{{slot id='icon_zone'/}}</div>
+<h1>{{slot id='title_zone'/}}</h1>
+{{slot id='description_zone'/}}
+{{slot id='form_zone'/}}
+

Added: 3.x/trunk/limb/cms/template/_cms/edit_common_elements.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/edit_common_elements.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/edit_common_elements.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,4 @@
+<div class='form_buttons'>
+  <input id='edit'  type="submit" value='Сохранить' class='button'/>
+  <input id='cancel' type="button" value='Отменить' class='button' onclick='if(confirm("Вы уверены?")){window.close();}' />
+</div>

Added: 3.x/trunk/limb/cms/template/_cms/form_errors.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/form_errors.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/form_errors.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,19 @@
+{{form:errors to='$fields_errors'/}}
+
+{{list using='$fields_errors' as="$error"}}
+  <div class="message_error">
+    <a class='show_hidden'><img src="/shared/cms/images/button/show_hidden.gif"  width='11' height='9' alt='показать/скрыть'/></a>
+    <b class='title'>Следующие поля содержали ошибки</b>
+    <span class='border_h'><span class='l'></span><span class='r'></span></span>
+    <div class="border_c">
+      <div class="content">
+        <ol>
+  {{list:item}}
+    <li><font color="red">{$error.message}</font></li>
+  {{/list:item}}
+       </ol>
+      </div>
+    </div>
+    <span class='border_b'><span class='l'></span><span class='r'></span></span>
+  </div>
+{{/list}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/_cms/image_select.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/image_select.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/image_select.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,61 @@
+<table width='100%' border='0' cellspacing='0' cellpadding='0' style="padding: 0 0 8px 0;">
+<tr>
+  <td width=120>
+    <label>Изображение</label><br/>
+    <div><img id='image_preview' src="/shared/cms/images/1x1.gif"/></div>
+  </td>
+  <td align=left>
+    <span id='image_path'></span>
+    {{input type='hidden' name='image_id' id='image_id' /}}
+    {{input type='button' value='...' onclick='return onButtonClick();' runat='client' style="width:20px"/}}
+    {{input type='button' value='Reset' onclick='return onResetClick();' runat='client'/}}
+  </td>
+</tr>
+</table>
+
+
+
+<script type="text/javascript">
+function onButtonClick()
+{
+  new Limb.Window('/admin_media/browse?Type=Image', 'image_select');
+  return false;
+}
+
+function onResetClick()
+{
+  var image = document.getElementById('image_preview');
+  if(!image) return;
+  image.src = "/shared/cms/images/1x1.gif";
+
+  var image_id = document.getElementById('image_id');
+  if(!image_id) return;
+  image_id.value = null;
+}
+
+function SetUrl(url, id)
+{
+  var image = document.getElementById('image_preview');
+  if(!image) return;
+  image.src = '/admin_image/show/' + id;
+
+  var image_id = document.getElementById('image_id');
+  if(!image_id) return;
+  image_id.value = id;
+}
+
+function InitImageSelect()
+{
+  var image_id = document.getElementById('image_id');
+  if(!image_id || !image_id.value|| (image_id.value==0)||(image_id==null) ) return;
+
+  var url = '/admin_image/show/' + image_id.value;
+
+  var image = document.getElementById('image_preview');
+  if(!image) return;
+  image.src = url;
+}
+
+jQuery(window).ready(InitImageSelect());
+//Limb.events.add_event(window, 'load', InitImageSelect);
+</script>

Added: 3.x/trunk/limb/cms/template/_cms/js.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/js.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/js.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,14 @@
+<script src="/shared/js/js/jquery.js"></script>
+<script src="/shared/js/js/limb.js"></script>
+<script src="/shared/js/js/limb/url.js"></script>
+<script src="/shared/js/js/limb/flash.js"></script>
+<script src="/shared/js/js/limb/window.js"></script>
+<script src="/shared/js/js/limb/forms.js"></script>
+<script src="/shared/js/js/limb/form_elements.js"></script>
+<script src="/shared/js/js/limb/auto_popup.js"></script>
+<script src="/shared/cms/js/tabs.js"></script>
+<script src="/shared/cms/js/auto_tabs.js"></script>
+<script src="/shared/cms/js/fixpng.js"></script>
+<script src="/shared/cms/js/cp_layout.js"></script>
+<script src="/shared/cms/js/cp_common_controls.js"></script>
+ <script type="text/javascript" src="/shared/cms/js/accordion.js"></script>

Added: 3.x/trunk/limb/cms/template/_cms/menu.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/menu.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/menu.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,13 @@
+<?php
+  lmb_require('limb/cms/src/fetcher/lmbCmsAdminNavigationFetcher.class.php');
+  $this->navigation=new lmbCmsAdminNavigationFetcher();
+  $this->navigation=$this->navigation->fetch();
+?>
+<dl id='main_menu'>
+  {{list:list id='navigation' using='$#navigation'}}
+  {{list:item}}
+  <dt class='{$item.id}'><span>{$item.title}</span></dt>
+  <dd>{{list:list using='$item.children' as="$sub_item"}}<ul>{{list:item}}<li><a href='{$sub_item.url}'>{$sub_item.title}</a></li>{{/list:item}}</ul>{{/list:list}}</dd>
+  {{/list:item}}
+  {{/list:list}}
+</dl>

Added: 3.x/trunk/limb/cms/template/_cms/move_common_elements.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/move_common_elements.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/move_common_elements.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,5 @@
+<input name='move' type='hidden' value='1' runat='client'/>
+<div  class='list_actions' style='text-align:right'>
+  <input type="submit" class='button' value="Переместить"/>
+  <input type="button" class='button'  value="Отменить" onclick='if(confirm("Вы уверены?")){window.close();}return false;'/>
+</div>

Added: 3.x/trunk/limb/cms/template/_cms/node_breadcrumbs.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/node_breadcrumbs.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/node_breadcrumbs.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,12 @@
+{{optional for='$#node.parents'}}
+{{list using='$#node.parents'}}
+  <div class="breadcrumbs">Вы здесь:
+    {{list:item}}
+	    <a href='{{route_url params="id:{$item.id}" /}}'>
+	      {$item.title}
+	    </a>
+	    /
+	  {{/list:item}}
+    <b>{$#node.title}</b></div>
+{{/list}}
+{{/optional}}

Added: 3.x/trunk/limb/cms/template/_cms/notify_zone.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/notify_zone.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/notify_zone.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,12 @@
+{{flashbox}}
+{{list using="{$flashbox}"}}
+  <div class='notify_zone'>
+    <span class='close' onclick='jQuery(".notify_zone").slideUp()'>Закрыть</span>
+  {{list:item}}
+    <?php if($item['is_error']) $class_name='error'; else $class_name='message'; ?>
+      <span class='{$class_name}'>{$item.message}</span>
+	  {{list:glue step="1"}}<br />{{/list:glue}}
+  {{/list:item}}
+  </div>
+{{/list}}
+{{/flashbox}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/_cms/page.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/page.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/page.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!-- Powered by LIMB | http://www.limb-project.com/ -->
+<!-- Designed by BIT | http://www.bit-creative.com/ -->
+<html>
+<head>
+  <title>Панель управления</title>
+  <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
+
+  {{include file='_cms/styles.phtml'/}}
+  {{include file='_cms/js.phtml'/}}
+</head>
+<body>
+<div id="wrapper">
+
+  <div id='admin_panel'>
+    <img src="/shared/cms/images/limb_admin.gif"  width='94' height='25' alt='LIMB' id='logo_project'/>
+    {{include file='_cms/user_data.phtml'/}}
+  </div>
+
+  <div id='container'>
+    <div id="content">
+      {{slot id='content_zone'/}}
+    </div>
+  </div>
+
+  <div id='sidebar'>
+    {{include file='_cms/menu.phtml'/}}
+  </div>
+
+</div>
+
+</body>
+</html>
+

Added: 3.x/trunk/limb/cms/template/_cms/pager.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/pager.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/pager.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,14 @@
+{{pager id="pager" items="20" pages_per_section="5"}}
+<div class='pager'>
+{{pager:first}}<a href="{$href}" class="arr"><img src="/shared/cms/images/button/arrow_first.gif"  width='18' height='17' alt='&#171;'/></a>{{/pager:first}}
+{{pager:prev}}<a href="{$href}" class="arr"><img src="/shared/cms/images/button/arrow_prev.gif"  width='18' height='17' alt='&#60;'/></a>{{/pager:prev}}
+{{pager:list}}
+{{pager:section}}<a href="{$href}">[{$section_begin_page}..{$section_end_page}]</a>{{/pager:section}}
+{{pager:current}}<b>{$number}</b>{{/pager:current}}
+{{pager:number}}<a href="{$href}">{$number}</a>{{/pager:number}}
+{{pager:separator}} {{/pager:separator}}
+{{/pager:list}}
+{{pager:next}}<a href="{$href}" class="arr"><img src="/shared/cms/images/button/arrow_next.gif"  width='18' height='17' alt='&#62;'/></a>{{/pager:next}}
+{{pager:last}}<a href="{$href}" class="arr"><img src="/shared/cms/images/button/arrow_last.gif"  width='18' height='17' alt='&#187;'/></a>{{/pager:last}}
+</div>
+{{/pager}}

Added: 3.x/trunk/limb/cms/template/_cms/parent_select.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/parent_select.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/parent_select.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,45 @@
+<table width='100%' border='0' cellspacing='0' cellpadding='0' style="padding: 0 0 8px 0;">
+<tr>
+  <td width=120>
+    <label>Выбор родительского узла</label><br/>
+    <div id='parent_name' style='font-weight: bold;white-space:nowrap'>
+	{{optional for='{$#parent}'}}{$#parent.title} ( {$#parent.absolute_url_path} ){{/optional}}</div>
+  </td>
+  <td align=left>
+    <input type='hidden' name='parent_id' id='parent' />
+    <input type='button' value='...' onclick='return onButtonClick();' runat='client' style="width:20px"/>
+    <input type='button' value='Сбросить' onclick='return onResetClick();' runat='client'/>
+  </td>
+</tr>
+</table>
+
+<script type="text/javascript">
+function onButtonClick()
+{
+  new Limb.Window('{{route_url params="action:browse" /}}', 'parent_select');
+  return false;
+}
+
+function onResetClick()
+{
+  var parent_name_input = document.getElementById('parent_name');
+  if(!parent_name_input) return;
+  parent_name_input.innerHTML = '';
+
+  var parent_id = document.getElementById('parent');
+  if(!parent_id) return;
+  parent_id.value = '';
+}
+
+function SetUrl(url, id, parent_name)
+{
+  var parent_name_input = document.getElementById('parent_name');
+  if(!parent_name_input) return;
+  parent_name_input.innerHTML = parent_name + '(' + url + ')';
+
+  var parent_id = document.getElementById('parent');
+  if(!parent_id) return;
+  parent_id.value = id;
+}
+
+</script>

Added: 3.x/trunk/limb/cms/template/_cms/popup.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/popup.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/popup.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+"http://www.w3.org/TR/html4/strict.dtd">
+<!-- Powered by LIMB | http://www.limb-project.com/ -->
+<!-- Designed by BIT | http://www.bit-creative.com/ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+{{include file='_cms/styles.phtml'/}}
+{{include file='_cms/js.phtml'/}}
+</head>
+<body class='popup'>
+  {{slot id='icon'/}}
+  {{slot id='title'/}}
+  {{slot id='content_zone'/}}
+</body>
+</html>

Added: 3.x/trunk/limb/cms/template/_cms/selector.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/selector.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/selector.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1 @@
+<input type='checkbox' onclick='toggle_selected(this);' name='mark_all'/>

Added: 3.x/trunk/limb/cms/template/_cms/styles.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/styles.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/styles.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,2 @@
+<link rel="stylesheet" type="text/css" href="/shared/cms/styles/cp.css" />
+

Added: 3.x/trunk/limb/cms/template/_cms/user_data.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/_cms/user_data.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/_cms/user_data.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,3 @@
+<div id='user_data'>
+  <span class='name'>{$#toolkit.cms_user.login} [ {$#toolkit.cms_user.name} ]</span> <a href="/user/profile" class='profile'>Профиль</a> <a href='/user/logout' class='logout'>Выйти</a>
+</div>
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/admin/display.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin/display.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin/display.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,10 @@
+{{wrap with="_cms/page.phtml" into="content_zone"}}
+{{include file='_cms/notify_zone.phtml'/}}
+<div id="dashboard">
+  <h1>Панель управления</h1>
+
+  <p><b>Добро пожаловать в панель управления</b></p>
+
+  <p><b>Выберите модуль с которым хотите работать в меню слева</b></p>
+</div>
+{{/wrap}}

Added: 3.x/trunk/limb/cms/template/admin_user/change_password.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/change_password.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/change_password.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,40 @@
+{{wrap with="_cms/popup.phtml" into="content_zone"}}
+
+  {{form id='user_form' name='user_form' method='post' runat='server'}}
+
+    <?php $this->editing_user= lmbActiveRecord::findById('lmbCmsUser',$this->request->get('id'));?>
+    <h1>Изменение пароля пользователя:{$#editing_user.login} - {$#editing_user.name} </h1>
+
+    {{include file='_cms/form_errors.phtml'/}}
+
+    <div class='tabs'>
+
+      <ul class="bookmarks">
+        <li id='properties_link'><a>Свойства</a></li>
+      </ul>
+
+      <div id="tab_properties" class='bookmarks_content'>
+
+          <div class='field'>
+            {{label for="password" errorclass='error_label'}}Новый пароль:{{/label}}
+            {{input name="password" type="password" title="Новый пароль" class='input'/}}
+          </div>
+
+          <div class='field'>
+            {{label for="repeat_password" errorclass='error_label'}}Подтверждение пароля:{{/label}}
+            {{input name="repeat_password" type="password" title="Подтверждение пароля" class='input'/}}
+          </div>
+
+      </div>
+
+    </div>
+
+    <div class='form_buttons'>
+      {{input type="submit" name="submitted" class='button' value="Изменить пароль пользователя"/}}
+    </div>
+
+  {{/form}}
+
+
+{{/wrap}}
+

Added: 3.x/trunk/limb/cms/template/admin_user/common_fields.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/common_fields.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/common_fields.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,28 @@
+  <div class='required field'>
+    {{label for="login" errorclass='error_label'}}Логин:{{/label}}
+    {{input name="login" type="text" title="Логин" /}}
+  </div>
+
+  <div class='required field'>
+    {{label for="name" errorclass='error_label'}}Имя:{{/label}}
+    {{input name="name" type="text" title="Имя" />
+  </div>
+
+  <div class='required field'>
+    {{label for="email" errorclass='error_label'}}E-mail{{/label}}
+    {{input name="email" type="text" title="E-mail"/}}
+  </div>
+
+  <div class='field'>
+    {{label for="role_id" errorclass='error_label'}}Группа:{{/label}}
+    <?php
+      lmb_require('limb/cms/src/model/lmbCmsUserRoles.class.php');
+      $this->select_source=new lmbCmsUserRoles();
+      $this->select_source=$this->select_source->fetch();
+    ?>
+    {{select_options_export from="$#select_source" to="$#select_source_option" key_field="id" text_field="name"/}}
+    {{select id='role_id' name='role_id' options="$#select_source_option"}}
+      {{option prepend="true" value='0'}}Нет роли{{/option}}
+    {{/select}}
+  </div>
+

Added: 3.x/trunk/limb/cms/template/admin_user/create.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/create.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/create.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,11 @@
+{{wrap with="_cms/popup.phtml" into="content_zone"}}
+  {{form id='user_form' name='user_form' method='post' enctype="multipart/form-data" runat='server'}}
+
+    <h1>Создать пользователя</h1>
+
+  {{include file='_cms/form_errors.phtml'/}}
+	{{include file='admin_user/create_form_fields.phtml'/}}
+	{{include file='_cms/create_common_elements.phtml'/}}
+
+  {{/form}}
+{{/wrap}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/admin_user/create_form_fields.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/create_form_fields.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/create_form_fields.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,29 @@
+<div class='tabs'>
+
+  <ul>
+    <li id='properties'><a>Свойства</a></li>
+  </ul>
+
+  <div id="tab_properties" class='bookmarks_content'>
+
+    <div class="left_side">
+      {{include file='admin_user/common_fields.phtml'/}}
+    </div>
+
+    <div class="right_side">
+
+      <div class='required field'>
+        {{label for="password" errorclass='error_label'}}Пароль:{{/label}}
+        {{input name="password" type="password" title="Пароль"/}}
+      </div>
+
+      <div class='required field'>
+        {{label for="repeat_password" errorclass='error_label'}}Подтверждение пароля:{{/label}}
+        {{input name="repeat_password" type="password" title="Подтверждение пароля"/}}
+      </div>
+
+    </div>
+
+  </div>
+
+</div>

Added: 3.x/trunk/limb/cms/template/admin_user/delete.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/delete.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/delete.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,28 @@
+{{wrap with="_cms/popup.phtml" into="content_zone"}}
+
+  <h1 class='delete'>Удалить пользователей</h1>
+
+  {{form id='delete_form' name='delete_form' method='post' runat='server' class="list"}}
+
+    <?php $this->items_to_delete= lmbActiveRecord::findByIds('lmbCmsUser',$this->request->get('ids'));?>
+
+    <table>
+    <tr>
+      <th class='selector'>{{include file='_cms/selector.phtml'/}}</th>
+      <th>Логин</th>
+      <th>Имя</th>
+    </tr>
+    {{list using="{$#items_to_delete}" parity="{$parity}"}}
+      {{list:item}}
+        <tr class='{$parity}'>
+          <td>{{input type='checkbox' name='ids[]' value='{$item.id}' checked='true'/}}</td>
+          <td>{$item.login}</td>
+		  <td>{$item.name}</td>
+        </tr>
+      {{/list:item}}
+    {{/list}}
+    </table>
+	{{include file='_cms/delete_common_elements.phtml'/}}
+
+  {{/form}}
+{{/wrap}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/admin_user/detail.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/detail.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/detail.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,10 @@
+{{wrap with="_cms/page.phtml" into="content_zone"}}
+
+<h1>Иформация о пользователе: '{$#user.login}'</h1>
+<br/>
+Логин: {$#user.login}<br/>
+Имя: {$#user.name}<br/>
+E-mail: {$#user.email}<br/>
+
+{{/wrap}}
+

Added: 3.x/trunk/limb/cms/template/admin_user/display.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/display.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/display.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,62 @@
+{{wrap with="_cms/page.phtml" into="content_zone"}}
+   <div id="header_block">
+
+      <h1>Список пользователей</h1>
+
+      <div class="header_actions">
+	      <a href='{{route_url params="action:create" /}}?popup=1' class='create'>Добавить пользователя</a>
+      </div>
+
+    </div>
+
+    <div id="content_block">
+
+      <active_record:fetch class_path='limb/cms/src/model/lmbCmsUser' target="users" order="email=ASC" navigator="pager"/>
+      <?php $this->users= lmbActiveRecord::find('lmbCmsUser');?>
+      {{paginate iterator='$#users' pager='pager' /}}
+	    {{include file='_cms/pager.phtml'/}}
+
+      {{form name='list_form' method='post' class='list'}}
+
+        <div class='list_actions'>
+          <input type="button" class='button' value="Удалить" onclick='Limb.Form.submitPopup(this.form, "{{route_url params="action:delete" /}}");'/>
+        </div>
+
+        <table>
+          <tr>
+            <th class='selector'>{{include file='_cms/selector.phtml'/}}</th>
+            <th>#ID</th>
+            <th>Имя</th>
+            <th>Логин</th>
+            <th>E-mail</th>
+            <th>Группа</th>
+            <th>Действия</th>
+          </tr>
+          {{list using='{$#users}' parity='{$Parity}'}}
+            {{list:item}}
+            <tr class='{$Parity}'>
+              <td class='selector'>{{input type='checkbox' name='ids[]' value='{$item.id}' runat='client'/}}</td>
+              <td>#{$item.id}</td>
+              <td>{$item.name}</td>
+              <td>{$item.login}</td>
+              <td><a href='mailto:{$item.email}'>{$item.email}</a></td>
+              <td>{$item.current_role.name}</td>
+              <td class='actions'>
+                  <a href='{{route_url params="action:change_password,id:{$item.id}?popup=1" /}}'  title="Сменить пароль"><img src='/shared/cms/images/icon/action/password.gif' width='14' height='16' alt='Сменить пароль'/></a>
+                  <a href='{{route_url params="action:edit,id:{$item.id}?popup=1" /}}'  title="Редактировать"><img src='/shared/cms/images/icon/action/edit.gif' width='16' height='17'  alt='Редактировать' /></a>
+				          <a href='{{route_url params="action:delete?popup=1&ids[]={$item.id}" /}}'  title="Удалить"><img src='/shared/cms/images/icon/action/delete.gif' width='14' height='17'  alt='Удалить' /></a>
+              </td>
+            </tr>
+            {{/list:item}}
+          {{/list}}
+        </table>
+
+        <div class='list_actions'>
+          <input type="button" class='button' value="Удалить" onclick='Limb.Form.submitPopup(this.form, "{{route_url params="action:delete" /}}");'/>
+        </div>
+
+      {{/form}}
+
+    </div>
+
+{{/wrap}}

Added: 3.x/trunk/limb/cms/template/admin_user/edit.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/edit.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/edit.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,11 @@
+{{wrap with="_cms/popup.phtml" into="content_zone"}}
+  {{form id='user_form' name='user_form' method='post' enctype="multipart/form-data" runat='server'}}
+
+    <h1>Редактирование пользователя</h1>
+
+  {{include file='_cms/form_errors.phtml'/}}
+	{{include file='admin_user/edit_form_fields.phtml'/}}
+	{{include file='_cms/edit_common_elements.phtml'/}}
+
+  {{/form}}
+{{/wrap}}
\ No newline at end of file

Added: 3.x/trunk/limb/cms/template/admin_user/edit_form_fields.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/admin_user/edit_form_fields.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/admin_user/edit_form_fields.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,11 @@
+<div class='tabs'>
+
+  <ul>
+    <li id='properties'><a>Свойства</a></li>
+  </ul>
+
+  <div id="tab_properties">
+    {{include file='admin_user/common_fields.phtml'/}}
+  </div>
+
+</div>

Added: 3.x/trunk/limb/cms/template/user/login.phtml
===================================================================
--- 3.x/trunk/limb/cms/template/user/login.phtml	                        (rev 0)
+++ 3.x/trunk/limb/cms/template/user/login.phtml	2008-03-30 14:42:56 UTC (rev 6871)
@@ -0,0 +1,58 @@
+<!-- Powered by LIMB | http://www.limb-project.com/ -->
+<!-- Designed by BIT | http://www.bit-creative.com/ -->
+<html>
+<head>
+  <title>Authorization</title>
+  <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
+  <link rel=stylesheet type="text/css" href="/shared/cms/styles/cp.css" />
+  {{include file='_cms/js.phtml'/}}
+</head>
+<body id='login_form'>
+
+  <div id="login_form_wrapper">
+
+    <form method="POST" id='user_form' runat='server'>
+
+        <div id="logo_limb">
+          <span><img src="/shared/cms/images/limb_login.gif"  width='110' height='30' alt='LIMB'/></span>
+        </div>
+
+        <div id="form_body">
+
+          <h1>Control panel</h1>
+
+          {{wrap with="_cms/dialog_central_part.html"}}
+
+          <div class='field'>
+            <label for='login'>Login:</label>
+            <input type="text" name="login" id="login" value="" title="Login" class='input'/>
+          </div>
+
+          <div class='field'>
+            <label for='passwd'>Password:</label>
+            <input type="text" name="password" id="password" type="password" title="Password" class='input'/>
+            <input type="submit" name='submitted' value='Enter' class='button'>
+          </div>
+          <a href="/user/forgot_password">I forgot my password!</a>
+
+          <input type='hidden' name='redirect' value='{$#request.redirect}' runat='client'/>
+
+          {{/wrap}}
+
+          {{include file='_cms/notify_zone.phtml'/}}
+
+        </div>
+
+    </form>
+
+    <span class='shadow_bottom'><span class='left'></span><span class='center'></span><span class='right'></span></span>
+    <span class='shadow_left'><span class='top'></span><span class='center'></span><span class='bottom'></span></span>
+    <span class='shadow_right'><span class='top'></span><span class='center'></span><span class='bottom'></span></span>
+
+
+  </div>
+
+
+
+</body>
+</html>
\ No newline at end of file



More information about the limb-svn mailing list