From c74ead83182963861e2c33648a1a01dee0df1196 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 7 Dec 2012 09:07:49 +0800 Subject: [PATCH 1/5] Redirect to designs after buying template Randomise buy counts --- app/controllers/admin/purchases_controller.rb | 1 + app/views/admin/module_store/show.html.erb | 2 +- app/views/admin/template_store/show.html.erb | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/purchases_controller.rb b/app/controllers/admin/purchases_controller.rb index f1663c95..8a0ffdbc 100644 --- a/app/controllers/admin/purchases_controller.rb +++ b/app/controllers/admin/purchases_controller.rb @@ -18,6 +18,7 @@ class Admin::PurchasesController < ApplicationController unzip_design(temp_file, zip_name) temp_file.close temp_file.unlink + redirect_to admin_designs_url end def download diff --git a/app/views/admin/module_store/show.html.erb b/app/views/admin/module_store/show.html.erb index d01388c3..003cbf30 100644 --- a/app/views/admin/module_store/show.html.erb +++ b/app/views/admin/module_store/show.html.erb @@ -25,7 +25,7 @@

Module Name

free download

who use it?

+ <%= radio_button_tag 'design_default', design.id, (@site.design.id.to_s.eql?(design.id.to_s) ? true : false), :class => 'design_default', :rel => admin_sites_path %> <%=@site.design.id.to_s.eql?(design.id.to_s)%> <%= design.intro %> <%= design.author %> \ No newline at end of file diff --git a/app/views/admin/designs/_designs.html.erb b/app/views/admin/designs/_designs.html.erb index 48d2f364..de11dc78 100644 --- a/app/views/admin/designs/_designs.html.erb +++ b/app/views/admin/designs/_designs.html.erb @@ -2,6 +2,7 @@ + @@ -9,4 +10,15 @@ <%= render :partial => 'design', :collection => @designs %> - \ No newline at end of file + + +<% content_for :page_specific_javascript do %> + +<% end %> diff --git a/app/views/admin/designs/_sort_headers.html.erb b/app/views/admin/designs/_sort_headers.html.erb index 2fb84f60..c1410201 100644 --- a/app/views/admin/designs/_sort_headers.html.erb +++ b/app/views/admin/designs/_sort_headers.html.erb @@ -1,4 +1,5 @@ <%= render_sort_bar(true, delete_admin_designs_path(:direction => params[:direction], :sort => params[:sort], :sort_options => params[:sort_options]), ['title', 'title','span2', :title], + ['', '', 'span1', :default], ['intro', 'intro', 'span7', :intro], ['author', 'author', 'span2', :author]).html_safe %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 77e034ee..8dea5eb3 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -148,6 +148,7 @@ en: web_link: Link dashboard_: Dashboard deadline: Deadline + default: Default default_css: Default CSS delete: file: Delete file diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 341be345..c8075b24 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -148,6 +148,7 @@ zh_tw: web_link: 鏈接 dashboard_: 儀表版 deadline: 最後期限 + default: Default default_css: 預設樣式表 delete: file: 刪除檔案 diff --git a/config/routes.rb b/config/routes.rb index c7de04fb..6e87ed04 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -128,6 +128,7 @@ Orbit::Application.routes.draw do get 'sitemap_toggle', :on => :member get 'system_info' get 'ui_theme' + get 'change_design' end resources :tags resources :users From a1b1fc9d34054c09249022574a4299fc3e57174a Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 7 Dec 2012 12:32:43 +0800 Subject: [PATCH 3/5] Remove test --- app/views/admin/designs/_design.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/admin/designs/_design.html.erb b/app/views/admin/designs/_design.html.erb index 1ee3b54f..82a37c1a 100644 --- a/app/views/admin/designs/_design.html.erb +++ b/app/views/admin/designs/_design.html.erb @@ -9,7 +9,7 @@ - <%= radio_button_tag 'design_default', design.id, (@site.design.id.to_s.eql?(design.id.to_s) ? true : false), :class => 'design_default', :rel => admin_sites_path %> <%=@site.design.id.to_s.eql?(design.id.to_s)%> + <%= radio_button_tag 'design_default', design.id, (@site.design.id.to_s.eql?(design.id.to_s) ? true : false), :class => 'design_default', :rel => admin_sites_path %> <%= design.intro %> <%= design.author %> \ No newline at end of file From 9dde79414df8528d84af9e71d1c170d704a817da Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 7 Dec 2012 10:10:38 +0800 Subject: [PATCH 4/5] all sections and sections megerd --- app/assets/javascripts/orbitdesktop.js | 1 + app/controllers/desktop_controller.rb | 2 +- ...sections.html.erb => allsections.html.erb} | 0 app/views/desktop/index.html.erb | 2 +- app/views/desktop/settings/sections.html.erb | 190 ++---------------- config/routes.rb | 2 +- 6 files changed, 19 insertions(+), 178 deletions(-) rename app/views/desktop/{sections.html.erb => allsections.html.erb} (100%) diff --git a/app/assets/javascripts/orbitdesktop.js b/app/assets/javascripts/orbitdesktop.js index 16591be7..e10a6604 100755 --- a/app/assets/javascripts/orbitdesktop.js +++ b/app/assets/javascripts/orbitdesktop.js @@ -637,6 +637,7 @@ var orbitDesktop = function(dom){ } } z++; + $("div#group_wrapper").append($group); } var yy=1,y=0; diff --git a/app/controllers/desktop_controller.rb b/app/controllers/desktop_controller.rb index 279694b6..4eef26be 100644 --- a/app/controllers/desktop_controller.rb +++ b/app/controllers/desktop_controller.rb @@ -19,7 +19,7 @@ class DesktopController< ApplicationController render :layout => false end - def sections + def allsections render :layout => false end diff --git a/app/views/desktop/sections.html.erb b/app/views/desktop/allsections.html.erb similarity index 100% rename from app/views/desktop/sections.html.erb rename to app/views/desktop/allsections.html.erb diff --git a/app/views/desktop/index.html.erb b/app/views/desktop/index.html.erb index c90f53fd..3559dc35 100644 --- a/app/views/desktop/index.html.erb +++ b/app/views/desktop/index.html.erb @@ -4,7 +4,7 @@
  • Home
    • App Manager
    • -
    • All Sections
    • +
    • All Sections
    • Settings
  • diff --git a/app/views/desktop/settings/sections.html.erb b/app/views/desktop/settings/sections.html.erb index d8e8208e..dcb92237 100644 --- a/app/views/desktop/settings/sections.html.erb +++ b/app/views/desktop/settings/sections.html.erb @@ -1,178 +1,18 @@ -
    -
    -