Permalink
Browse files

Icon for displaying timestamp.

  • Loading branch information...
1 parent 03a4ba1 commit f29275d279bd6e47b4b093a26accccc490e8e8cd @himaniahuja committed Mar 9, 2012
@@ -39,4 +39,12 @@ def monthname(monthnumber)
end
end
+ def display_timestamp(timestamp)
+
+ return "" if timestamp.nil?
+ content_tag(:span, "#{timestamp.in_time_zone('Pacific Time (US & Canada)').strftime('%a %b %d %Y, %I:%M %p Pacific Time')}" )
+
+ end
+
+
end
@@ -69,7 +69,18 @@
<% @deliverable.attachment_versions.each do |version| %>
<tr class=<%= cycle('twikiTableOdd', 'twikiTableEven')%> >
- <td><%= format_timestamp(version.submission_date) %></td>
+ <td>
+ <%= format_timestamp(version.submission_date) %>
+ <%# icon_timestamp(version.submission_date) %>
+
+
+ <%=image_tag("/images/info_black.png", :width => "16", :height => "16", :class => "info_icon") -%>
+ <div class="info_dialog" id="tmp" style="display:none;">
+ <%= display_timestamp(version.submission_date) -%>
+ </div>
+ </td>
+
+
<td>
<% unless version.attachment_file_name.nil? %>
<%= link_to version.attachment_file_name, version.attachment.url %>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -18,3 +18,28 @@
});
+ // The below link explains data
+ // http://stackoverflow.com/questions/4518889/jquery-ui-dialog-open-multiple-dialog-boxes-using-the-same-class-on-the-button-a
+ $(function(){
+ $('.info_icon').each(function() {
+ $.data(this, 'dialog',
+ $(this).next().dialog({
+ autoOpen: false,
+ modal: true,
+ height: 70,
+ title: 'Submission date',
+ overlay: {
+ opacity: 0.2,
+ background: "black"
+ }
+
+ })
+ );
+
+ }).click(function() {
+ $.data(this, 'dialog').dialog('open');
+ return false;
+ });
+
+
+ });

0 comments on commit f29275d

Please sign in to comment.