Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ gem 'pg'
gem 'thin'
gem 'fog'
gem 'haml'
gem 'activeadmin', github: 'activeadmin'
# gem 'puma'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.4'
Expand Down
48 changes: 48 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,24 @@ GIT
actionpack (>= 4)
railties (>= 4)

GIT
remote: git://github.com/activeadmin/activeadmin.git
revision: 952273a204def082e0891cc94f1f8c15216605d0
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0, >= 1.0.2)
bourbon
coffee-rails
formtastic (~> 3.1)
formtastic_i18n
inherited_resources (~> 1.4, != 1.5.0)
jquery-rails
jquery-ui-rails (~> 5.0)
kaminari (~> 0.15)
rails (>= 3.2, < 4.2)
ransack (~> 1.3)
sass-rails

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -36,10 +54,15 @@ GEM
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.3.6)
arbre (1.0.2)
activesupport (>= 3.0.0)
arel (5.0.1.20140414130214)
bcrypt (3.1.7)
bootstrap-sass (3.3.0.1)
sass (~> 3.2)
bourbon (3.2.3)
sass (~> 3.2)
thor
builder (3.2.2)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
Expand Down Expand Up @@ -103,22 +126,38 @@ GEM
fog-core
nokogiri (~> 1.5, >= 1.5.11)
formatador (0.2.5)
formtastic (3.1.2)
actionpack (>= 3.2.13)
formtastic_i18n (0.1.1)
foundation-rails (5.4.5.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
haml (4.0.5)
tilt
has_scope (0.6.0.rc)
actionpack (>= 3.2, < 5)
activesupport (>= 3.2, < 5)
hike (1.2.3)
i18n (0.6.11)
inflecto (0.0.2)
inherited_resources (1.5.1)
actionpack (>= 3.2, < 4.2)
has_scope (~> 0.6.0.rc)
railties (>= 3.2, < 4.2)
responders (~> 1.0)
ipaddress (0.8.0)
jbuilder (2.2.4)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-ui-rails (5.0.2)
railties (>= 3.2.16)
json (1.8.1)
kaminari (0.16.1)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
Expand All @@ -135,6 +174,8 @@ GEM
mini_portile (= 0.6.0)
orm_adapter (0.5.0)
pg (0.17.1)
polyamorous (1.1.0)
activerecord (>= 3.0)
polyglot (0.3.5)
rack (1.5.2)
rack-cache (1.2)
Expand All @@ -157,6 +198,12 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
ransack (1.5.1)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
polyamorous (~> 1.1)
rdoc (4.1.2)
json (~> 1.4)
remotipart (1.2.1)
Expand Down Expand Up @@ -208,6 +255,7 @@ PLATFORMS
ruby

DEPENDENCIES
activeadmin!
bootstrap-sass
coffee-rails (~> 4.0.0)
devise
Expand Down
Binary file added app/.DS_Store
Binary file not shown.
28 changes: 28 additions & 0 deletions app/admin/admin_user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
ActiveAdmin.register AdminUser do
permit_params :email, :password, :password_confirmation

index do
selectable_column
id_column
column :email
column :current_sign_in_at
column :sign_in_count
column :created_at
actions
end

filter :email
filter :current_sign_in_at
filter :sign_in_count
filter :created_at

form do |f|
f.inputs "Admin Details" do
f.input :email
f.input :password
f.input :password_confirmation
end
f.actions
end

end
33 changes: 33 additions & 0 deletions app/admin/dashboard.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ActiveAdmin.register_page "Dashboard" do

menu priority: 1, label: proc{ I18n.t("active_admin.dashboard") }

content title: proc{ I18n.t("active_admin.dashboard") } do
div class: "blank_slate_container", id: "dashboard_default_message" do
span class: "blank_slate" do
span I18n.t("active_admin.dashboard_welcome.welcome")
small I18n.t("active_admin.dashboard_welcome.call_to_action")
end
end

# Here is an example of a simple dashboard with columns and panels.
#
# columns do
# column do
# panel "Recent Posts" do
# ul do
# Post.recent(5).map do |post|
# li link_to(post.title, admin_post_path(post))
# end
# end
# end
# end

# column do
# panel "Info" do
# para "Welcome to ActiveAdmin."
# end
# end
# end
end # content
end
18 changes: 18 additions & 0 deletions app/admin/photo.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ActiveAdmin.register Photo do


# See permitted parameters documentation:
# https://github.com/activeadmin/activeadmin/blob/master/docs/2-resource-customization.md#setting-up-strong-parameters
#
# permit_params :list, :of, :attributes, :on, :model
#
# or
#
# permit_params do
# permitted = [:permitted, :attributes]
# permitted << :other if resource.something?
# permitted
# end


end
Binary file added app/assets/.DS_Store
Binary file not shown.
Binary file added app/assets/javascripts/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions app/assets/javascripts/active_admin.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#= require active_admin/base
3 changes: 3 additions & 0 deletions app/assets/javascripts/comment.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
14 changes: 7 additions & 7 deletions app/assets/javascripts/isotope2.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ $(window).load(function(){


var $container = $('#masonry-container').isotope({

itemSelector: '.box',

masonry: {
columnWidth: 5,
gutter: 5,
Expand All @@ -17,22 +17,22 @@ $(window).load(function(){

$container.imagesLoaded(function(){
$container.isotope('layout');
})
});

// $container.imagesLoaded()

// .done( function( instance ){
// $container.isotope({
// itemSelector: '.box',

// masonry: {
// columnWidth: 5,
// isFitWidth: true
// }

// });
// });
// });

$('#nav > li > ul').on( 'click', 'li', function() {
var filterValue = $(this).attr('data-filter');
console.log(filterValue)
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/photo_shoot.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
6 changes: 4 additions & 2 deletions app/assets/javascripts/photos.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ document.addEventListener('DOMContentLoaded', function(){
if (document.querySelector(".photos-list")){
var img = document.querySelector(".photos-list");
img.addEventListener('click', imageModal);


window.addEventListener('scroll', function(e){
var distanceY = window.pageYOffset || document.documentElement.scrollTop
Expand All @@ -24,10 +24,12 @@ document.addEventListener('DOMContentLoaded', function(){
}
});
}
var multiple_photos_form = $('#new_photo');
var multiple_photos_form = $('form');
console.log(multiple_photos_form);
multiple_photos_form.fileupload({dataType: 'script'});

multiple_photos_form.on('fileuploadsubmit', function (e, data) {
console.log(data.formData)
data.formData = multiple_photos_form.serializeArray();
});
});
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/shoot.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
17 changes: 17 additions & 0 deletions app/assets/stylesheets/active_admin.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// SASS variable overrides must be declared before loading up Active Admin's styles.
//
// To view the variables that Active Admin provides, take a look at
// `app/assets/stylesheets/active_admin/mixins/_variables.css.scss` in the
// Active Admin source.
//
// For example, to change the sidebar width:
// $sidebar-width: 242px;

// Active Admin's got SASS!
@import "active_admin/mixins";
@import "active_admin/base";

// Overriding any non-variable SASS must be done after the fact.
// For example, to change the default status-tag color:
//
// .status_tag { background: #6090DB; }
3 changes: 3 additions & 0 deletions app/assets/stylesheets/comment.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Comment controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/photo_shoot.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the PhotoShoot controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/shoot.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the Shoot controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
2 changes: 2 additions & 0 deletions app/controllers/comments_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
class CommentController < ApplicationController
end
Loading