Skip to content

Commit

Permalink
fixing routes
Browse files Browse the repository at this point in the history
  • Loading branch information
subbarao committed Mar 7, 2013
1 parent 7b3b483 commit 7109232
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 90 deletions.
39 changes: 0 additions & 39 deletions app/views/admin_data/analytics/_bar_chart.html.erb

This file was deleted.

41 changes: 0 additions & 41 deletions app/views/admin_data/analytics/index.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/admin_data/crud/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="main">
<div>
<h1 class='search_path'>
<%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
<%= link_to @klass, search_path(:klass => @klass.name) %>
>
<%= link_to "ID #{@model.id}", ''%>
</h1>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin_data/crud/misc/_modify_record.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<h3>Modify Record</h3>
<div style='padding-left:15px'>
<p>
<%= link_to 'Edit', admin_data_edit_path(:klass => klass.name.underscore, :id => model.id) %>
<%= link_to 'Edit', edit_path(:klass => klass.name.underscore, :id => model.id) %>
</p>
<p>
<%= link_to 'Delete', admin_data_del_path(:klass => klass.name.underscore, :id => model.id) ,
<%= link_to 'Delete', del_path(:klass => klass.name.underscore, :id => model.id) ,
{ :confirm => ' You are deleting (not destroying) a record. Are you sure?', :method => :delete} %>
</p>
<p>
Expand Down
4 changes: 2 additions & 2 deletions app/views/admin_data/crud/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="main">

<%= breadcrum do %>
<%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
<%= link_to @klass, search_path(:klass => @klass.name) %>
<% end %>

<div class="block" id="block-tables">
Expand All @@ -14,7 +14,7 @@
<div class="inner umbrella">
<h1>Create a new record</h1>
<%= form_for @model, :as => @klass.name.underscore.to_sym,
:url => admin_data_index_path(:klass => @klass.name),
:url => index_path(:klass => @klass.name),
:html => {:class => 'form', :method => :post} do |f| %>
<%= render 'admin_data/shared/flash_message', :model => @model %>
<%= render 'admin_data/crud/misc/form', :klass => @klass, :f => f %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin_data/crud/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div>
<h1 class='search_path'>
<%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
<%= link_to @klass, search_path(:klass => @klass.name) %>
>
<%= link_to "ID #{@model.id}", ''%>
</h1>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%= form_tag(admin_data_advance_search_path(:klass => klass),
<%= form_tag(advance_search_path(:klass => klass),
:method => 'get',
:class => 'form search_form',
:id => 'advance_search_form') %>
Expand Down
1 change: 0 additions & 1 deletion app/views/admin_data/search/search/_listing.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<% columns_order(klass).each do |column| %>
<td>
<% if (column == klass.primary_key) %>
<%#= link_to(record.to_param.to_s, admin_data_path(:klass => klass.name.underscore, :id => record_id(record))) %>
<%= link_to(record.send(column), admin_data_path(:klass => klass.name.underscore, :id => record_id(record))) %>
<% else %>
<%=h get_value_for_column(column_native(klass, column), record) %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin_data/shared/_breadcrum.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class='breadcrum rounded'>
<%= link_to 'Home', admin_data_root_path %>
<%= link_to 'Home', root_path %>
<% unless data.blank? %>
>
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin_data/table_structure/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="main">

<%= breadcrum do %>
<%= link_to @klass, admin_data_search_path(:klass => @klass.name) %>
<%= link_to @klass, search_path(:klass => @klass.name) %>
<% end %>
<%= render 'admin_data/shared/flash_message', :model => @model %>
Expand Down

0 comments on commit 7109232

Please sign in to comment.