Skip to content

Commit

Permalink
display all fields from db and navigate through records (probably not…
Browse files Browse the repository at this point in the history
… the efficient way of doing it but ok for now)
  • Loading branch information
mrybacha committed Mar 5, 2011
1 parent d682b75 commit f507690
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 23 deletions.
3 changes: 0 additions & 3 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ class ApplicationController < ActionController::Base

def index
end

def survey_file
end
end
1 change: 1 addition & 0 deletions app/views/application/contact_us.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Contact Us
1 change: 1 addition & 0 deletions app/views/application/help.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Help
1 change: 0 additions & 1 deletion app/views/application/survey_file.html.erb

This file was deleted.

14 changes: 7 additions & 7 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
<h2>Common menu bar</h2>
<ul>
<li id="cn-cmb1"><a href="2col-theme-clf2-nsi2-fra.html" lang="fr" title="Français - Version française de cette page">Français</a></li>
<li id="cn-cmb2"><a href="#" title="Home - Main page of the Web site">Home</a></li>
<li id="cn-cmb3"><a href="#" title="Contact Us - Important contact information">Contact Us</a></li>
<li id="cn-cmb4"><a href="#" title="Help - Information about using the Web site">Help</a></li>
<li id="cn-cmb2"><a href="/" title="Home - Main page of the Web site">Home</a></li>
<li id="cn-cmb3"><a href="/contact_us" title="Contact Us - Important contact information">Contact Us</a></li>
<li id="cn-cmb4"><a href="/help" title="Help - Information about using the Web site">Help</a></li>
<li id="cn-cmb5"><a rel="search" href="#" title="Search - Search the Web site">Search</a></li>
<li id="cn-cmb6"><a rel="external" href="http://www.canada.gc.ca/home.html" title="canada.gc.ca - Government of Canada Web site">canada.gc.ca</a></li>
</ul>
Expand All @@ -112,7 +112,7 @@
<div id="cn-bcrumb">
<h2>Breadcrumb</h2>
<ol>
<li><a rel="up up up" href="#" title="Home - Main page of the Web site">Home</a>&#160;&#62;</li>
<li><a rel="up up up" href="/" title="Home - Main page of the Web site">Home</a>&#160;&#62;</li>
<li><a rel="up up" href="#">Level&#160;1</a>&#160;&#62;</li>
<li><a rel="up" href="#">Level&#160;2</a>&#160;&#62;</li>
<li>2 column layout - <abbr title="Common Look and Feel">CLF</abbr> 2.0 Theme - HTML5 - Web Experience Toolkit (WET)</li>
Expand Down Expand Up @@ -159,9 +159,9 @@
<section>
<h3>Query Database</h3>
<ul>
<li><a href="#">Survey Files</a></li>
<li><a href="#">Land Files</a></li>
<li><a href="#">Marine Files</a></li>
<li><a href="/survey_files">Survey Files</a></li>
<li><a href="/land_files">Land Files</a></li>
<li><a href="/marine_files">Marine Files</a></li>
</ul>
</section>
<!-- clf2-nsi2 theme ends / Fin du thème clf2-nsi2 -->
Expand Down
16 changes: 10 additions & 6 deletions app/views/survey_files/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
<h1>Listing survey_files</h1>
<h1>Survey Files</h1>

<table>
<table border="1">
<tr>
<th>Surv file</th>
<th>Proj num</th>
<th>Strt date</th>
<th>Cmpl date</th>
<th>ID</th>
<th>Survey File</th>
<th>Project Number</th>
<th>Start Date</th>
<th>Completed Date</th>
<th>Active File</th>
<th></th>
<th></th>
<th></th>
</tr>

<% @survey_files.each do |survey_file| %>
<tr>
<td><%= survey_file.id %></td>
<td><%= survey_file.Surv_File %></td>
<td><%= survey_file.Proj_Num %></td>
<td><%= survey_file.Strt_Date %></td>
<td><%= survey_file.Cmpl_Date %></td>
<td><%= survey_file.Active_File %></td>
<td><%= link_to 'Show', survey_file %></td>
<td><%= link_to 'Edit', edit_survey_file_path(survey_file) %></td>
<td><%= link_to 'Destroy', survey_file, :confirm => 'Are you sure?', :method => :delete %></td>
Expand Down
135 changes: 129 additions & 6 deletions app/views/survey_files/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,25 +1,148 @@
<p id="notice"><%= notice %></p>

<p>
<b>Surv file:</b>
<b>ID:</b>
<%= @survey_file.id %>
</p>

<p>
<b>Survey File:</b>
<%= @survey_file.Surv_File %>
</p>

<p>
<b>Proj num:</b>
<b>Official Name:</b>

</p>

<p>
<b>Feature Type:</b>

</p>

<p>
<b>Province:</b>

</p>

<p>
<b>Secondary Name:</b>
<%= @survey_file.Location_second %>
</p>

<p>
<b>Mapsheet:</b>

</p>

<p>
<b>Street Location:</b>
<%= @survey_file.Strt_loc %>
</p>

<p>
<b>Latitude:</b>

</p>

<p>
<b>Longitude:</b>

</p>

<p>
<b>Named:</b>
<%= @survey_file.Object_Nm %>
</p>

<p>
<b>Department Contact:</b>
<%= @survey_file.Dept_Contact %>
</p>

<p>
<b>Department Telephone:</b>
<%= @survey_file.Dept_tel %>
</p>

<p>
<b>Department Abbreviation:</b>
<%= @survey_file.Dept_Abbr %>
</p>

<p>
<b>Department Secondary:</b>
<%= @survey_file.Dept_Sec %>
</p>

<p>
<b>Project Man:</b>
<%= @survey_file.Proj_Man %>
</p>

<p>
<b>Sigma:</b>
<%= @survey_file.Sigma %>
</p>

<p>
<b>EDRM Number:</b>
<%= @survey_file.EDRM_No %>
</p>

<p>
<b>CR File:</b>
<%= @survey_file.CR_File %>
</p>

<p>
<b>Project Number:</b>
<%= @survey_file.Proj_Num %>
</p>

<p>
<b>Strt date:</b>
<b>SSA Number:</b>
<%= @survey_file.SSA_Num %>
</p>

<p>
<b>SSA Amount:</b>
<%= @survey_file.SSA_Amount %>
</p>

<p>
<b>Financial Code:</b>
<%= @survey_file.Fin_Code %>
</p>

<p>
<b>Bulk Number:</b>
<%= @survey_file.Bulk_Num %>
</p>

<p>
<b>Description:</b>
<%= @survey_file.Descript %>
</p>

<p>
<b>Remark:</b>
<%= @survey_file.Remark %>
</p>

<p>
<b>Start Date:</b>
<%= @survey_file.Strt_Date %>
</p>

<p>
<b>Cmpl date:</b>
<b>Completed Date:</b>
<%= @survey_file.Cmpl_Date %>
</p>


<% if @survey_file.id > 1 %>
<%= link_to '<< Previous', :id => (@survey_file.id-1) %> |
<% end %>
<%= link_to 'Edit', edit_survey_file_path(@survey_file) %> |
<%= link_to 'Back', survey_files_path %>
<%= link_to 'Back', survey_files_path %> |
<%= link_to 'Next >>', :id => (@survey_file.id+1) %>

0 comments on commit f507690

Please sign in to comment.