Guest User

Untitled

a guest
Jul 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. <%=stylesheet_link_tag :pullquote%>
  2. <%=link_to image_tag("traininglogo.png"), :controller=>"main", :action=>"index"%><br>
  3. <div style="position: absolute; top: 50px; left: 0px;">
  4. <div id='test' style="width: 500px;">
  5. <h2><%=@name%></h2>
  6. <p style="height: 520px;">
  7. if class already occurred dont let them sign up
  8. if signed up already dont let them sign up
  9. <%if session[:user]!=nil%>
  10. <% form_tag :controller=>"user", :action=>"addclass" do%>
  11. <%=hidden_field_tag :classid, params[:classid]%>
  12. <%=submit_tag "Add this Class"%>
  13. <%end%>
  14. <%end%>
  15. </p>
  16. <p class="more">
  17. <a href="#"></a>
  18. </p>
  19. </div>
  20. </div>
  21. <div style="position: absolute; top: 50px; right: 0px;">
  22. <div id='enrolled' style="width: 400px;">
  23. <h2>Enrolled Attendees:</h2>
  24. <p style="height: 300px;">
  25. <%@users.each do |a|%>
  26. <%=a.utln%> - <%=a.firstname%> <%=a.lastname%> <%=link_to "Remove User", :controller=>"admin", :action=>"unenroll", :userid=>a.id, :classid=>params[:classid]%><br>
  27. <%end%>
  28. </p>
  29. <p class="more">
  30. <a href="#"></a>
  31. </p>
  32. </div>
  33. </div>
  34. <div style="position: absolute; top: 470px; right: 0px;">
  35. <div id='tipsheets' style="width: 400px;">
  36. <h2>Tipsheets:</h2>
  37. <p style="height: 140px;">
  38.  
  39. </p>
  40. <p class="more">
  41. <a href="#"></a>
  42. </p>
  43. </div>
  44. </div>
  45.  
  46. <%if session[:user]!=nil && is_admin?%>
  47. <div style="position: absolute; bottom: -70px;">
  48. <div id='enrolled' style="width: 940px;">
  49. <h2>Class Admin Panel:</h2>
  50. <p style="height: 30px;">
  51. Add Student:<br>
  52. <% form_tag :controller=>"admin", :action=>"enroll", :classid=>params[:classid] do%>
  53. <%=text_field_with_auto_complete @user, :utln, {:size=>15}, {:method => :get, :url => url_for(:controller => :user, :action => :userlist, :escape => false), :with=>"'search=' + element.value"}%>
  54. <%=submit_tag "Add Student"%>
  55. <%end%>
  56.  
  57. <br>
  58. <%=link_to "Delete Scheduled Class", :controller=>"admin", :action=>"delete_sclass", :classid=>params[:classid]%>
  59. <%end%>
  60.  
  61. </p>
  62. <p class="more">
  63. <a href="#"></a>
  64. </p>
  65. </div>
  66. </div>
Add Comment
Please, Sign In to add comment