Guest User

Untitled

a guest
May 23rd, 2018
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.29 KB | None | 0 0
  1.  
  2.  
  3. <style>
  4. .add {
  5. background:#C3D9FF none repeat scroll 0 0;
  6. font-size:95%;
  7. font-weight:bold;
  8. padding:2px 8px;
  9. white-space:nowrap;
  10. }
  11.  
  12. .add a {
  13. background: url(/images/icon_plus_green_13x13.gif) no-repeat;
  14. padding:1px 0 1px 18px;
  15. }
  16.  
  17. .content-profile{
  18. float: left;
  19. width: 34%;
  20. height: 90px;
  21. padding: 0px 0px 0px 2px;
  22. }
  23. .spike-white{
  24. border: 1px solid rgb(0, 0, 0);
  25. background-image: url(/images/percentbar_white.png);
  26. height: 20px;
  27. width: 200px;
  28. }
  29. .spike-green{
  30. background-image: url(/images/percentbar_green.png);
  31. height: 20px;
  32. width: 20%;
  33. }
  34.  
  35. .panel-profile-right{
  36. float: right;
  37. width: 34%;
  38. margin-top: -210px;
  39. }
  40. .panel-profile-left{
  41. float: left;
  42. width: 65%;
  43. margin-top: 20px;
  44. }
  45.  
  46. </style>
  47. <%if @tag_display==1%>
  48. <%if @email_notify==1%>
  49. <table class="tablealign"><tr>
  50. <%co=k=5;f1=0
  51. for tag in @tags
  52. if co==0
  53. co=k
  54. if f1==0
  55. f1=1 %>
  56. <td>Others &nbsp;<%=text_field_tag "more_tag"%></td>
  57. <%else%>
  58. <td></td>
  59. <%end%>
  60. </tr><tr>
  61. <%end%>
  62. <td><%=check_box_tag 'name[]' ,tag.id,false%>&nbsp;<%=tag.name%></td>
  63. <%co=co-1
  64. end
  65. while(co >0)
  66. co=co-1%>
  67. <td></td>
  68. <%end%>
  69. <%if f1==0 %>
  70. <td>Others &nbsp;<%=text_field_tag "more_tag"%></td>
  71. <%else%>
  72. <td></td>
  73. <%end%>
  74. </tr></table>
  75.  
  76. <%else%>
  77. <%end%>
  78. <%else%>
  79. <%= render :partial=>'eis/left_nav' %>
  80. <%= error_messages_for :profile %>
  81.  
  82. <% form_for(@profile , :html => { :multipart => true }) do |f| %>
  83. <table> <div class="">
  84. <fieldset style="height:174px;width:400px">
  85. <legend>
  86. Employee Personal Info
  87. </legend>
  88. <p>
  89. <b>Name </b> <%= current_user.profile && current_user.profile.first_name ? current_user.profile.first_name + ' ' + current_user.profile.last_name + ' ' + link_to(" [Edit]", :controller => "profiles", :action => "add_basic_info", :id => current_user.profile) : 'None <span class="add">'+ link_to('Add Basic Info', :action => 'add_basic_info') +'</span>'%>
  90.  
  91. </p>
  92. <p>
  93. <b>Address </b>
  94. <br/>
  95. <%= current_user.profile && current_user.profile.city ? current_user.profile.city + ' ' + current_user.profile.state + ', ' + current_user.profile.country + ' ' + link_to(" [Edit]", :controller => "profiles", :action => "add_address", :id => current_user.profile) : 'None <span class="add">'+ link_to('Add Address', :action => 'add_address') +'</span>'%>
  96. </p>
  97.  
  98. <p>
  99. <b>Timing info</b>
  100. <br/>
  101. <% if current_user.profile && current_user.profile.time_zone %>
  102. Time Zone : <%= current_user.profile.time_zone %><br/>
  103. Start Date : <%= current_user.profile.start_date if current_user.profile.start_date%><br/>
  104. <%=link_to(" [Edit]", :controller => "profiles", :action => "add_timing", :id => current_user.profile)%>
  105. <% else %>
  106. None <span class="add"> <%= link_to('Add Timing', :action => 'add_timing') %> </span>
  107. <% end %>
  108. </p>
  109.  
  110. </fieldset>
  111. </div>
  112.  
  113. <div class="panel-profile-right">
  114. <fieldset style="height: 174px;width:400px"">
  115. <legend>
  116. Profile This Far
  117. </legend>
  118. <div class="content-profile">
  119. <% unless (current_user.profile.nil? || current_user.profile.profileshots[0].nil?) %>
  120. <div onmouseover="javascript:document.getElementById('tooltip').style.display = 'block'" onmouseout="javascript:document.getElementById('tooltip').style.display = 'none'" >
  121. <% if !current_user.profile.nil? && !current_user.profile.profileshots.empty? && FileTest.exists?(current_user.profile.profileshots.last.public_filename(:thumb)) %>
  122. <%= image_tag(current_user.profile.profileshots.last.public_filename(:thumb)) %>
  123. <%else%>
  124. <%= image_tag("/images/nopic_thumb.jpg") %>
  125. <% end %>
  126. <div class="tooltip" id="tooltip" style="display:none">

  127. <div class="top">
  128. <% point = Rating.find_quality_rating(current_user) + Rating.find_knowledge_rating(current_user) %>
  129. <b>You have <%= pluralize(number_with_precision(point, 2), "Point") %></b><br/>
  130. With:<br/>
  131. <div style="margin-left:9px"><%= pluralize(current_user.comments.size, 'Comment')%><br/>
  132. <%= pluralize(current_user.articles.size, 'Article')%><br/>
  133. <%= pluralize(current_user.comments.size, 'Thought')%><br/>
  134. <%= pluralize(number_with_precision(Rating.find_quality_rating(current_user), 2) , 'Average rating')%></div>
  135. </div>
  136. </div>
  137. </div>
  138. <%else%>
  139. <div onmouseover="javascript:document.getElementById('tooltip').style.display = 'block'" onmouseout="javascript:document.getElementById('tooltip').style.display = 'none'" >
  140. <%= image_tag("/images/nopic_thumb.jpg") %>
  141. <div class="tooltip" id="tooltip" style="display:none">

  142. <div class="top">
  143. <% point = Rating.find_quality_rating(current_user) + Rating.find_knowledge_rating(current_user) %>
  144. <b>You have <%= pluralize(number_with_precision(point, 2), "Point") %></b><br/>
  145. With:<br/>
  146. <div style="margin-left:9px"><%= pluralize(current_user.comments.size, 'Comment')%><br/>
  147. <%= pluralize(current_user.articles.size, 'Article')%><br/>
  148. <%= pluralize(current_user.comments.size, 'Thought')%><br/>
  149. <%= pluralize(number_with_precision(Rating.find_quality_rating(current_user), 2) , 'Average rating')%></div>
  150. </div>
  151. </div>
  152. </div>
  153. <% end %>
  154. </div>
  155.  
  156. <div class="clear"></div>
  157. <div><strong><%= "#{current_user.first_name} #{current_user.last_name}" %> </strong></div>
  158. <hr />
  159. <%percentage = determine_profile_percentage(current_user)%>
  160. Your profile is <%= percentage%> complete
  161. <div class="spike-white" style="width: 53%; margin-left: 100px;">
  162. <div class="spike-green" style="width:<%= percentage%>">
  163. </div>
  164. </div>
  165. <hr />
  166. <br />
  167.  
  168. <% if current_user.profile%>
  169. <%= link_to "<strong><font color=black>Add Im Contact +10%</font></strong>", '#im' %><br />
  170. <%= link_to "<font color=black>Add Skills +20%</font>", '#skill' %><br />
  171. <%= link_to "<strong><font color=black>Add Emergency Info +10%</font></strong>", "#eci" %><br />
  172. <%= link_to "<font color=black>Add Photo +15%</font>", '#img' %><br />
  173. </div>
  174. <% end %>
  175. </fieldset>
  176. </div>
  177.  
  178. <fieldset id="im" style="height:100px;width:400px">
  179. <legend>Enter RAC Email Account Info</legend>
  180. <p>
  181. <b>RAC Email<font color=red>*</font></b>
  182. <br/>
  183. <%= f.text_field :richapp_email , :size => 18%>
  184. @richapplicationsconsulting.com
  185. </p>
  186.  
  187. <p>
  188. <b>RAC Email Password<font color=red>*</font></b>
  189. <br/>
  190. <%= f.password_field :richapp_password %>
  191. </p>
  192. </fieldset>
  193.  
  194. <fieldset id="im" style="height:100px;width:400px">
  195. <legend>IM Contact Info</legend>
  196. <div id="im_contacts">
  197. <%= render :partial => 'im_contact', :collection => @profile.im_contacts %>
  198. </div>
  199. <p>
  200. <span class="add"><%= add_im_contact_link "Add IM Contact" %></span>
  201. </p>
  202. </fieldset>
  203.  
  204. <fieldset id="skill" style="height:174px;width:400px">
  205. <legend>Skills Info</legend>
  206. <p>
  207. 20 Represents Highest Level in Self Rating
  208. </p>
  209. <div id="skills">
  210. <%= render :partial => 'profile_skill', :collection => @profile.profile_skills %>
  211. </div>
  212. <p>
  213. <span class="add"><%= add_profile_skill_link "Add Skill" %></span>
  214. </p>
  215. </fieldset>
  216.  
  217. <fieldset id="email" style="height:100px;width:400px">
  218. <legend>Email Notification</legend>
  219. <p>Want Email Notification <b>?</b> &nbsp;&nbsp;<%=f.check_box :email_notification%></p>
  220. <div id="tag_div"></div>
  221.  
  222. <%= observe_field "profile_email_notification",
  223. :update => "tag_div",
  224. :url => { :action => :new,:display_tag=>true},
  225. :with =>"profile_email_notification",
  226. :position=>"inline"
  227. %>
  228.  
  229. </fieldset>
  230.  
  231.  
  232. <fieldset id="eci" style="height:174px;width:400px">
  233. <legend>Emergency Contact Info</legend>
  234. <div id="emergency_contacts">
  235.  
  236. <%= render :partial => 'emergency_contact', :collection => @profile.emergency_contacts %>
  237.  
  238.  
  239. </div>
  240. <p>
  241. <span class="add"><%= add_emergency_contact_link "Add Emergency Contact" %></span>
  242. </p>
  243. <div id="suggest">
  244. </div>
  245. <p>
  246. <%= f.submit "Create" %>
  247. </p>
  248. <% end %>
  249. <%end%></table>
Add Comment
Please, Sign In to add comment