Skip to content

Commit

Permalink
initial push
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Mitchell committed Jul 4, 2018
0 parents commit 3bb0f3e
Show file tree
Hide file tree
Showing 627 changed files with 41,895 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "nterchange/assets/components"
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor/
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## 4.0.0

* Reboot repository. Remove old SQL, passwords, deprecated files

## 3.3.0

* Many changes to support grids
* NModel now implements `Array Access`
* Update bootstrap to 3.1
* Test suite refactored

## 3.2.0

* Update to CKEditor 4.0
* Config class with static properties added as an alternative to constants for configuration

## 3.1.22

* NAsset - dynamic coffeescript & less compiling
* NModel::$_delete_uploads flag on model to delete upload files along with records
68 changes: 68 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
--------------------------------------------------------------------

Redistribution and use in source and binary forms, with or without
modification, is permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

3. The name "PHP" must not be used to endorse or promote products
derived from this software without prior written permission. For
written permission, please contact [email protected].

4. Products derived from this software may not be called "PHP", nor
may "PHP" appear in their name, without prior written permission
from [email protected]. You may indicate that your software works in
conjunction with PHP by saying "Foo for PHP" instead of calling
it "PHP Foo" or "phpfoo"

5. The PHP Group may publish revised and/or new versions of the
license from time to time. Each version will be given a
distinguishing version number.
Once covered code has been published under a particular version
of the license, you may always continue to use it under the terms
of that version. You may also choose to use such covered code
under the terms of any subsequent version of the license
published by the PHP Group. No one other than the PHP Group has
the right to modify the terms applicable to covered code created
under this License.

6. Redistributions of any form whatsoever must retain the following
acknowledgment:
"This product includes PHP software, freely available from
<http://www.php.net/software/>".

THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------

This software consists of voluntary contributions made by many
individuals on behalf of the PHP Group.

The PHP Group can be contacted via Email at [email protected].

For more information on the PHP Group and the PHP project,
please see <http://www.php.net>.

PHP includes the Zend Engine, freely available at
<http://www.zend.com>.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
nterchange
==========

Content Management that gets out of your way

Install
-------

This repository contains the core libraries, intended for use by a front-end.

Testing
-------

Set up the dependencies for the backend if necessary, then run PHPUnit.
This will clear and create a database called `nterchange_test`.

composer install
vendor/bin/phpunit -c test/phpunit.xml
50 changes: 50 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require 'rubygems'
require 'bundler'
require 'pathname'
require 'logger'
require 'fileutils'
Bundler.require

require 'active_record'
require 'yui/compressor'
require 'uglifier'

dir = Rake.application.original_dir

ROOT = Pathname(File.dirname(__FILE__))
BUNDLES = %w( surftoedit.js surftoedit.css jquery-ui.js noty.js )
BUILD_DIR = ROOT.join("nterchange/assets")
SOURCE_DIR = ROOT.join("app/assets")
COMPONENTS_DIR = ROOT.join("nterchange/assets/components")

namespace :asset do
desc "Compile all assets"
task :compile do
Sprockets::Cache::FileStore.new(File.join ROOT, '.cache')
sprockets = Sprockets::Environment.new(ROOT) do |env|
env.logger = Logger.new(STDOUT)
end

# sprockets.css_compressor = YUI::CssCompressor.new
# sprockets.js_compressor = Uglifier.new(:mangle => false)

sprockets.append_path(SOURCE_DIR.join('javascripts').to_s)
sprockets.append_path(SOURCE_DIR.join('stylesheets').to_s)
sprockets.append_path(COMPONENTS_DIR.to_s)

BUNDLES.each do |bundle|
asset = sprockets.find_asset(bundle)
prefix, basename = asset.pathname.to_s.split('/')[-2..-1]
FileUtils.mkpath BUILD_DIR.join(prefix)
realname = asset.pathname.basename.to_s.split(".")[0..1].join(".")
output_file = BUILD_DIR.join(prefix, realname)

File.open(output_file, 'wb') do |f|
f.write asset.to_s
end
end

# # Make available bower components in public_html
# FileUtils.cp_r(Dir["#{SOURCE_DIR}/components*"],BUILD_DIR)
end
end
68 changes: 68 additions & 0 deletions app/controllers/admin_controller.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php
include_once 'nterchange_controller.php';
/**
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to [email protected] so we can mail you a copy immediately.
*
* @category nterchange Administration
* @author Tim Glen <[email protected]>
* @copyright 2005-2007 nonfiction studios inc.
* @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version SVN: $Id$
* @link http://www.nterchange.com/
*/
class AdminController extends nterchangeController {
var $user_level_required = N_USER_ROOT;
var $name = 'admin';

function __construct() {
parent::__construct();
}

function index() {
$this->redirectTo(array('users', 'viewlist'));
}

function viewlist($parameter) {
$this->loadSubnav($parameter);
parent::viewlist($parameter);
}
function create($parameter) {
$this->loadSubnav($parameter);
parent::create($parameter);
}
function edit($parameter) {
$this->loadSubnav($parameter);
parent::edit($parameter);
}

function &getDefaultModel() {
return false;
}

function loadSidebar($parameter) {
$this->set('SIDEBAR_TITLE', $this->page_title . ' Info');
$this->setAppend('SIDEBAR_CONTENT', $this->render(array('action'=>'sidebar_content', 'return'=>true)));
}

function loadSubnav($parameter) {
$subnav = array();
$subnav[] = array('title'=>'Users', 'controller'=>'users', 'action'=>'viewlist', 'id'=>$parameter, 'class'=>'');
$subnav[] = array('title'=>'Audit Trail', 'controller'=>'audit_trail', 'action'=>'viewlist', 'id'=>$parameter, 'class'=>'');
$subnav[] = array('title'=>'Templates', 'controller'=>'page_template', 'action'=>'viewlist', 'id'=>$parameter, 'class'=>'');
$subnav[] = array('title'=>'Assets', 'controller'=>'cms_asset_info', 'action'=>'viewlist', 'id'=>$parameter, 'class'=>'');
foreach ($subnav as $k=>$nav) {
if ($nav['controller'] == $this->name && $nav['action'] == $this->action) {
$subnav[$k]['class'] = 'current';
}
}
$this->set('subnav', $subnav);
}
}
?>
Loading

0 comments on commit 3bb0f3e

Please sign in to comment.