Skip to content

Commit

Permalink
new css work and users, login page modified
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaugha committed Jul 4, 2011
1 parent 715c5ae commit 6e1e993
Show file tree
Hide file tree
Showing 16 changed files with 161 additions and 121 deletions.
7 changes: 4 additions & 3 deletions app/controllers/users_controller.rb
Expand Up @@ -30,7 +30,7 @@ def index
end
end

def create
def create
setup_groups
create_old
end
Expand All @@ -41,8 +41,9 @@ def reset_password
@user.reset_password
@user.current_user = current_user
if @user.save
flash[:notice] = "User was successfully created: #{@user.password}"
redirect_to(user_url(@user.id))

flash[:notice] = "User was successfully created: #{@user.password}"

else
flash[:notice] = "some error occurred"
render :action => "show"
Expand Down
2 changes: 2 additions & 0 deletions app/guards/users_guard.rb
Expand Up @@ -5,4 +5,6 @@
:update => [:users],
:new => [:users],
:create => [:users],
:reset_password => [:users],
:destroy => [] })

8 changes: 4 additions & 4 deletions app/views/bills/index.html.erb
Expand Up @@ -16,7 +16,7 @@
<div class="content">
<div class="mainbar">
<p class="infopost">
<font color=darkred size=3><b> Welcome ! </b><br></font>
<font color=darkgreen size=3><b> Welcome ! </b><br></font><br>
<font color=darkgreen >Thank you for signing in for your needs to receive details of telephone, tuckshop, medical, transport expenses and salary details.</font><br><br>

<font color=#001900>We trust that through the intranet staff members can interface better with the school administration and accounts for any clarification they require.</font><br><br>
Expand All @@ -28,18 +28,18 @@

<br>
<div style="color:darkgreen; margin-left:1.5em; font-size:14px; font-weight:bold">
<img src="<%= url_for(:controller => :bills) %>/../bill.png" width="25" title="months" height="25" alt="image">&nbsp;&nbsp;&nbsp;<%= @dir %>
<%= @dir %>
</div>


<% @files.each do |file| %>
<div style="margin-top:1em; margin-left:1.5em; background-color:lightblue; width: 190px; padding: 5px 0px 5px 16px;">
<div style="margin-top:1em; margin-left:1.5em; background-color:lightgray; width: 190px; padding: 6px 0px 0px 16px;">
<img src="<%= url_for(:controller => :bills) %>/../dot.png" width="20" height="20" alt="image">&nbsp;&nbsp;&nbsp;<a href="<%= file %>"><%= file.to_display %></a></div>
<% end %>

<br><br>
<% if @dir %>
<a style="color:darkblue; text-decoration:none; font-size:13px; font-weight:bold;" href=".."><img src="<%= url_for(:controller => :bills) %>/../back.png" width="32" height="32" border="0" alt="image"></a></div>
<% end %>
<% end -%>
Expand Down
1 change: 1 addition & 0 deletions app/views/books/new.html.erb
@@ -1,3 +1,4 @@
<%= render :partial => "common/head", :locals => { :prefix => "book", :fuzzy => true, :path => books_path, :new_path => nil, :delete_path => nil } %>
<%= render :partial => "form", :locals => { :disabled => false } %>
2 changes: 2 additions & 0 deletions app/views/common/_head.html.erb
Expand Up @@ -23,6 +23,8 @@ form_tag delete_path, :method=>"delete", :style=>"float:right;" do %>
<input class="button" type="submit" value="delete"/>
<% end
end -%>


</div>
<% end -%>
</div>
17 changes: 16 additions & 1 deletion app/views/layouts/sahyadri.html.erb
Expand Up @@ -9,10 +9,12 @@
<% end -%>
<title> Books & Bills : <%= controller.action_name %></title>
<%= stylesheet_link_tag 'sahyadri' %>
<%= stylesheet_link_tag 'scaffold' %>
</head>

<h1>Sahyadri School</hr><small>krishnamurti foundation india</small></h1>

<h1><a href="http://intranet">Sahyadri School</a><small>krishnamurti foundation india</small></h1>
<hr size=6 color=orange width=30%><br>


<body>
Expand Down Expand Up @@ -68,5 +70,18 @@
<%= yield %>

<br>
<p style="color:green;"><%= flash[:notice] %></p>


<div class="clr">
<div class="footer">
<p class="lf">&copy; Copyright <a href="http://www.sahyadrischool.org">sahyadri school</a> <span>Design by <a href="http://www.sahyadrischool.org/" title="website">sahyadri school</a></span></p>
<div class="clr"></div>

</div>



</body>
</html>
32 changes: 26 additions & 6 deletions app/views/sessions/login.html.erb
@@ -1,13 +1,33 @@
<form method="post">
<br>
<div class=login_form><br>

<div align=center><img src="<%= url_for(:controller => :bills) %>/../Login.png" title="bills" border="0" width="48" height="48" alt="image"><br><br><font color=#0033FF>My account and Library management system</div><br>

<form style=margin-left:25%; method="post">

<p>
<label for="login">login</label><br />
<label for="login"><b>login </b></label><br />
<input type="text" name="login" />
</p>
<p>
<label for="password">password</label><br />
<label for="password"><b>password </b></label><br />
<input type="password" name="password" />
</p>
<p>
<input type="submit" value="login" />
</p>
</form>
<input type="submit" class="button" value="login" />
</p>
</font>
</div><br><br><br>
<div class="content_resize">

<p class="infopost_new">This is a restricted network. Use of this network, its equipment, and resources is monitored at all times and requires explicit permission from the network administrator. <br><br>

<a href="mailto:sahyadri@mail"><font color=darkblue> Contact &nbsp;</font></a>administrator to report a problem or if you have forgotten your password. This facility is available only for teachers and staff.<br></p>



</div></form>



</div></div>
2 changes: 2 additions & 0 deletions app/views/users/_form.html.erb
Expand Up @@ -48,3 +48,5 @@ end

</div>
<% end %>


7 changes: 7 additions & 0 deletions app/views/users/edit.html.erb
@@ -1,7 +1,14 @@
<h2>Users Management System</h2>
<%= render :partial => "common/head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :delete_path => user_path(@user.id) } %>

<div id="body" style="clear: both;">


<%= render :partial => "form", :locals => { :disabled => false } %>

<form>
<input type="button" class="button" title="reset_password" value="reset password" onclick="location.href='<%= "reset_password" %>'">
</form>


</div>
6 changes: 5 additions & 1 deletion app/views/users/index.html.erb
@@ -1,5 +1,4 @@
<h2>Users Management System</h2>

<%= render :partial => "common/index_head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :csv => false } %>

<div id="body" style="clear: both;">
Expand Down Expand Up @@ -27,4 +26,9 @@
<h3>no user found</h3>

<% end -%>
<%= yield %>


</div>
63 changes: 63 additions & 0 deletions app/views/users/reset_password.erb
@@ -0,0 +1,63 @@
<h2>Users Management System</h2>
<%= render :partial => "common/head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :delete_path => user_path(@user.id) } %>

<div id="body" style="clear: both;">
</div>

<div style="margin-top:2em;">

<form>
<input type="button" class="button" title="edit user" value="edit user" onclick="location.href='<%= edit_user_path %>'">
<input type="button" class="button" title="reset_password" value="reset password" onClick="location.href='<%= "reset_password" %>'">
</form><br>


<div style="margin-top:1em; font-weight:normal; color:black;">
<font color="black"><b>Account details : </b></font></div>

<div style="margin-top:1em; font-weight:normal; color:black;">
<table border="2" bordercolor="orange" style="background-color:white" width="500" cellpadding="6" cellspacing="2">



<tr>

<td><b><font color=red> * </font>Name :</b> </td>
<td><%= render :text => "#{@user.name}" %></td>

</tr>
<tr>
<td><b><font color=red> * </font> Login : </b></td>
<td><%= render :text => "#{@user.login}" %> </td>
</tr>
<tr>
<td><b><font color=red> * </font> Login id : </b></td>
<td><%= render :text => "#{@user.id}" %> </td>
</tr>

<tr>
<td><b><font color=red> * </font> New password :</b></td>
<td><%= render :text => "#{@user.password}" %></td>
</tr>

<tr>
<td><b><font color=red> * </font> Email ID :</b></td>
<td><%= render :text => "#{@user.email}" %></td>
</tr>


<tr>
<td><b><font color=red> * </font> Primary Group :</b></td>
<td><%= render :text => "#{@user.primary}" %></td>
</tr>

<tr>
<td><b><font color=red> * </font> Groups :</b></td>
<td><%= render :text => "#{@user.group_ids}" %></td>
</tr>


</table>
</div>

</div>
2 changes: 2 additions & 0 deletions app/views/users/show.html.erb
@@ -1,3 +1,5 @@
<h2>Users Management System</h2>

<%= render :partial => "common/head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :delete_path => user_path(@user.id) } %>

<div id="body" style="clear: both;">
Expand Down
Binary file added public/020.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Login.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 27 additions & 12 deletions public/stylesheets/sahyadri.css
@@ -1,21 +1,26 @@

body {margin-left:.9em; margin-right:1em; padding:0; width:98%; color:#333333; font:bold 13px/1.6em "Liberation sans", Arial, Verdana, Helvetica, sans-serif; background:#efecec;}
body {margin-left:.9em; margin-right:1em; padding:0; width:98%; color:#333333; font:bold 13px/1.6em "Liberation sans", Arial, Verdana, Helvetica, sans-serif; background:#ececec;}


.clr { float:left; padding:0; margin:0px 0 0 0px; width:100%; font-size:0px; line-height:0px;}
.logo { padding:0; width:auto;}
h1 { margin-top:12px; color:#009966; padding:10px 0 0px; font:bold 22px 'Lucida Console', Monaco, monospace; letter-spacing:-0.1px; text-align:center;}

h1 { margin:0; padding:0px 0 10px; color:#959595; font:bold 21px/1.8em "Liberation", Arial, Helvetica, sans-serif; letter-spacing:-1px; text-align:center;}
h1 a, h1 a:hover { color:#666666; text-decoration:none; text-transform:uppercase}
h1 span { text-transform:uppercase; font-weight:normal;}
h1 small { display:block; font:normal 13px/1.2em "Liberation sans", Arial, Helvetica, sans-serif; letter-spacing:normal; color:#666666; text-transform:none;}
h2 { margin-top:2px; color:darkblue; padding:0px 0 0px; background-color:lightblue; font:bold 20px/1.8em "Liberation", Arial, Helvetica, sans-serif; letter-spacing:-1px; text-align:center;}
h1 small { display:block; font:normal 13px/1.9em "Liberation sans", Arial, Helvetica, sans-serif; letter-spacing:normal; color:#666666; text-transform:none;}
h2 { margin-top:2px; color:#0033FF; padding:2px 0 1px; background-color:lightblue; font:bold 17px/1.8em 'Lucida Console', Monaco, monospace; letter-spacing:0px; text-align:center;}




p { margin:8px 0; padding:0 0 8px 0; font:normal 13px/1.7em "Liberation sans", Arial, Helvetica, sans-serif;}

p { margin:8px 0; padding:0 0 8px 0; font:normal 13px/2em "Liberation sans", Arial, Helvetica, sans-serif;}
a { color:#001900; text-decoration:underline;}
p.spec { padding:0 0 16px;}
p.infopost { margin-bottom:12px; padding:6px 12px; background-color:#fff; color:#6d6d6d; border:1px solid #c9c9c9;}
p.infopost a { color:#6d6d6d;}

p.infopost_new { width:538px; margin-left:20.4%; font:normal 12px/1.4em "Liberation", Arial, Helvetica, sans-serif; margin-bottom:0px; padding:6px 14px; background-color:#fff; color:#404040; border:1px solid #c9c9c9;}

a.rm { color:#fff; padding:6px 16px; text-decoration:none; font-weight:bold; background-color:#495957;}
a.com { float:right; margin:0; text-decoration:none; color:#fff;}
a.com span { }
Expand Down Expand Up @@ -71,8 +76,8 @@ ul.sb_menu li a:hover, ul.ex_menu li a:hover { color:#495957; font-weight:bold;

/* footer */
.footer { border-top:1px solid #d4d4d4;}
.footer_resize { margin:0 auto; padding:12px 24px; width:912px;}
.footer p.lf { margin:0; padding:24px 0; text-align:left; width:auto; line-height:1.5em;}
.footer_resize { margin:0 auto; padding:0px 10px; width:912px;}
.footer p.lf { margin:0; padding:12px 0; text-align:left; width:auto; }
.footer p.lf a { color:#6d6d6d;}
.footer p.lf span { float:right;}

Expand All @@ -93,13 +98,23 @@ ol li .send { margin:16px 0 0 0;}



.login_form{
width: 38%;
margin-left: auto;
margin-right: auto;
height: 25em;
border: 1px solid #888888;
background-color:#FFCCFF;
}





#navigation{

font-size:13px;
margin-top:.1em;
margin-top:.2em;
padding-top: .7em;
background-color: lightgrey;
width: 100%;
Expand Down Expand Up @@ -193,14 +208,14 @@ input.button

#search tr.even
{
background-color: #eeeeee;
background-color: #FFFFCC;
}



#search thead tr
{
background-color: lightgray;
background-color: #CCCCCC;
color: darkred;
}

Expand Down

0 comments on commit 6e1e993

Please sign in to comment.