Clean code for layout and modifications in dev.rake

This commit is contained in:
chris2tof committed 2011-08-22 13:45:21 +08:00
1 parent e74f2931b1
commit 7a4ad240a8
22 files changed
+226 -159

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_design, :scope => :admin), new_admin_design_path, :class => 'button positive' %></li>
<li><%= link_to t(:new_design, :scope => :admin), new_admin_design_path %></li>
<li><%= link_to t('admin.upload_design'), upload_package_admin_designs_path %></li>
</ul>
<% end -%>
-14
View File
@@ -1,14 +0,0 @@
<p>
<%= f.label :name, t('admin.name') %>
<%= f.text_field :name, :class => 'text' %>
</p>
<p>
<%= f.label :description, t('admin.description') %>
<%= f.text_field :description, :class => 'text' %>
</p>
<p>
<%= f.label "content", t('admin.content') %>
<%= f.text_area :content, :size => '100x30' %>
</p>
-9
View File
@@ -1,9 +0,0 @@
<h1><%= t('admin.editing_layout') %></h1>
<%= form_for @layout, :url => admin_layout_path(@layout) do |f| %>
<%= f.error_messages %>
<%= render :partial => "form", :locals => { :f => f } %>
<p>
<%= f.submit t('update') %> <%= link_back %>
</p>
<% end %>
-28
View File
@@ -1,28 +0,0 @@
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t(:new_layout, :scope => :admin), new_admin_layout_path, :class => 'button positive' %></li>
</ul>
<% end -%>
<%= flash_messages %>
<h1><%= t('admin.list_layouts') %></h1>
<table>
<tr>
<th><%= t('admin.name') %></th>
<th><%= t('admin.description') %></th>
<th><%= t('admin.action') %></th>
</tr>
<% @layouts.each do |layout| %>
<tr>
<td><%= layout.name %></td>
<td><%= layout.description %></td>
<td>
<%= link_to t(:edit), edit_admin_layout_path(layout) %> |
<%= link_to t(:delete), admin_layout_path(layout), :confirm => t('sure?'), :method => :delete %>
</td>
</tr>
<% end %>
</table>
-10
View File
@@ -1,10 +0,0 @@
<h1><%= t('admin.new_layout') %></h1>
<%= form_for :layout, :url => admin_layouts_path do |f| %>
<%= f.error_messages %>
<%= render :partial => "form", :locals => { :f => f } %>
<p>
<%= f.submit t('create') %> <%= link_back %>
</p>
<% end %>
+7
View File
@@ -0,0 +1,7 @@
<% if @site && @site.registered? %>
registered
<% else %>
<%= link_to 'register', 'http://localhost:3001/user/sites/register?' +
{:site => {:school => @site.school, :department => @site.department}}.to_query,
:target => '_blank' %>
<% end %>
+1
View File
@@ -0,0 +1 @@
<%= @site.inspect %>