Skip to content

Commit

Permalink
Reworked the visitor detail page.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Sep 10, 2010
1 parent 0b2f284 commit da0078f
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 15 deletions.
25 changes: 17 additions & 8 deletions app/views/emarketing/_visitor_detail.rhtml
@@ -1,25 +1,28 @@
<% @date_format = "%d %b %T %p".t -%>
<div class="visitor_container">

<b>
<div class="heading">

<h2>
<% if @user -%>
<%= 'User #%s:' / @user.id.to_s -%>
<%= link_to @user.name, url_for(:controller => "/members", :action => 'view', :path => @user.id) -%>
<% else -%>
<%= 'Anonymous user from %s' / @entry.ip_address.to_s -%>
<% end -%>
</b><br/>
<b>IP Address: <%= @entry.ip_address %>, <%= @entry.ip_address_name %>
</h2>

IP Address: <%= @entry.ip_address %>, <%= @entry.ip_address_name %>
<% if @entry.has_location? %>
( <%= @entry.location_display %>
<%= link_to 'Location Estimate', "http://maps.google.com/maps?ll=#{@entry.latitude},#{@entry.longitude}", :target => '_blank' if @entry.latitude %> )
<% end -%>
</b><br/>

<b>Content Viewed last Visit: <b><br/>
<h2 class="inform">Content Viewed last Visit:</h2>
<% @entry.last_session.session_content.each do |content_node| %>
<%= link_to h(content_node.title), content_node.link %><br/>
<% end -%>
<br/>

<br/>

<div class="real-time-stats">
Expand All @@ -28,12 +31,16 @@
<div class="page2">Where / <em>Action</em></div>
</div>
</div>
<div id="vistor_stats" class="real-time-stats real-time-stats-block two-tone-list">

</div>

<div class="visitor_container_body">
<div id="vistor_stats" class="real-time-stats real-time-stats-block">
<% @sessions.each_with_index do |ses,idx| %>
<div class='header'>Session started <%= ses.created_at.to_s(:long) %> from <%= ses.ip_address %></div>
<% ses.domain_log_entries.each_with_index do |entry, index| -%>
<% next unless entry.is_a?(DomainLogEntry) -%>
<div class="row <%= index % 2 == 0 ? 'even' : 'odd'%>">
<div>
<div class="stats clearfix">
<div class="date"><%= entry.occurred_at.localize @date_format %></div>
<div class="page2"><%= link_to entry.url, entry.url, :target => '_blank' %></div>
Expand All @@ -46,3 +53,5 @@
<% end -%>
</div>

</div>
</div>
3 changes: 1 addition & 2 deletions app/views/emarketing/visitors.rhtml
Expand Up @@ -75,9 +75,8 @@
<%= render :partial => 'visitor_table' %>
</div>
</td>
<td style='border-left:1px solid #000000; padding-left:10px;' valign='top' >
<td style='padding-left:10px;' valign='top'>
<div id='visitor_detail'>

</div>
</td>
</tr>
Expand Down
33 changes: 28 additions & 5 deletions public/themes/standard/stylesheets/admin_framework.css
Expand Up @@ -866,28 +866,29 @@ table.mini_table td em { color:#b3b3b3; }
height:335px;
overflow-x:hidden;
overflow-y:auto;
border: 1px solid #ccc;
}

.real-time-stats .row, #RB_redbox div.cms_form .real-time-stats .row { padding: 3px 0 3px 2px; }

.real-time-stats .header { padding: 5px 0;}
.real-time-stats .stats .who { width: 123px; float: left; padding: 0 5px 0 2px; }
.real-time-stats .stats .when { width: 90px; float: left; }
.real-time-stats .stats .date { width: 140px; float: left; }
.real-time-stats .stats .date { width: 140px; float: left; color:#7A5534; }
.real-time-stats .stats .page { width: 255px; float: left; }
.real-time-stats .stats .page2 { width: 250px; float: left; }
.real-time-stats .action { font-style: italic; padding: 2px 0 0 220px; color: green; }
.real-time-stats .action2, #RB_redbox div.cms_form .action2 { font-style: italic; padding: 2px 0 0 140px; color: green; }

.real-time-stats .headers div, #RB_redbox div.cms_form .real-time-stats .headers div {
height: 18px;
color:#3b648c;
font-weight: bold;
color:#7A5534;
text-align: left;
font-weight: bold;
font-weight: normal;
margin-left: 5px;
font-size: 15px;
}


.visitor-details {
height: 400px;
overflow-x:hidden;
Expand Down Expand Up @@ -992,3 +993,25 @@ table.display_table td.field {
font-size: 11px;
padding:3px 0 3px 0;
}

.visitor_container {
background-color:#cce5e9;
padding:20px 6px 10px 6px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
float:left;
margin-right:10px;
display: inline-block;
}

.visitor_container .heading {
padding:0 10px;
}

.visitor_container_body {
background-color:white;
padding:12px 0px 12px 8px;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
overflow:hidden;
}

0 comments on commit da0078f

Please sign in to comment.