Announcement modifications and tags

This commit is contained in:
Christophe Vilayphiou committed 2012-02-15 00:34:22 +08:00
1 parent f57e9f19f7
commit 3e70634add
38 files changed
+615 -143

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
<%= form_for :tag, :url => admin_tags_path, :remote => true, :html => {:id => 'tag_form'} do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
<% end %>
<%= f.hidden_field :module_app_id, :value => @module_app_id %>
<%= f.submit %>
<% end %>
+7
View File
@@ -0,0 +1,7 @@
<%= form_for tag, :url => admin_tag_path(tag), :remote => true do |f| %>
<% @site_valid_locales.each do |locale| %>
<%= I18nVariable.from_locale(locale) %>:<%= f.text_field locale %>
<% end %>
<%= f.hidden_field :module_app_id, :value => tag.module_app_id %>
<%= f.submit %>
<% end %>
+8
View File
@@ -0,0 +1,8 @@
<div id="<%= dom_id tag %>" >
<% @site_valid_locales.each do |locale| %>
<%= I18nVariable.from_locale(locale) %>:
<%= tag[locale] %>
<% end %>
<%= link_to t(:edit), edit_admin_tag_path(tag), :remote => true %>
<%= link_to t(:delete), admin_tag_path(tag), :confirm => t('sure?'), :method => :delete, :remote => true %>
</div>
+4
View File
@@ -0,0 +1,4 @@
$('#tag_form').each(function(){
this.reset();
});
$('#tags').append("<%= j render :partial => 'tag', :object => @tag %>")
+1
View File
@@ -0,0 +1 @@
$('#<%= dom_id @tag %>').html("<%= j render :partial => 'form', :locals => {:tag => @tag} %>")
+6
View File
@@ -0,0 +1,6 @@
<div id='tags'>
<%= render :partial => 'tag', :collection => @tags %>
</div>
-------------------------
<br/>
<%= render 'add' %>
+1
View File
@@ -0,0 +1 @@
$('#<%= dom_id @tag %>').html("<%= j render :partial => 'tag', :object => @tag %>")