remove unused mobile layouts

This commit is contained in:
r888888888
2017-11-17 13:59:14 -08:00
parent e70c2a3085
commit 31e36cf9eb
6 changed files with 0 additions and 57 deletions

View File

@@ -11,7 +11,3 @@ div#c-tags {
}
}
}
#mobile-tag-list {
display: none;
}

View File

@@ -32,9 +32,6 @@ class FavoritesController < ApplicationController
end
respond_with(@post) do |format|
format.html do
redirect_to(mobile_post_path(@post))
end
format.js
format.json do
if @post
@@ -51,16 +48,11 @@ class FavoritesController < ApplicationController
if @post
@post.remove_favorite!(CurrentUser.user)
path = mobile_post_path(@post)
else
Favorite.remove(post_id: params[:id], user: CurrentUser.user)
path = mobile_posts_path
end
respond_with(@post) do |format|
format.html do
redirect_to(path)
end
format.js
format.json do
render :json => {:success => true}.to_json

View File

@@ -1,18 +0,0 @@
class Mobile::PostsController < ApplicationController
layout "mobile"
before_filter :set_mobile_mode
def index
@post_set = PostSets::Post.new(params[:tags], params[:page], CurrentUser.user.per_page, raw: false)
@posts = @post_set.posts
end
def show
@post = Post.find(params[:id])
end
private
def set_mobile_mode
CurrentUser.mobile_mode = true
end
end

View File

@@ -1,21 +0,0 @@
<!doctype html>
<html>
<head>
<title><%= yield :page_title %></title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<%= csrf_meta_tag %>
<%= stylesheet_link_tag "mobile", :media => "screen" %>
<%= javascript_include_tag "jquery-1.11.1.min.js" %>
<%= javascript_include_tag "rails.js" %>
<%= Danbooru.config.custom_html_header_content %>
<%= yield :html_header %>
</head>
<body lang="en">
<header id="top">
<h1><%= link_to Danbooru.config.app_name, "/" %></h1>
</header>
<div id="page">
<%= yield :layout %>
</div>
</body>
</html>

View File

@@ -5,9 +5,6 @@ Rails.application.routes.draw do
resource :alias_and_implication_import, :only => [:new, :create]
resource :dashboard, :only => [:show]
end
namespace :mobile do
resources :posts, :only => [:index, :show]
end
namespace :moderator do
resource :bulk_revert, :only => [:new, :create]
resource :dashboard, :only => [:show]
@@ -329,8 +326,6 @@ Rails.application.routes.draw do
resources :wpages, :controller => "wiki_pages"
resources :ftopics, :controller => "forum_topics"
resources :fposts, :controller => "forum_posts"
get "/m/posts", :controller => "mobile/posts", :action => "index"
get "/m/posts/:id", :controller => "mobile/posts", :action => "show"
# legacy aliases
get "/artist" => redirect {|params, req| "/artists?page=#{req.params[:page]}&search[name]=#{CGI::escape(req.params[:name].to_s)}"}

View File

@@ -16,7 +16,6 @@ Disallow: /iqdb_queries
Disallow: /ip_bans
Disallow: /janitor_trials
Disallow: /maintenance
Disallow: /mobile/
Disallow: /m/
Disallow: /mod_actions
Disallow: /moderator