Nicolae Claudius
12 years ago
178 changed files with 1751 additions and 2461 deletions
@ -0,0 +1,24 @@ |
|||||||
|
$ -> |
||||||
|
$(document).popover(selector: '[rel=popover]') |
||||||
|
$(document).tooltip(selector: '[rel=tooltip]') |
||||||
|
|
||||||
|
pjaxContainer = '[data-pjax-container]' |
||||||
|
$pjaxContainer = $(pjaxContainer) |
||||||
|
$pjaxContainerParent = $(pjaxContainer).parent() |
||||||
|
$body = $('body') |
||||||
|
fixLayout = -> |
||||||
|
if $pjaxContainer.find('.container').length > 0 |
||||||
|
$pjaxContainerParent.removeClass 'container' |
||||||
|
else |
||||||
|
$pjaxContainerParent.addClass 'container' |
||||||
|
if $body.has('.page-home-section').length > 0 |
||||||
|
$body.addClass('with-home-section') |
||||||
|
else |
||||||
|
$body.removeClass('with-home-section') |
||||||
|
fixLayout() |
||||||
|
|
||||||
|
$('.pjax-nav a:not([data-remote]):not([data-behavior]):not([data-skip-pjax])').pjax(pjaxContainer) |
||||||
|
$pjaxContainer.on 'pjax:success', (event, data, status, xhr, options) -> |
||||||
|
$('.pjax-nav').find('li.active').removeClass 'active' |
||||||
|
$(".pjax-nav a[href=\"#{window.location.pathname}\"]").parents('li').addClass 'active' |
||||||
|
fixLayout() |
@ -0,0 +1,5 @@ |
|||||||
|
#= require webshims/minified/extras/modernizr-custom |
||||||
|
#= require webshims/minified/polyfiller |
||||||
|
|
||||||
|
$.webshims.setOptions('basePath', '/assets/webshims/minified/shims/') |
||||||
|
$.webshims.polyfill() |
@ -0,0 +1,64 @@ |
|||||||
|
// |
||||||
|
// Remove icons since we use font-awesome |
||||||
|
// |
||||||
|
// |
||||||
|
// Bootstrap v2.1.0 |
||||||
|
// |
||||||
|
// Copyright 2012 Twitter, Inc |
||||||
|
// Licensed under the Apache License v2.0 |
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0 |
||||||
|
// |
||||||
|
// Designed and built with all the love in the world @twitter by @mdo and @fat. |
||||||
|
// Converted to Sass by @thomasmcdonald_, and distributed as bootstrap-sass |
||||||
|
|
||||||
|
// Core variables and mixins |
||||||
|
@import "bootstrap/variables"; // Modify this for custom colors, font-sizes, etc |
||||||
|
@import "bootstrap/mixins"; |
||||||
|
|
||||||
|
// CSS Reset |
||||||
|
@import "bootstrap/reset"; |
||||||
|
|
||||||
|
// Grid system and page structure |
||||||
|
@import "bootstrap/scaffolding"; |
||||||
|
@import "bootstrap/grid"; |
||||||
|
@import "bootstrap/layouts"; |
||||||
|
|
||||||
|
// Base CSS |
||||||
|
@import "bootstrap/type"; |
||||||
|
@import "bootstrap/code"; |
||||||
|
@import "bootstrap/forms"; |
||||||
|
@import "bootstrap/tables"; |
||||||
|
|
||||||
|
// Components: common |
||||||
|
@import "bootstrap/dropdowns"; |
||||||
|
@import "bootstrap/wells"; |
||||||
|
@import "bootstrap/component-animations"; |
||||||
|
@import "bootstrap/close"; |
||||||
|
|
||||||
|
// Components: Buttons & Alerts |
||||||
|
@import "bootstrap/buttons"; |
||||||
|
@import "bootstrap/button-groups"; |
||||||
|
@import "bootstrap/alerts"; // Note: alerts share common CSS with buttons and thus have styles in _buttons.scss |
||||||
|
|
||||||
|
// Components: Nav |
||||||
|
@import "bootstrap/navs"; |
||||||
|
@import "bootstrap/navbar"; |
||||||
|
@import "bootstrap/breadcrumbs"; |
||||||
|
@import "bootstrap/pagination"; |
||||||
|
@import "bootstrap/pager"; |
||||||
|
|
||||||
|
// Components: Popovers |
||||||
|
@import "bootstrap/modals"; |
||||||
|
@import "bootstrap/tooltip"; |
||||||
|
@import "bootstrap/popovers"; |
||||||
|
|
||||||
|
// Components: Misc |
||||||
|
@import "bootstrap/thumbnails"; |
||||||
|
@import "bootstrap/labels-badges"; |
||||||
|
@import "bootstrap/progress-bars"; |
||||||
|
@import "bootstrap/accordion"; |
||||||
|
@import "bootstrap/carousel"; |
||||||
|
@import "bootstrap/hero-unit"; |
||||||
|
|
||||||
|
// Utility classes |
||||||
|
@import "bootstrap/utilities"; // Has to be last to override when necessary |
@ -0,0 +1,11 @@ |
|||||||
|
.navbar-inverse .nav { |
||||||
|
li.highlight a { |
||||||
|
color: darken(yellow, 10%); |
||||||
|
&:hover { |
||||||
|
color: yellow; |
||||||
|
} |
||||||
|
} |
||||||
|
li.highlight.active a { |
||||||
|
color: yellow; |
||||||
|
} |
||||||
|
} |
@ -1,4 +0,0 @@ |
|||||||
class DashboardController < ApplicationController |
|
||||||
def index |
|
||||||
end |
|
||||||
end |
|
@ -0,0 +1,3 @@ |
|||||||
|
class PublicController < ApplicationController |
||||||
|
layout :scoped_layout |
||||||
|
end |
@ -1,4 +1,4 @@ |
|||||||
class AaaasController < ApplicationController |
class Users::AaaasController < UsersController |
||||||
active_scaffold :aaaa do |conf| |
active_scaffold :aaaa do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:name, :content, :ttl,] |
conf.create.columns = [:name, :content, :ttl,] |
@ -1,4 +1,4 @@ |
|||||||
class AsController < ApplicationController |
class Users::AsController < UsersController |
||||||
active_scaffold :a do |conf| |
active_scaffold :a do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:name, :content, :ttl,] |
conf.create.columns = [:name, :content, :ttl,] |
@ -1,4 +1,4 @@ |
|||||||
class CnamesController < ApplicationController |
class Users::CnamesController < UsersController |
||||||
active_scaffold :cname do |conf| |
active_scaffold :cname do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:name, :content, :ttl] |
conf.create.columns = [:name, :content, :ttl] |
@ -1,4 +1,4 @@ |
|||||||
class DomainsController < ApplicationController |
class Users::DomainsController < UsersController |
||||||
active_scaffold :domain do |conf| |
active_scaffold :domain do |conf| |
||||||
conf.columns = [:name, :ip, :records, :soa_record, :ns_records, :apply_subdomains] |
conf.columns = [:name, :ip, :records, :soa_record, :ns_records, :apply_subdomains] |
||||||
conf.list.columns = [:name, :records, :permissions] |
conf.list.columns = [:name, :records, :permissions] |
@ -1,4 +1,4 @@ |
|||||||
class MxesController < ApplicationController |
class Users::MxesController < UsersController |
||||||
active_scaffold :mx do |conf| |
active_scaffold :mx do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:content, :ttl, :prio] |
conf.create.columns = [:content, :ttl, :prio] |
@ -1,4 +1,4 @@ |
|||||||
class NsController < ApplicationController |
class Users::NsController < UsersController |
||||||
active_scaffold :ns do |conf| |
active_scaffold :ns do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:name, :content, :ttl] |
conf.create.columns = [:name, :content, :ttl] |
@ -1,4 +1,4 @@ |
|||||||
class PermissionsController < ApplicationController |
class Users::PermissionsController < UsersController |
||||||
active_scaffold :permission do |conf| |
active_scaffold :permission do |conf| |
||||||
conf.actions.exclude :show, :search |
conf.actions.exclude :show, :search |
||||||
conf.columns = [:domain, :user, :user_email] |
conf.columns = [:domain, :user, :user_email] |
@ -1,4 +1,4 @@ |
|||||||
class RecordsController < ApplicationController |
class Users::RecordsController < UsersController |
||||||
# override so SOA's cannot be created by themselves |
# override so SOA's cannot be created by themselves |
||||||
def self._add_sti_create_links |
def self._add_sti_create_links |
||||||
new_action_link = active_scaffold_config.action_links.collection['new'] |
new_action_link = active_scaffold_config.action_links.collection['new'] |
@ -1,4 +1,4 @@ |
|||||||
class SoasController < ApplicationController |
class Users::SoasController < UsersController |
||||||
active_scaffold :soa do |conf| |
active_scaffold :soa do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:contact, :ttl] |
conf.create.columns = [:contact, :ttl] |
@ -1,4 +1,4 @@ |
|||||||
class SrvsController < ApplicationController |
class Users::SrvsController < UsersController |
||||||
active_scaffold :srv do |conf| |
active_scaffold :srv do |conf| |
||||||
conf.columns = [:name, :type, :content, :weight, :port, :host, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :weight, :port, :host, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
@ -1,4 +1,4 @@ |
|||||||
class TxtsController < ApplicationController |
class Users::TxtsController < UsersController |
||||||
active_scaffold :txt do |conf| |
active_scaffold :txt do |conf| |
||||||
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
conf.columns = [:name, :type, :content, :ttl, :prio, :change_date, :authentication_token] |
||||||
conf.create.columns = [:name, :content, :ttl] |
conf.create.columns = [:name, :content, :ttl] |
@ -0,0 +1,25 @@ |
|||||||
|
class UsersController < ApplicationController |
||||||
|
before_filter :authenticate_user! |
||||||
|
before_filter :set_stampers |
||||||
|
include Userstamp |
||||||
|
layout :scoped_layout |
||||||
|
|
||||||
|
rescue_from CanCan::AccessDenied, ActiveScaffold::ActionNotAllowed do |exception| |
||||||
|
flash.now[:error] = exception.message |
||||||
|
render_access_denied |
||||||
|
end |
||||||
|
|
||||||
|
protected |
||||||
|
|
||||||
|
def set_stampers |
||||||
|
User.current = current_user |
||||||
|
User.stamper = current_user |
||||||
|
end |
||||||
|
|
||||||
|
def ensure_nested_under_domain |
||||||
|
unless nested? && nested_parent_record.is_a?(Domain) |
||||||
|
raise CanCan::AccessDenied, "not found" |
||||||
|
end |
||||||
|
end |
||||||
|
|
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
module Public::PagesHelper |
||||||
|
def progress_size(size) |
||||||
|
size.to_i <= 10 ? 10 : size |
||||||
|
end |
||||||
|
end |
@ -1,5 +0,0 @@ |
|||||||
module RecordsHelper |
|
||||||
def record_authentication_token_column(record) |
|
||||||
record.type == 'A' ? record.authentication_token : '-' |
|
||||||
end |
|
||||||
end |
|
@ -0,0 +1,2 @@ |
|||||||
|
module Users::CnamesHelper |
||||||
|
end |
@ -0,0 +1,2 @@ |
|||||||
|
module Users::PermissionsHelper |
||||||
|
end |
@ -0,0 +1,5 @@ |
|||||||
|
module Users::RecordsHelper |
||||||
|
def record_authentication_token_column(record, column) |
||||||
|
record.type == 'A' ? record.authentication_token : '-' |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,11 @@ |
|||||||
|
class Admin < ActiveRecord::Base |
||||||
|
# Include default devise modules. Others available are: |
||||||
|
# :token_authenticatable, :confirmable, |
||||||
|
# :lockable, :timeoutable and :omniauthable |
||||||
|
devise :database_authenticatable, :registerable, |
||||||
|
:recoverable, :rememberable, :trackable, :validatable |
||||||
|
|
||||||
|
# Setup accessible (or protected) attributes for your model |
||||||
|
attr_accessible :email, :password, :password_confirmation, :remember_me |
||||||
|
# attr_accessible :title, :body |
||||||
|
end |
@ -0,0 +1,3 @@ |
|||||||
|
class Setting < RailsSettings::CachedSettings |
||||||
|
attr_accessible :var, :value |
||||||
|
end |
@ -1,4 +1,4 @@ |
|||||||
class Ability |
class UserAbility |
||||||
CRUD = [:read, :create, :update, :destroy] |
CRUD = [:read, :create, :update, :destroy] |
||||||
|
|
||||||
include CanCan::Ability |
include CanCan::Ability |
@ -0,0 +1,31 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<meta charset="utf-8" /> |
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||||||
|
<meta http-equiv="Content-Language" content="en" /> |
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> |
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
||||||
|
<title><%= content_for?(:title) ? yield(:title) : "EntryDNS" %></title> |
||||||
|
|
||||||
|
<%= stylesheet_link_tag "application" %> |
||||||
|
<!--[if lte IE 8]> |
||||||
|
<%= stylesheet_link_tag "application-ie", :media => "all" %> |
||||||
|
<![endif]--> |
||||||
|
<%= javascript_include_tag "application" %> |
||||||
|
<%= csrf_meta_tag %> |
||||||
|
</head> |
||||||
|
<body class="users"> |
||||||
|
|
||||||
|
<div class="container" id="main"> |
||||||
|
<div data-pjax-container="true"> |
||||||
|
<%= flash_display 'flash' %> |
||||||
|
<%= yield %> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="container"> |
||||||
|
<%= render 'shared/bottom' %> |
||||||
|
</div> |
||||||
|
</body> |
||||||
|
</html> |
@ -1,5 +1,4 @@ |
|||||||
<% semantic_navigation :application_nav, html: { class: 'nav' } do |n| %> |
<% semantic_navigation :application_nav, html: { class: 'nav' } do |n| %> |
||||||
<%#= link_to('Dashboard', dashboard_path, :data => {:pjax => '#main'}) %> |
|
||||||
<%= n.item '', link: domains_path do %> |
<%= n.item '', link: domains_path do %> |
||||||
<i class="icon-white icon-th-list"></i> My Domains |
<i class="icon-white icon-th-list"></i> My Domains |
||||||
<% end %> |
<% end %> |
@ -1,4 +1,4 @@ |
|||||||
<%= render :partial => "devise/shared/links" %> |
<%= render :partial => "users/shared/links" %> |
||||||
|
|
||||||
<%= simple_form_for(resource, |
<%= simple_form_for(resource, |
||||||
as: resource_name, |
as: resource_name, |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue