fix announcement & links

This commit is contained in:
unknown committed 2012-03-23 18:04:11 +08:00
1 parent a755eb184b
commit 42519d9f78
40 files changed
+446 -268

No files matched your search

@@ -35,19 +35,6 @@ class Panel::WebResource::BackEnd::WebLinkCategorysController < ApplicationContr
format.js
end
end
def quick_edit
# debugger
@web_link_category = WebLinkCategory.find(params[:web_link_category_id])
@url = panel_web_resource_back_end_web_link_category_path(@web_link_category)
respond_to do |format|
format.js
end
end
# GET /web_links/1/edit
def edit
@@ -64,7 +64,7 @@ class Panel::WebResource::BackEnd::WebLinksController < ApplicationController
respond_to do |format|
if @web_link.save
format.html { redirect_to(panel_web_resource_back_end_web_links_url, :notice => t('web_resource.create_web_resource_success')) }
format.html { redirect_to(panel_web_resource_back_end_web_links_url) }
format.xml { render :xml => @web_link, :status => :created, :location => @web_link }
else
format.html { render :action => "new" }
@@ -84,7 +84,7 @@ class Panel::WebResource::BackEnd::WebLinksController < ApplicationController
respond_to do |format|
if @web_link.update_attributes(params[:web_link])
format.html { redirect_to(panel_web_resource_back_end_web_links_url, :notice => t('web_resource.update_web_resource_success')) }
format.html { redirect_to(panel_web_resource_back_end_web_links_url) }
format.js { render 'toggle_enable' }
format.xml { head :ok }
else
@@ -6,7 +6,7 @@
<div class="quick-edit">
<ul class="nav nav-pills hide">
<li><%= link_to t('web_link_category.edit'), edit_panel_web_resource_back_end_web_link_category_path(web_link_category), :remote => true %></li>
<li><%= link_to t('web_link_category.delete'), panel_web_resource_back_end_web_link_category_quick_edit_path(web_link_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
<li><%= link_to t('web_link_category.delete'), panel_web_resource_back_end_web_link_category_path(web_link_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
</ul>
</div>
</td>
@@ -25,12 +25,12 @@
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
</div>
<h3 class="widget-title"><i class="icons-tag icons-white"></i>Tags</h3>
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= check_box_tag 'web_link[tag_ids][]', tag.id, @web_link.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<% end %>
</div>
<div class="widget-content clear form-horizontal">
<% @tags.each do |tag| %>
<%= check_box_tag 'web_link[tag_ids][]', tag.id, @web_link.tag_ids.include?(tag.id)%>
<%= tag[I18n.locale] %>
<% end %>
</div>
</div>
</div>
@@ -89,13 +89,16 @@
<% end %>
<% end %>
</div>
</div>
<!--Post End-->
<div class="form-actions">
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
</div>
</div>
<!--Post End-->
<div class="form-actions">
<%= f.submit 'Submit/送出', :class=>'btn btn-primary' %>
</div>
@@ -1 +1 @@
$("#<%= dom_id @bulletin %>").remove();
$("#<%= dom_id @web_link %>").remove();
@@ -1,16 +1,5 @@
<br />
<br />
<br />
<br />
<h1><%= t('web_resource.editing_web_resource') %></h1>
<%= form_for @web_link, :url => panel_web_resource_back_end_web_link_path(@web_link) do |f| %>
<%= form_for @web_link, :url => panel_web_resource_back_end_web_link_path(@web_link), :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%= link_back %>
<br />
<br />
<br />
<br />
@@ -1,24 +1,9 @@
<br />
<br />
<br />
<br />
<% content_for :secondary do %>
<ul class="list">
<li><%= link_to t('web_link.index'), panel_web_resource_back_end_web_links_path, :class => 'seclink2' %></li>
</ul>
<% end -%>
<%= flash_messages %>
<h1><%= t('web_link.new_web_resource') %></h1>
<%= form_for @web_link, :url => panel_web_resource_back_end_web_links_path do |f| %>
<%= form_for @web_link, :url => panel_web_resource_back_end_web_links_path, :html => {:class => 'clear'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
<%= link_back %>
<%#= link_back %>
<br />
<br />
<br />
+1 -3
View File
@@ -5,9 +5,7 @@ Rails.application.routes.draw do
namespace :back_end do
root :to => "web_links#index"
resources :web_links
resources :web_link_categorys, :controller => 'web_link_categorys' do
match "quick_edit/:web_link_category_id" => "web_link_categorys#quick_edit" ,:as => :quick_edit
end
resources :web_link_categorys
resources :tags
end
namespace :front_end do