Skip to content

Commit

Permalink
ZMI
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho authored and dwt committed Jun 12, 2018
1 parent 4b7e141 commit 4e8f4aa
Show file tree
Hide file tree
Showing 26 changed files with 399 additions and 459 deletions.
15 changes: 1 addition & 14 deletions src/App/dtml/manage_form_title.dtml
@@ -1,16 +1,3 @@
<dtml-with keyword_args mapping>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
<tr class="location-bar">
<td align="left" valign="top">
<div class="form-title">
&dtml-form_title;
</div>
</td>
<td align="right" valign="top">
<div class="std-text">
&nbsp;
</div>
</td>
</tr>
</table>
<h2 class="zmi-form-title">&dtml-form_title;</h2>
</dtml-with>
8 changes: 8 additions & 0 deletions src/App/dtml/manage_page_footer.dtml
@@ -1,2 +1,10 @@
</body>
<script>
// Wrap form element with fluid-container if missing
$(function() {
if ( $('main.container-fluid').length==0 ) {
$('form').wrap('<main class="container-fluid"></main>');
}
});
</script>
</html>
4 changes: 4 additions & 0 deletions src/App/dtml/manage_page_header.dtml
Expand Up @@ -13,6 +13,10 @@
<dtml-in js_urls>
<script type="text/javascript" src="&dtml-sequence-item;"></script>
</dtml-in>

<!-- FONTAWESOME: to be integrated -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">

</head>
<!-- REFACT what is a better way to get the last part of the current URL? -->
<body class="zmi zmi-<dtml-var "meta_type.replace(' ', '-')"> zmi-<dtml-var "URL0[_.len(URL1)+1:]">">
20 changes: 10 additions & 10 deletions src/App/dtml/manage_tabs.dtml
Expand Up @@ -38,17 +38,17 @@
<li class="breadcrumb-item<dtml-if last> active</dtml-if>"
<dtml-if last> aria-current="page"</dtml-if>>
<dtml-if last>
&dtml-title;
<strong class="ml-1">
<span class="&dtml-zmi_icon;"
title="&dtml-meta_type;"></span>
<dtml-if meta_type>&dtml-meta_type;<dtml-else>Object</dtml-if>
</strong>
<dtml-if wl_isLocked>
<span class="badge badge-warning">Locked</span>
</dtml-if wl_isLocked>
<span title="<dtml-if meta_type>&dtml-meta_type;<dtml-else>Object</dtml-if>">
<i class="&dtml-zmi_icon;" title="&dtml-meta_type;"></i>
<strong>&dtml-title;</strong>
<dtml-if wl_isLocked>
<span class="badge badge-warning">Locked</span>
</dtml-if wl_isLocked>
</span>
<dtml-else>
<a href="&dtml-url;">&dtml-title;</a>
<a href="&dtml-url;" class="text-primary"
title="<dtml-if meta_type>&dtml-meta_type;<dtml-else>Object</dtml-if>"
>&dtml-title;</a>
</dtml-if>
</li>
</dtml-in>
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/access.dtml
Expand Up @@ -5,7 +5,7 @@
</dtml-if>
</dtml-with>

<main class="container-fluid <dtml-var "meta_type.replace(' ', '-')"> <dtml-var "URL0[_.len(URL1)+1:]">">
<main class="container-fluid">
<p class="form-help">
The listing below shows the current security settings for this item.
Permissions are rows and roles are columns. Checkboxes are used to
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/addOrderedFolder.dtml
Expand Up @@ -4,7 +4,7 @@
form_title='Add Folder (Ordered)'
)">

<main>
<main class="container-fluid">

<p class="form-help">
An ordered Folder contains other objects. Use Folders to organize your
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/addUser.dtml
@@ -1,6 +1,6 @@
<dtml-var manage_page_header>

<main>
<main class="container-fluid">

<dtml-var "manage_form_title(this(), _, form_title='Add User')">

Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/documentAdd.dtml
@@ -1,6 +1,6 @@
<dtml-var manage_page_header>

<main>
<main class="container-fluid">

<dtml-var "manage_form_title(this(), _,
form_title='Add DTML Document'
Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/documentEdit.dtml
@@ -1,7 +1,7 @@
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<main>
<main class="container-fluid">

<p class="form-help">
You may edit the source for this document using the form below. You
Expand Down
91 changes: 46 additions & 45 deletions src/OFS/dtml/editUser.dtml
@@ -1,71 +1,72 @@
<dtml-var manage_page_header>

<main>
<main class="container-fluid">

<dtml-var "manage_form_title(this(), _, form_title='Change User')">

<FORM ACTION="manage_users" METHOD="POST" class="zmi-user">
<form action="manage_users" method="post" class="zmi-user">
<div class="form-group row">
<label for="name" class="form-label col-sm-3 col-md-2">
Name
</label>
<div id="name" class="form-text col-sm-9 col-md-6">
<dtml-var expr="user.name" html_quote>
</div>
<label for="name" class="form-label col-sm-3 col-md-2">Name</label>
<div class="col-sm-9 col-md-6">
<input class="form-control disabled"
disabled="disabled"
value="<dtml-var expr="user.name" html_quote>" />
</div>
<input type="hidden" name="name" value="<dtml-var expr="user.name" html_quote>" />
</div>

<dtml-if remote_user_mode__>
<INPUT TYPE="HIDDEN" NAME="password" value="&dtml-password;" />
<INPUT TYPE="HIDDEN" NAME="confirm" value="&dtml-password;" />
<input type="hidden" name="password" value="&dtml-password;" />
<input type="hidden" name="confirm" value="&dtml-password;" />
<dtml-else>
<div class="form-group row">
<label for="pw" class="form-label col-sm-3 col-md-2">
New Password
</label>
<INPUT id="pw" class="form-control col-sm-9 col-md-6" TYPE="PASSWORD" NAME="password" SIZE="30" value="password" />
<label for="pw" class="form-label col-sm-3 col-md-2">New Password</label>
<div class="col-sm-9 col-md-6">
<input id="pw" class="form-control" type="password" name="password" value="password" />
</div>
</div>
<div class="form-group row">
<label for="confirm" class="form-label col-sm-3 col-md-2">
(Confirm)
</label>
<INPUT id="confirm" class="form-control col-sm-9 col-md-6" TYPE="PASSWORD" NAME="confirm" SIZE="30" value="pconfirm" />
<label for="confirm" class="form-label col-sm-3 col-md-2">(Confirm)</label>
<div class="col-sm-9 col-md-6">
<input id="confirm" class="form-control" type="password" name="confirm" value="pconfirm" />
</div>
</div>
</dtml-if>

<div class="form-group row">
<label for="domains" class="form-label col-sm-3 col-md-2">
Domains
</label>
<INPUT id="domains" class="form-control col-sm-9 col-md-6" TYPE="TEXT" NAME="domains:tokens" SIZE="30"
VALUE="<dtml-if expr="user.domains"><dtml-in expr="user.domains">&dtml-sequence-item; </dtml-in></dtml-if>" />
<label for="domains" class="form-label col-sm-3 col-md-2">Domains</label>
<div class="col-sm-9 col-md-6">
<input id="domains" class="form-control" type="text" name="domains:tokens"
value="<dtml-if expr="user.domains"><dtml-in expr="user.domains">&dtml-sequence-item; </dtml-in></dtml-if>" />
</div>
</div>

<div class="form-group row">
<label for="roles" class="form-label col-sm-3 col-md-2">
Roles
</label>
<SELECT id="roles" class="form-control col-sm-9 col-md-6" NAME="roles:list" SIZE="5" MULTIPLE>
<dtml-in valid_roles>
<dtml-if expr="_vars['sequence-item'] != 'Authenticated'">
<dtml-if expr="_vars['sequence-item'] != 'Anonymous'">
<dtml-if expr="_vars['sequence-item'] != 'Shared'">
<dtml-if expr="_vars['sequence-item'] in user.roles">
<OPTION VALUE="&dtml-sequence-item;" selected>&dtml-sequence-item;
<dtml-else>
<OPTION VALUE="&dtml-sequence-item;">&dtml-sequence-item;
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-in valid_roles>
</SELECT>
<label for="roles" class="form-label col-sm-3 col-md-2">Roles</label>
<div class="col-sm-9 col-md-6">
<select id="roles" class="form-control col"
name="roles:list" size="5" multiple="multiple">
<dtml-in valid_roles>
<dtml-if expr="_vars['sequence-item'] != 'Authenticated'">
<dtml-if expr="_vars['sequence-item'] != 'Anonymous'">
<dtml-if expr="_vars['sequence-item'] != 'Shared'">
<dtml-if expr="_vars['sequence-item'] in user.roles">
<option value="&dtml-sequence-item;" selected>&dtml-sequence-item;
<dtml-else>
<option value="&dtml-sequence-item;">&dtml-sequence-item;
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-if>
</dtml-in valid_roles>
</select>
</div>
</div>

<INPUT TYPE="HIDDEN" NAME="name" VALUE="<dtml-var expr="user.name" html_quote>" />
<div class="controls">
<INPUT class="btn btn-primary" TYPE="SUBMIT" NAME="submit" VALUE="Change" />
<div class="zmi-controls">
<input class="btn btn-primary" type="submit" name="submit" value="Change" />
</div>
</FORM>
</form>

</main>

Expand Down
2 changes: 1 addition & 1 deletion src/OFS/dtml/fileEdit.dtml
@@ -1,7 +1,7 @@
<dtml-var manage_page_header>
<dtml-var manage_tabs>

<main>
<main class="container-fluid">

<p class="form-help">
You can update the data for this file object using the form below.
Expand Down

0 comments on commit 4e8f4aa

Please sign in to comment.