Changeset 44


Ignore:
Timestamp:
Jan 31, 2009, 10:33:34 AM (16 years ago)
Author:
gav
Message:

Update main layout.
Create and add topBg.png
Basic auth for admin/user adjust BoosStrap? and controllers to match.

Location:
trunk/src
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/grails-app/conf/BootStrap.groovy

    r40 r44  
    4343           
    4444        //Person
    45         new Person(personGroup:PersonGroup.get(1),
     45        new Person(personGroup:PersonGroup.get(3),
    4646            firstName:"Admin",
    4747            lastName:"Powers",
     
    4949            password:"pass").save()
    5050        new Person(personGroup:PersonGroup.get(1),
    51             firstName:"User",
    52             lastName:"Tester",
     51            firstName:"Demo",
     52            lastName:"Danza",
    5353            userId:"user",
    5454            password:"pass").save()
  • trunk/src/grails-app/controllers/PersonController.groovy

    r40 r44  
    9292            if (person) {
    9393                    session.userId = person.userId
     94                    def greeting = "Hi "+person.firstName+" "+person.lastName
    9495                    def redirectParams =
    9596                        session.originalRequestParams ?
    9697                        session.originalRequestParams : [controller:'task']
     98        flash['message'] = "${greeting}"
    9799                    redirect(redirectParams)
    98100            }
  • trunk/src/grails-app/views/_adminmenubar.gsp

    r40 r44  
    11<g:if test="${session.userId}">
    2     <span class="appControlButton">
    3         <g:link controller="task" action="list">
    4                 Task
    5         </g:link>
    6     </span>
    7     <span class="appControlButton">
    8         <g:link controller="person" action="admin">
     2    <g:if test="${session.userId == 'admin'}">
     3        <span class="appControlButton">
     4            <g:link controller="person" action="admin">
    95                Admin
    10         </g:link>
    11     </span>
     6            </g:link>
     7        </span>
     8    </g:if>
    129    <span class="appControlButton">
    1310        <g:link controller="person" action="logout">
    14                Log out
     11                Log out
    1512        </g:link>
    1613    </span>
  • trunk/src/grails-app/views/layouts/main.gsp

    r41 r44  
    55        <link rel="shortcut icon" href="${createLinkTo(dir:'images',file:'gnuMimsIcon.ico')}" type="image/x-icon" />
    66        <g:layoutHead />
    7         <g:javascript library="application" />                         
     7        <g:javascript library="application" />
    88    </head>
    99    <body>
    1010    <div id="wrapper" style="height: 100%;">
     11    <div id="top">
     12    </div>
    1113    <div id="content" align="center">
    1214        <div id="spinner" class="spinner" style="display:none;">
  • trunk/src/grails-app/views/person/login.gsp

    r40 r44  
    77</head>
    88    <body>
    9         <div class="nav">
    10             <span class="menuButton">
    11 <!--                 <a class="home" href="${createLinkTo(dir:'')}">Home</a> -->
    12             </span>
    13         </div>
     9
    1410        <div class="body">
    1511            <h1>Please log in</h1>
     
    1713                <div class="message">${flash.message}</div>
    1814            </g:if>
     15            The demo users are "admin" and "user" both having password "pass"
    1916            <g:hasErrors bean="${person}">
    2017                <div class="errors">
  • trunk/src/web-app/css/public.css

    r43 r44  
    2424  padding: 0;
    2525  width: 1024px;
    26   text-align: left;
     26}
     27
     28#top {
     29  background: url("../images/topBg.png") no-repeat scroll center;
     30  width: 1020px;
     31  height: 44px;
    2732}
    2833
     
    3742  background: transparent url("../images/logo.png") no-repeat scroll center;
    3843  width: 980px;
    39   height: 200px;
     44  height: 160px;
    4045}
    4146
     
    8388}
    8489
     90/* Login/out and Admin*/
     91
     92.appcontrol {
     93    text-align: right;
     94    padding: 5px 160px 5px 5px
     95}
     96
     97.appcontrolButton {
     98    font-size: 10px;
     99    padding: 5px 5px;
     100}
     101
    85102/* NAVIGATION MENU */
    86103
    87104.nav {
    88 
    89     padding-top: 20px;
    90105    background: url("../images/linkPanel_long.png") top no-repeat;
    91106    /*border: 1px solid #ccc;
     
    94109    width: 650px;
    95110    height: 40px;
    96 }
    97 
    98 .appcontrol {
    99     text-align: right;
    100     padding: 5px 160px 5px 5px
    101 }
    102 
    103 .appcontrolButton {
    104     font-size: 10px;
    105     padding: 5px 5px;
    106111}
    107112
Note: See TracChangeset for help on using the changeset viewer.