diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index 84b9781d..96088f42 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -62,6 +62,10 @@ class Admin::SitesController < OrbitBackendController end + def responsive_setting + + end + def ui_theme diff --git a/app/controllers/front_controller.rb b/app/controllers/front_controller.rb index b3c26516..6b08f3b1 100644 --- a/app/controllers/front_controller.rb +++ b/app/controllers/front_controller.rb @@ -13,10 +13,10 @@ class FrontController < ApplicationController def show_footer @page = Page.find(:all, :conditions => {:name => /terms/i}) - @name = @page.first.name - @url = "/#{@name}" + @name = @page.first.name if @page.first.name.present? + @url = "/#{@name}" if @name.present? - if !@site.enable_terms_of_use + if (!@site.enable_terms_of_use && @url.present?) render :text => (@site.footer + "Terms of Use") else render :text => @site.footer diff --git a/app/views/admin/items/_site_bar.html.erb b/app/views/admin/items/_site_bar.html.erb index 1397a3d4..eeaa8a07 100644 --- a/app/views/admin/items/_site_bar.html.erb +++ b/app/views/admin/items/_site_bar.html.erb @@ -14,6 +14,8 @@
  • <%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><%end%>
  • +
  • <%= link_to admin_site_responsive_setting_path(@site), :class => active_for_action('sites', 'responsive') do %><%end%>
  • +
  • <%= link_to admin_site_search_engine_path(@site), :class => active_for_action('sites', 'site_info') do %><%end%>
  • <%= link_to admin_site_preference_path(@site), :class => active_for_action('sites', 'preference') do %><%end%>
  • diff --git a/app/views/admin/sites/_side_bar.html.erb b/app/views/admin/sites/_side_bar.html.erb index 9ab39fa4..85f71f59 100644 --- a/app/views/admin/sites/_side_bar.html.erb +++ b/app/views/admin/sites/_side_bar.html.erb @@ -14,6 +14,8 @@
  • <%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><%end%>
  • +
  • <%= link_to admin_site_responsive_setting_path(@site), :class => active_for_action('sites', 'responsive_setting') do %><%end%>
  • +
  • <%= link_to admin_site_search_engine_path(@site), :class => active_for_action('sites', 'search_engine') do %><%end%>
  • <%= link_to admin_site_preference_path(@site), :class => active_for_action('sites', 'preference') do %><%end%>
  • diff --git a/app/views/admin/sites/responsive_setting.html.erb b/app/views/admin/sites/responsive_setting.html.erb new file mode 100644 index 00000000..6513f846 --- /dev/null +++ b/app/views/admin/sites/responsive_setting.html.erb @@ -0,0 +1,45 @@ +<% content_for :side_bar do %> + <%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_responsive_setting_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %> +<% end %> + + + <%= stylesheet_link_tag "lib/wrap-nav"%> + <%= stylesheet_link_tag "lib/main-forms"%> + <%= stylesheet_link_tag "lib/fileupload"%> + <%= stylesheet_link_tag "lib/togglebox"%> + + <%= javascript_include_tag 'lib/bootstrap-fileupload' %> + <%= javascript_include_tag 'lib/site_set' %> + + + <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "form-horizontal main-forms"} do |f| %> +
    + +
    + + +
    + +
    + <%= f.check_box :mobile_on , :class=>"toggle-check", :data=> { disabled: true } %> + Enable Mobile Website +
    +
    + +
    + +
    + <%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %> + Make API available for Mobile Apps +
    +
    + +
    + +
    + <%= f.submit t("submit"), :class => "btn btn-primary" %> + <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> +
    + +
    + <%end%> \ No newline at end of file diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb index d15e275a..3cb9470d 100644 --- a/app/views/devise/registrations/new.html.erb +++ b/app/views/devise/registrations/new.html.erb @@ -3,8 +3,11 @@ <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| %> <%= devise_error_messages! %> -
    <%= f.label :email %>
    + +
    <%= f.label "Username" %>
    + <%= f.email_field :user_id %>
    <%= f.label :password %>
    <%= f.password_field :password %>
    diff --git a/config/routes.rb b/config/routes.rb index f15898c7..b79e3d50 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -197,6 +197,7 @@ Orbit::Application.routes.draw do resources :sites do get 'mail_setting' get 'site_info' + get 'responsive_setting' get 'search_engine' get 'sitemap' get 'sitemap_frontend'