diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index cf4297e..20ca358 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -30,7 +30,7 @@ def index end end - def create +def create setup_groups create_old end @@ -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" diff --git a/app/guards/users_guard.rb b/app/guards/users_guard.rb index fb79cda..3acece2 100644 --- a/app/guards/users_guard.rb +++ b/app/guards/users_guard.rb @@ -5,4 +5,6 @@ :update => [:users], :new => [:users], :create => [:users], + :reset_password => [:users], :destroy => [] }) + diff --git a/app/views/bills/index.html.erb b/app/views/bills/index.html.erb index 9deee75..d438a7b 100644 --- a/app/views/bills/index.html.erb +++ b/app/views/bills/index.html.erb @@ -16,7 +16,7 @@

- Welcome !
+ Welcome !

Thank you for signing in for your needs to receive details of telephone, tuckshop, medical, transport expenses and salary details.

We trust that through the intranet staff members can interface better with the school administration and accounts for any clarification they require.

@@ -28,18 +28,18 @@

-image   <%= @dir %> +<%= @dir %>
<% @files.each do |file| %> -
+
image   <%= file.to_display %>
<% end %>

<% if @dir %> -image
+ <% end %> <% end -%> diff --git a/app/views/books/new.html.erb b/app/views/books/new.html.erb index f64d61b..3ad1f70 100644 --- a/app/views/books/new.html.erb +++ b/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 } %> diff --git a/app/views/common/_head.html.erb b/app/views/common/_head.html.erb index 22fa2d2..4856f83 100644 --- a/app/views/common/_head.html.erb +++ b/app/views/common/_head.html.erb @@ -23,6 +23,8 @@ form_tag delete_path, :method=>"delete", :style=>"float:right;" do %> <% end end -%> + +
<% end -%>
diff --git a/app/views/layouts/sahyadri.html.erb b/app/views/layouts/sahyadri.html.erb index c4870d5..51845dd 100644 --- a/app/views/layouts/sahyadri.html.erb +++ b/app/views/layouts/sahyadri.html.erb @@ -9,10 +9,12 @@ <% end -%> Books & Bills : <%= controller.action_name %> <%= stylesheet_link_tag 'sahyadri' %> + <%= stylesheet_link_tag 'scaffold' %> +

Sahyadri Schoolkrishnamurti foundation india

-

Sahyadri Schoolkrishnamurti foundation india

+

@@ -68,5 +70,18 @@ <%= yield %> +
+

<%= flash[:notice] %>

+ + +
+ + + + diff --git a/app/views/sessions/login.html.erb b/app/views/sessions/login.html.erb index 202e8c9..f57bef9 100644 --- a/app/views/sessions/login.html.erb +++ b/app/views/sessions/login.html.erb @@ -1,13 +1,33 @@ -
+
+



+
+ +

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.

+ + Contact  administrator to report a problem or if you have forgotten your password. This facility is available only for teachers and staff.

+ + + +
+ + + +
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 573c4a0..34ec473 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -48,3 +48,5 @@ end <% end %> + + diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index a971487..85076f9 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,7 +1,14 @@ +

Users Management System

<%= render :partial => "common/head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :delete_path => user_path(@user.id) } %>
+ <%= render :partial => "form", :locals => { :disabled => false } %> +
+'"> +
+ +
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 612ba6a..1884e0f 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -1,5 +1,4 @@

Users Management System

- <%= render :partial => "common/index_head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :csv => false } %>
@@ -27,4 +26,9 @@

no user found

<% end -%> + + +<%= yield %> + +
diff --git a/app/views/users/reset_password.erb b/app/views/users/reset_password.erb new file mode 100644 index 0000000..747c287 --- /dev/null +++ b/app/views/users/reset_password.erb @@ -0,0 +1,63 @@ +

Users Management System

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

+ + +
+Account details :
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* Name : <%= render :text => "#{@user.name}" %>
* Login : <%= render :text => "#{@user.login}" %>
* Login id : <%= render :text => "#{@user.id}" %>
* New password :<%= render :text => "#{@user.password}" %>
* Email ID :<%= render :text => "#{@user.email}" %>
* Primary Group :<%= render :text => "#{@user.primary}" %>
* Groups :<%= render :text => "#{@user.group_ids}" %>
+
+ +
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 7e57539..ff132a7 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,3 +1,5 @@ +

Users Management System

+ <%= render :partial => "common/head", :locals => { :prefix => "user", :fuzzy => false, :path => users_path, :new_path => new_user_path, :delete_path => user_path(@user.id) } %>
diff --git a/public/020.jpg b/public/020.jpg new file mode 100755 index 0000000..97c1ca7 Binary files /dev/null and b/public/020.jpg differ diff --git a/public/Login.png b/public/Login.png new file mode 100644 index 0000000..e722a5e Binary files /dev/null and b/public/Login.png differ diff --git a/public/stylesheets/sahyadri.css b/public/stylesheets/sahyadri.css index f607fa1..da4f32c 100644 --- a/public/stylesheets/sahyadri.css +++ b/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 { } @@ -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;} @@ -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%; @@ -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; } diff --git a/public/stylesheets/scaffold.css b/public/stylesheets/scaffold.css index be56bd9..98af2bd 100644 --- a/public/stylesheets/scaffold.css +++ b/public/stylesheets/scaffold.css @@ -1,98 +1,4 @@ -@charset "utf-8"; -/* -Design by Bhau Ghadge (sahyadri School) -*/ -body { margin:0; padding:0; width:100%; color:#6d6d6d; font:bold 13px/1.8em "Liberation sans", Arial, Verdana, Helvetica, sans-serif; background:#ececec;} - -.clr { clear:both; padding:0; margin:0; width:100%; font-size:0px; line-height:0px;} -.logo { padding:0; width:auto;} -h1 { margin:0; padding:35px 0 8px; color:#959595; font:bold 20px/1.2em "Liberation", Arial, Helvetica, sans-serif; letter-spacing:-2px; text-transform:uppercase; text-align:center;} -h1 a, h1 a:hover { color:#959595; text-decoration:none;} -h1 span { text-transform:none; font-weight:normal;} -h1 small { display:block; font:normal 12px/1.2em "Liberation sans", Arial, Helvetica, sans-serif; letter-spacing:normal; color:#959595; text-transform:none;} -h2 { font:normal 15px/1.5em "Liberation sans", Arial, Helvetica, sans-serif; padding:0px 0; margin:0px 0; color:black;} -p { margin:8px 0; padding:0 0 8px 0; font:normal 12px/1.8em "Liberation sans", Arial, Helvetica, sans-serif;} -a { color:#495957; 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;} -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 { } - -.header, .content, .menu_nav, .fbg, .footer, form, ol, ol li, ul, .content .mainbar, .content .sidebar { margin:0; padding:0;} - -/* header */ -.header { } -.header_resize { margin:0 auto; padding:0; width:960px;} -img.hbg_img { padding:6px; border:2px solid #d7d7d7; background-color:#fff;} - -/* menu */ -.menu_nav { margin:0 auto 16px; padding:0 0 0 180px; height:39px; border-top:1px solid #c9c9c9; border-bottom:1px solid #c9c9c9;} -.menu_nav ul { list-style:none; padding:0; height:39px; float:left;} -.menu_nav ul li { margin:0; padding:0 0 0 8px; float:left;} -.menu_nav ul li a { display:block; margin:0; padding:9px 24px; color:#4f4f4f; text-decoration:none; font-weight:bold; font-size:13px; text-transform:uppercase; border-left:1px solid transparent; border-right:1px solid transparent;} -.menu_nav ul li.active a, .menu_nav ul li a:hover { color:#4f4f4f; background-color:#fff; border-left:1px solid #c9c9c9; border-right:1px solid #c9c9c9;} - -/* content */ -.content { } -.content_resize { margin:0 auto; padding:15px 0; width:960px;} -.content .mainbar { margin:0; padding:0; float:right; width:670px;} -.content .mainbar img { border:1px solid #d4d4d4; background-color:#fff;} -.content .mainbar img.fl { margin:4px 16px 4px 0; float:left;} -.content .mainbar .article { margin:0 0 24px; padding:0 24px;} -.content .sidebar { padding:0; float:left; width:280px;} -.content .sidebar .gadget { margin:0 0 12px; padding:8px 16px 8px 24px;} -ul.sb_menu, ul.ex_menu { margin:0; padding:0; list-style:none; color:#959595;} -ul.sb_menu li, ul.ex_menu li { margin:0;} -ul.sb_menu li { padding:4px 0; width:220px;} -ul.ex_menu li { padding:4px 0;} -ul.sb_menu li a, ul.ex_menu li a { color:#555; text-decoration:none; margin-left:-16px; padding:4px 8px 4px 16px;} -ul.sb_menu li a:hover, ul.ex_menu li a:hover { color:#495957; font-weight:bold; text-decoration:none;} -.content p.pages { margin:0 24px; padding:0 0 24px; font-size:11px;} -.content p.pages span, .content p.pages a:hover { padding:8px 12px; color:#fff; background-color:#495957; border:1px solid #495957;} -.content p.pages a { padding:8px 12px; color:#6e6e6e; background-color:#fff; border:1px solid #c9c9c9; text-decoration:none;} -.content p.pages small { font-size:12px; float:right;} - -/* subpages */ -.content .mainbar .comment { margin:0; padding:16px 0 0 0;} -.content .mainbar .comment img.userpic { border:1px solid #dedede; margin:10px 16px 0 0; padding:0; float:left;} - -/* fbg */ -.fbg { border-top:1px solid #d4d4d4; background-color:#fff;} -.fbg_resize { margin:0 auto; width:912px; padding:24px;} -.fbg .c2 a, .fbg .c3 a { margin:0; padding:2px 4px; text-decoration:underline; color:#6d6d6d;} -.fbg h2 { padding-bottom:12px;} -.fbg img { margin:0 16px 16px 0; padding:3px; background-color:#fff; border:1px solid #99bece;} -.fbg .col { margin:0; float:left;} -.fbg .c1 { padding:0 16px 0 0; width:266px;} -.fbg .c2 { padding:0 16px; width:290px;} -.fbg .c3 { padding:0 0 0 16px; width:260px;} - -/* 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 p.lf a { color:#6d6d6d;} -.footer p.lf span { float:right;} - -/* form */ -ol { list-style:none;} -ol li { display:block; clear:both;} -ol li label { display:block; margin:0; padding:16px 0 0 0;} -ol li input.text { width:480px; border:1px solid #c0c0c0; margin:0; padding:3px 2px; height:24px; background-color:#fff;} -ol li textarea { width:480px; border:1px solid #c0c0c0; margin:0; padding:2px; background-color:#fff;} -ol li .send { margin:16px 0 0 0;} - -/* search */ -.searchform { float:left; padding:0;} -#formsearch { margin:0; height:36px; padding:16px 0 24px 24px; width:232px;} -#formsearch span { display:block; margin:0; padding:0; float:left; background:url(images/search.gif) no-repeat top left;} -#formsearch input.editbox_search { margin:0; padding:10px 6px 9px; float:left; width:181px; border:none; background:none; font:normal 12px/1.5em "Liberation sans", Arial, Helvetica, sans-serif; color:#a8acb2;} -#formsearch input.button_search { margin:0; padding:0; border:none; float:left;} - - .fieldWithErrors { padding: 2px; background-color: red;