summaryrefslogtreecommitdiff
path: root/app/views/api/rows
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/api/rows')
-rw-r--r--app/views/api/rows/_form.html.erb21
-rw-r--r--app/views/api/rows/edit.html.erb3
-rw-r--r--app/views/api/rows/index.html.erb29
-rw-r--r--app/views/api/rows/new.html.erb3
-rw-r--r--app/views/api/rows/show.html.erb56
5 files changed, 112 insertions, 0 deletions
diff --git a/app/views/api/rows/_form.html.erb b/app/views/api/rows/_form.html.erb
new file mode 100644
index 0000000..465b105
--- /dev/null
+++ b/app/views/api/rows/_form.html.erb
@@ -0,0 +1,21 @@
+<%= simple_form_for(@row) do |f| %>
+ <%= f.error_notification %>
+
+ <div class="inputs">
+ <%= f.input :user_name %>
+ <%= f.input :last_name %>
+ <%= f.input :middle_name %>
+ <%= f.input :first_name %>
+ <%= f.input :office_phone_number %>
+ <%= f.input :internal_extension %>
+ <%= f.input :mobile_phone_number %>
+ <%= f.input :fax_phone_number %>
+ <%= f.input :email %>
+ <%= f.input :pin %>
+ <%= f.input :photo_file_name %>
+ </div>
+
+ <div class="actions">
+ <%= f.button :submit %>
+ </div>
+<% end %>
diff --git a/app/views/api/rows/edit.html.erb b/app/views/api/rows/edit.html.erb
new file mode 100644
index 0000000..bce5694
--- /dev/null
+++ b/app/views/api/rows/edit.html.erb
@@ -0,0 +1,3 @@
+<h1>Editing row</h1>
+
+<%= render 'form' %> \ No newline at end of file
diff --git a/app/views/api/rows/index.html.erb b/app/views/api/rows/index.html.erb
new file mode 100644
index 0000000..d65e059
--- /dev/null
+++ b/app/views/api/rows/index.html.erb
@@ -0,0 +1,29 @@
+<h1>Listing rows</h1>
+
+<table>
+ <tr>
+ <th>ID</th>
+ <th>User name</th>
+ <th>Last name</th>
+ <th>First name</th>
+ <th>Internal extension</th>
+ <th>Office phone number</th>
+ <th>Fax phone number</th>
+ <th>Email</th>
+ <th>Pin</th>
+ </tr>
+
+<% @rows.each do |row| %>
+ <tr class='<%= cycle('odd', 'even') %>'>
+ <td><%= row.id %></td>
+ <td><%= link_to row.user_name, tenant_user_path(row.user.current_tenant, row.user) %></td>
+ <td><%= row.last_name %></td>
+ <td><%= row.first_name %></td>
+ <td><%= row.internal_extension %></td>
+ <td><%= row.office_phone_number %></td>
+ <td><%= row.fax_phone_number %></td>
+ <td><%= row.email %></td>
+ <td><%= row.pin %></td>
+ </tr>
+<% end %>
+</table> \ No newline at end of file
diff --git a/app/views/api/rows/new.html.erb b/app/views/api/rows/new.html.erb
new file mode 100644
index 0000000..fccd964
--- /dev/null
+++ b/app/views/api/rows/new.html.erb
@@ -0,0 +1,3 @@
+<h1>New row</h1>
+
+<%= render 'form' %> \ No newline at end of file
diff --git a/app/views/api/rows/show.html.erb b/app/views/api/rows/show.html.erb
new file mode 100644
index 0000000..aad60b5
--- /dev/null
+++ b/app/views/api/rows/show.html.erb
@@ -0,0 +1,56 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>User name:</b>
+ <%= @row.user_name %>
+</p>
+
+<p>
+ <b>Last name:</b>
+ <%= @row.last_name %>
+</p>
+
+<p>
+ <b>Middle name:</b>
+ <%= @row.middle_name %>
+</p>
+
+<p>
+ <b>First name:</b>
+ <%= @row.first_name %>
+</p>
+
+<p>
+ <b>Office phone number:</b>
+ <%= @row.office_phone_number %>
+</p>
+
+<p>
+ <b>Internal extension:</b>
+ <%= @row.internal_extension %>
+</p>
+
+<p>
+ <b>Mobile phone number:</b>
+ <%= @row.mobile_phone_number %>
+</p>
+
+<p>
+ <b>Fax phone number:</b>
+ <%= @row.fax_phone_number %>
+</p>
+
+<p>
+ <b>Email:</b>
+ <%= @row.email %>
+</p>
+
+<p>
+ <b>Pin:</b>
+ <%= @row.pin %>
+</p>
+
+<p>
+ <b>Photo file name:</b>
+ <%= @row.photo_file_name %>
+</p> \ No newline at end of file