Permalink
Browse files

Changed the user interface of the settings tab

  • Loading branch information...
1 parent 979ef69 commit c2ef0c687cb13dd469a83c6ea1b6408f7732e614 @gardeman gardeman committed Feb 2, 2010
View
7 qanban/grails-app/i18n/messages.properties
@@ -176,12 +176,13 @@ settings.update=Update
settings.delete=Delete
settings.usersHeader=Users
settings.editFieldHeader=EditField
-settings.infoHeader=Settings Info
-settings.infoText=This is the user settings page. Here you can make changes to users. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent mauris nibh, lacinia in lacinia id, vestibulum vestibulum risus. Morbi quis aliquet leo. Curabitur urna augue, facilisis a pulvinar at, facilisis vitae sapien. Suspendisse quis gravida metus. Vivamus et velit sed lectus dapibus egestas. Integer sollicitudin sapien ut elit fermentum sit amet congue metus iaculis. Donec turpis neque, condimentum eget auctor eget, dignissim nec urna. Etiam nec lorem lacus. Nam faucibus odio at metus fringilla fermentum. Sed porta libero vel leo accumsan pretium. Fusce auctor suscipit massa condimentum congue. Integer quis purus sit amet arcu pellentesque tincidunt ut non quam. Donec scelerisque libero luctus eros laoreet consequat. Praesent ornare pretium nibh, non tincidunt odio molestie eleifend. Vivamus volutpat, ipsum eget ullamcorper tincidunt, nulla mauris lobortis justo, quis mollis sem nisl vitae leo. Nunc scelerisque pretium mi, at venenatis quam varius eget. Morbi ac neque id lorem dictum pulvinar. Aliquam sit amet leo sit amet massa rhoncus eleifend. Ut tincidunt metus id tellus congue tristique.
settings.filter=Filter by role:
settings.generatePassword=Generate Password
-settings.menu.addUser=Add User
+settings.tabs.userManagement=User management
+
+settings.infoHeader=User Management
+settings.infoText=<p>This is where you can manage your Qanban users.</p><p>You are able to modify the user's settings, their authorities, name etc. and delete/disable them. ( If a user doesn't have any roles, he/she won't be able to log in. )</p><p>You are also able to add new users to your Qanban application.</p><p>However you are not able to change your own user's settings through this interface, to do this please use your avatar in the upper right corner.</p>
users.username = Username
users.userRealName = Real Name
View
1 qanban/grails-app/views/layouts/inside.gsp
@@ -6,6 +6,7 @@
<link rel="stylesheet" href="${resource(dir:'css',file:'cardDialog.css')}" />
<link rel="stylesheet" href="${resource(dir:'css',file:'phaseDialog.css')}" />
<link rel="stylesheet" href="${resource(dir:'css',file:'userDialog.css')}" />
+ <link rel="stylesheet" href="${resource(dir:'css',file:'settings.css')}" />
<link rel="shortcut icon" href="${resource(dir:'images',file:'favicon.ico')}" type="image/x-icon" />
<g:layoutHead />
View
3 qanban/grails-app/views/mainView/view.gsp
@@ -61,9 +61,10 @@
</div>
-
+ <div id="wrapPlacer">
<div id="wrapper">
<g:render template="/board/board" bean="${board}" />
</div>
+ </div>
</body>
View
27 qanban/grails-app/views/settings/_emptyEdit.gsp
@@ -1,27 +0,0 @@
-<%@ page contentType="text/html;charset=UTF-8"%>
-<div class="emptyEdit">
- <div class="editUserData">
- <span class="username">
- <label><g:message code="_userForm.label.username"/></label>
- <input type="text" class="property" name="username"/>
- </span><br/>
- <span class="userRealName">
- <label><g:message code="_userForm.label.userRealName"/></label>
- <input type="text" class="property" name="userRealName"/>
- </span><br/>
- <span class="email">
- <label><g:message code="_userForm.label.email"/></label>
- <input type="text" class="property" name="email"/>
- </span>
- <span class="description">
- <label><g:message code="_userForm.label.description"/></label>
- <textarea type="text" class="property description" name="description"></textarea>
- </span>
- <div class="roles">
- <label><g:message code="_userForm.label.roles"/></label><br/>
- <g:each var="role" in="${roles}">
- <g:checkBox name="${role.authority}"/> <label>${role.authority}</label>
- </g:each>
- </div>
- </div>
-</div>
View
43 qanban/grails-app/views/settings/_showSettings.gsp
@@ -1,44 +1,21 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<g:setProvider library="jquery"/>
-<link rel="stylesheet" href="${resource(dir:'css',file:'settings.css')}" />
<div id="settings">
- <div id="addUserMenu">
+
+ <div id="settingsMenu">
<ul>
- <li><a href="#" class="addUserLink"><g:message code="settings.menu.addUser"/></a></li>
+ <li class="active"><a href="#"><g:message code="settings.tabs.userManagement"/></a></li>
</ul>
</div>
- <style>.board { margin-top: 30px !important; }</style>
- <div id="users" class="userColumn"><br/><h3 class="columnHeader"><g:message code="settings.usersHeader"/></h3><br/>
- <ul class="userList">
- <g:each var="user" in="${users}">
- <g:render template="/user/user" bean="${user}"/>
- </g:each>
- </ul>
- <div class="userFilter"><g:message code="settings.filter"/><br/>
- <g:each var="role" in="${roles}">
- <input type="radio" name="role.id" value="${role.id}" id="filterButton"/><label>${role.authority}</label>
- </g:each>
- <br/>
- </div>
- </div>
- <div id="editField" class="editColumn"><br/><h3 class="columnHeader"><g:message code="settings.editFieldHeader"/></h3><br/>
- <div id="editBox">
- <g:if test="${editUser}">
- <g:render template="/user/editUser" model="[ 'editUser' : editUser , 'roles' : roles ]"/>
- </g:if>
- <g:else>
- <g:render template="/settings/emptyEdit" model="[ 'roles' : roles]"/>
- </g:else>
- </div>
- %{--<div id="passwordBox">--}%
- %{--<g:render template="/settings/generatePassword"/>--}%
- %{--</div>--}%
+ <div id="settingsContainer">
+ <g:render template="/settings/userManagement" model="[users:users,roles:roles]"/>
</div>
- <div id="settingsInfo" class="infoColumn"><br/><h3 class="columnHeader"><g:message code="settings.infoHeader"/></h3><br/>
- <div id="infoBox">
- <g:message code="settings.infoText"/>
- </div>
+
+ <div id="settingSummary">
+ <h3><g:message code="settings.infoHeader"/> </h3>
+ <g:message code="settings.infoText"/>
</div>
+
</div>
View
32 qanban/grails-app/views/settings/_userManagement.gsp
@@ -0,0 +1,32 @@
+<%@ page contentType="text/html;charset=UTF-8"%>
+
+<g:setProvider library="jquery"/>
+
+<div id="users" class="userColumn">
+ <span class="ui-icon ui-icon-contact"/>
+ <a href="#" class="addUserLink ui-icon ui-icon-circle-plus right"> </a>
+ <h3 class="columnHeader"><g:message code="settings.usersHeader"/></h3>
+
+ <ul class="userList">
+ <g:each var="user" in="${users}">
+ <g:render template="/user/user" bean="${user}"/>
+ </g:each>
+ </ul>
+ <div class="userFilter">
+ <label for="role.id"><g:message code="settings.filter"/></label>
+ <g:each var="role" in="${roles}">
+ <input type="radio" name="role.id" value="${role.id}" id="filterButton"/><label>${role.authority}</label>
+ </g:each>
+ <br/>
+ </div>
+</div>
+
+<div id="editUserCol">
+ <span class="ui-icon ui-icon-person"/>
+ <h3 class="columnHeader"><g:message code="settings.editFieldHeader"/></h3>
+ <div id="editBox">
+ <g:render template="/user/editUser"/>
+ </div>
+
+</div>
+<img class="bottomGfx" src="${resource(dir:"images", file:"userSettings.png")}" alt="user settings"/>
View
80 qanban/grails-app/views/user/_editUser.gsp
@@ -2,49 +2,59 @@
<g:setProvider library="jquery"/>
-<g:if test="${flash.message}">
- <div class="message">${flash.message}</div>
-</g:if>
-<g:hasErrors bean="${person}">
- <div>
- <g:renderErrors bean="${person}" as="list" />
- </div>
-</g:hasErrors>
-
-<div class="editUser" id="user_${person.id}">
- <div class="editUserData">
- <g:if test="${person.id == loggedInUser.id}"><g:message code="_userForm.updateYourself"/></g:if>
+<div class="editUser" id="user_${person?.id}">
<g:formRemote url="[controller:'user',action: 'update', params: [ format : 'html' , template : 'editUser' ]]"
update="editBox" name="editUserForm"
onSuccess="jQuery('#editBox').qRefreshDialog({formData: data, url: resources.userShowURL});">
- <span class="username">
+
<label for="username"><g:message code="_userForm.label.username"/></label>
- <input type="text" class="property ${hasErrors(bean:person,field:'username','errors')}" name="username" readonly="readonly" value="${person.username?.encodeAsHTML()}"/>
- </span><br/>
- <span class="userRealName">
+ <input type="text" class="property ${hasErrors(bean:person,field:'username','errors')}" name="username" readonly="readonly" value="${person?.username?.encodeAsHTML()}"/>
+
<label for="userRealName"><g:message code="_userForm.label.userRealName"/></label>
- <input type="text" class="property ${hasErrors(bean:person,field:'userRealName','errors')}" name="userRealName" value="${person.userRealName?.encodeAsHTML()}"/>
- </span><br/>
- <span class="email">
+ <input type="text" class="property ${hasErrors(bean:person,field:'userRealName','errors')}" name="userRealName" value="${person?.userRealName?.encodeAsHTML()}"/>
+
<label for="email"><g:message code="_userForm.label.email"/></label>
- <input type="text" class="property ${hasErrors(bean:person,field:'email','errors')}" name="email" value="${person.email?.encodeAsHTML()}"/>
- </span><br/>
- <span class="description">
+ <input type="text" class="property ${hasErrors(bean:person,field:'email','errors')}" name="email" value="${person?.email?.encodeAsHTML()}"/>
+
<label for="description"><g:message code="_userForm.label.description"/></label>
- <textarea type="text" class="property description ${hasErrors(bean:person,field:'description','errors')}" name="description">${person.description?.encodeAsHTML()}</textarea>
- </span><br/>
- <div class="roles">
- <label for="roles"><g:message code="_userForm.label.roles"/></label><br/>
- <g:each var="entry" in="${roleMap}">
- ${entry.key.authority.encodeAsHTML()}
- <g:checkBox name="${entry.key.authority}" value="${entry.value}"/>
- </g:each>
- <input type="hidden" name="id" value="${person.id}"/>
- <input type="submit" class="ui-state-default ui-corner-all editInput" <g:if test="${person.id == loggedInUser.id}">disabled="disabled"</g:if> value="<g:message code="settings.update"/>"/>
- </div>
+ <textarea type="text" class="property description ${hasErrors(bean:person,field:'description','errors')}" name="description">${person?.description?.encodeAsHTML()}</textarea>
+
+ <g:if test="${roleMap}">
+
+ <label for="roles"><g:message code="_userForm.label.roles"/></label>
+
+
+ <div class="roles">
+ <ul>
+ <g:each var="entry" in="${roleMap}">
+ <li>
+ <g:checkBox name="${entry.key.authority}" value="${entry.value}"/>
+ <span class='roleLabel'>${entry.key.authority.encodeAsHTML()}</span>
+ </li>
+ </g:each>
+ </ul>
+ </div>
+ </g:if>
+
+ <input type="hidden" name="id" value="${person?.id}"/>
+ <input type="submit" class="ui-state-default ui-corner-all editInput" <g:if test="${person?.id == loggedInUser?.id}">disabled="disabled"</g:if> value="<g:message code="settings.update"/>"/>
+ <button class="ui-state-default ui-corner-all editInput deleteUserLink" id="user_${person?.id}"><g:message code="settings.delete"/></button>
+
</g:formRemote>
- <a href="#" class="deleteUserLink" id="user_${person.id}"><button class="ui-state-default ui-corner-all editInput" id="deleteUserDialog"><g:message code="settings.delete"/></button></a>
- </div>
+
+
+
</div>
+<g:if test="${flash.message}">
+ <div class="message ui-state-highlight"><span class="ui-icon ui-icon-info"/>${flash.message}</div>
+</g:if>
+<g:if test="${person && person.id == loggedInUser.id}">
+ <div class="message ui-state-highlight"><span class="ui-icon ui-icon-info"/><g:message code="_userForm.updateYourself"/></div>
+</g:if>
+<g:hasErrors bean="${person}">
+ <div class="message ui-state-error"><span class="ui-icon ui-icon-alert"/>
+ <g:renderErrors bean="${person}" as="list" />
+ </div>
+</g:hasErrors>

0 comments on commit c2ef0c6

Please sign in to comment.