ajout espace étudiants

This commit is contained in:
Nicolas Bally 2014-07-20 02:14:49 +02:00
parent 28a05fb2ff
commit dfd4234daf
228 changed files with 6233 additions and 709 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 558 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,36 @@
#= require jquery
#= require jquery_ujs
# require turbolinks
#= require bootstrap
$(document).ready ->
$(document).on 'click', 'input.datepicker', ->
$(this).datetimepicker(
language: 'fr'
pickTime: false
).focus();
$(document).on 'click', 'input.datetimepicker', ->
$(this).datetimepicker(
use24hours: true
format: 'DD/MM/YYYY hh:mm'
minuteStepping:15
language: 'fr'
).focus();
$(document).on 'click', 'input.timepicker', ->
$(this).datetimepicker(
use24hours: true
format: 'DD/MM/YYYY hh:mm'
minuteStepping:15
pickDate: false
language: 'fr'
).focus();

View File

@ -27,6 +27,8 @@
#= require nested_fields
#= require_tree ./note_files
$(document).ready ->
$(document).on 'click', 'input.datepicker', ->

View File

@ -0,0 +1,20 @@
#= require jquery
#= require bootstrap
#= require ./shared/jquery.backstretch.js
place = ->
margin = ($(window).height() - ($(".form-signin").outerHeight()+60) )/ 2
$(".form-signin").css("margin-top" : margin+"px")
$(document).ready ->
place();
$(".form-signin").hide()
$(".form-signin").css("opacity",1 )
$(".form-signin").fadeIn(1500)
$(window).on "resize", ->
place();

View File

@ -0,0 +1,528 @@
/*
* jQuery UI Widget 1.9.1+amd
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/jQuery.widget/
*/
(function (factory) {
if (typeof define === "function" && define.amd) {
// Register as an anonymous AMD module:
define(["jquery"], factory);
} else {
// Browser globals:
factory(jQuery);
}
}(function( $, undefined ) {
var uuid = 0,
slice = Array.prototype.slice,
_cleanData = $.cleanData;
$.cleanData = function( elems ) {
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
try {
$( elem ).triggerHandler( "remove" );
// http://bugs.jquery.com/ticket/8235
} catch( e ) {}
}
_cleanData( elems );
};
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
// create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// extend with the existing constructor to carry over any static properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
});
basePrototype = new base();
// we need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( $.isFunction( value ) ) {
prototype[ prop ] = (function() {
var _super = function() {
return base.prototype[ prop ].apply( this, arguments );
},
_superApply = function( args ) {
return base.prototype[ prop ].apply( this, args );
};
return function() {
var __super = this._super,
__superApply = this._superApply,
returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
})();
}
});
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: basePrototype.widgetEventPrefix || name
}, prototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
// TODO remove widgetBaseClass, see #8155
widgetBaseClass: fullName,
widgetFullName: fullName
});
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
});
// remove the list of existing child constructors from the old constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
};
$.widget.extend = function( target ) {
var input = slice.call( arguments, 1 ),
inputIndex = 0,
inputLength = input.length,
key,
value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = slice.call( arguments, 1 ),
returnValue = this;
// allow multiple hashes to be passed on init
options = !isMethodCall && args.length ?
$.widget.extend.apply( null, [ options ].concat(args) ) :
options;
if ( isMethodCall ) {
this.each(function() {
var methodValue,
instance = $.data( this, fullName );
if ( !instance ) {
return $.error( "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name + " widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
});
} else {
this.each(function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} )._init();
} else {
new object( options, this );
}
});
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
disabled: false,
// callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this.bindings = $();
this.hoverable = $();
this.focusable = $();
if ( element !== this ) {
// 1.9 BC for #7810
// TODO remove dual storage
$.data( element, this.widgetName, this );
$.data( element, this.widgetFullName, this );
this._on( this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
});
this.document = $( element.style ?
// element within the document
element.ownerDocument :
// element is window or document
element.document || element );
this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
}
this._create();
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: $.noop,
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
this._destroy();
// we can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.unbind( this.eventNamespace )
// 1.9 BC for #7810
// TODO remove dual storage
.removeData( this.widgetName )
.removeData( this.widgetFullName )
// support: jquery <1.6.3
// http://bugs.jquery.com/ticket/9413
.removeData( $.camelCase( this.widgetFullName ) );
this.widget()
.unbind( this.eventNamespace )
.removeAttr( "aria-disabled" )
.removeClass(
this.widgetFullName + "-disabled " +
"ui-state-disabled" );
// clean up events and states
this.bindings.unbind( this.eventNamespace );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
if ( arguments.length === 0 ) {
// don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( value === undefined ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( value === undefined ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
this.options[ key ] = value;
if ( key === "disabled" ) {
this.widget()
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
.attr( "aria-disabled", value );
this.hoverable.removeClass( "ui-state-hover" );
this.focusable.removeClass( "ui-state-focus" );
}
return this;
},
enable: function() {
return this._setOption( "disabled", false );
},
disable: function() {
return this._setOption( "disabled", true );
},
_on: function( element, handlers ) {
var delegateElement,
instance = this;
// no element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
// accept selectors, DOM elements
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
// copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^(\w+)\s*(.*)$/ ),
eventName = match[1] + instance.eventNamespace,
selector = match[2];
if ( selector ) {
delegateElement.delegate( selector, eventName, handlerProxy );
} else {
element.bind( eventName, handlerProxy );
}
});
},
_off: function( element, eventName ) {
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
element.unbind( eventName ).undelegate( eventName );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
$( event.currentTarget ).addClass( "ui-state-hover" );
},
mouseleave: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-hover" );
}
});
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
$( event.currentTarget ).addClass( "ui-state-focus" );
},
focusout: function( event ) {
$( event.currentTarget ).removeClass( "ui-state-focus" );
}
});
},
_trigger: function( type, event, data ) {
var prop, orig,
callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// the original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions,
effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue(function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
});
}
};
});
// DEPRECATED
if ( $.uiBackCompat !== false ) {
$.Widget.prototype._getCreateOptions = function() {
return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
};
}
}));

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
function init_note_upload_fields(note_id){
drop = $('#note_'+note_id+' .fileupload').closest(".bottom")
$('#note_'+note_id+' .fileupload').fileupload({
url: $(this).attr("action"),
dropZone: drop,
autoUpload: true,
progressall: function (e, data) {
var progress = parseInt(data.loaded / data.total * 100, 10);
if(progress == 100){
$(this).find('.progress').html('traitement en cours.');
}
else{
$(this).find('.progress').html(progress + '% téléchargé.');}
},
always: function (e, data) {
$(this).find('.progress').html("");
},
drop: function (e, data) {
$('#note_'+note_id+' .fileupload').closest(".bottom").css("background", "rgb(255, 255, 204)");
}
});
$(".note .bottom").bind('dragover', function (e) {
$(this).css("background", "#B7DF63");
});
$(".note .bottom").bind('dragleave', function (e) {
$(this).css("background", "rgb(255, 255, 204)");
});
}
$(document).ready(function () {
$("body").on("click", ".note .add_files",function(){
$(this).next('input').click();
return false;
});
});

View File

@ -0,0 +1,364 @@
/*
* Backstretch
* http://srobbin.com/jquery-plugins/backstretch/
*
* Copyright (c) 2012 Scott Robbin
* Licensed under the MIT license.
*/
;(function ($, window, undefined) {
'use strict';
/* PLUGIN DEFINITION
* ========================= */
$.fn.backstretch = function (images, options) {
// We need at least one image
if (images === undefined || images.length === 0) {
$.error("No images were supplied for Backstretch");
}
/*
* Scroll the page one pixel to get the right window height on iOS
* Pretty harmless for everyone else
*/
if ($(window).scrollTop() === 0 ) {
window.scrollTo(0, 0);
}
return this.each(function () {
var $this = $(this)
, obj = $this.data('backstretch');
// If we've already attached Backstretch to this element, remove the old instance.
if (obj) {
// Merge the old options with the new
options = $.extend(obj.options, options);
// Remove the old instance
obj.destroy(true);
}
obj = new Backstretch(this, images, options);
$this.data('backstretch', obj);
});
};
// If no element is supplied, we'll attach to body
$.backstretch = function (images, options) {
// Return the instance
return $('body')
.backstretch(images, options)
.data('backstretch');
};
// Custom selector
$.expr[':'].backstretch = function(elem) {
return $(elem).data('backstretch') !== undefined;
};
/* DEFAULTS
* ========================= */
$.fn.backstretch.defaults = {
centeredX: true // Should we center the image on the X axis?
, centeredY: true // Should we center the image on the Y axis?
, duration: 5000 // Amount of time in between slides (if slideshow)
, fade: 0 // Speed of fade transition between slides
};
/* STYLES
*
* Baked-in styles that we'll apply to our elements.
* In an effort to keep the plugin simple, these are not exposed as options.
* That said, anyone can override these in their own stylesheet.
* ========================= */
var styles = {
wrap: {
left: 0
, top: 0
, overflow: 'hidden'
, margin: 0
, padding: 0
, height: '100%'
, width: '100%'
, zIndex: -999999
}
, img: {
position: 'absolute'
, display: 'none'
, margin: 0
, padding: 0
, border: 'none'
, width: 'auto'
, height: 'auto'
, maxWidth: 'none'
, zIndex: -999999
}
};
/* CLASS DEFINITION
* ========================= */
var Backstretch = function (container, images, options) {
this.options = $.extend({}, $.fn.backstretch.defaults, options || {});
/* In its simplest form, we allow Backstretch to be called on an image path.
* e.g. $.backstretch('/path/to/image.jpg')
* So, we need to turn this back into an array.
*/
this.images = $.isArray(images) ? images : [images];
// Preload images
$.each(this.images, function () {
$('<img />')[0].src = this;
});
// Convenience reference to know if the container is body.
this.isBody = container === document.body;
/* We're keeping track of a few different elements
*
* Container: the element that Backstretch was called on.
* Wrap: a DIV that we place the image into, so we can hide the overflow.
* Root: Convenience reference to help calculate the correct height.
*/
this.$container = $(container);
this.$root = this.isBody ? supportsFixedPosition ? $(window) : $(document) : this.$container;
// Don't create a new wrap if one already exists (from a previous instance of Backstretch)
var $existing = this.$container.children(".backstretch").first();
this.$wrap = $existing.length ? $existing : $('<div class="backstretch"></div>').css(styles.wrap).appendTo(this.$container);
// Non-body elements need some style adjustments
if (!this.isBody) {
// If the container is statically positioned, we need to make it relative,
// and if no zIndex is defined, we should set it to zero.
var position = this.$container.css('position')
, zIndex = this.$container.css('zIndex');
this.$container.css({
position: position === 'static' ? 'relative' : position
, zIndex: zIndex === 'auto' ? 0 : zIndex
, background: 'none'
});
// Needs a higher z-index
this.$wrap.css({zIndex: -999998});
}
// Fixed or absolute positioning?
this.$wrap.css({
position: this.isBody && supportsFixedPosition ? 'fixed' : 'absolute'
});
// Set the first image
this.index = 0;
this.show(this.index);
// Listen for resize
$(window).on('resize.backstretch', $.proxy(this.resize, this))
.on('orientationchange.backstretch', $.proxy(function () {
// Need to do this in order to get the right window height
if (this.isBody && window.pageYOffset === 0) {
window.scrollTo(0, 1);
this.resize();
}
}, this));
};
/* PUBLIC METHODS
* ========================= */
Backstretch.prototype = {
resize: function () {
try {
var bgCSS = {left: 0, top: 0}
, rootWidth = this.isBody ? this.$root.width() : this.$root.innerWidth()
, bgWidth = rootWidth
, rootHeight = this.isBody ? ( window.innerHeight ? window.innerHeight : this.$root.height() ) : this.$root.innerHeight()
, bgHeight = bgWidth / this.$img.data('ratio')
, bgOffset;
// Make adjustments based on image ratio
if (bgHeight >= rootHeight) {
bgOffset = (bgHeight - rootHeight) / 2;
if(this.options.centeredY) {
bgCSS.top = '-' + bgOffset + 'px';
}
} else {
bgHeight = rootHeight;
bgWidth = bgHeight * this.$img.data('ratio');
bgOffset = (bgWidth - rootWidth) / 2;
if(this.options.centeredX) {
bgCSS.left = '-' + bgOffset + 'px';
}
}
this.$wrap.css({width: rootWidth, height: rootHeight})
.find('img:not(.deleteable)').css({width: bgWidth, height: bgHeight}).css(bgCSS);
} catch(err) {
// IE7 seems to trigger resize before the image is loaded.
// This try/catch block is a hack to let it fail gracefully.
}
return this;
}
// Show the slide at a certain position
, show: function (index) {
// Validate index
if (Math.abs(index) > this.images.length - 1) {
return;
} else {
this.index = index;
}
// Vars
var self = this
, oldImage = self.$wrap.find('img').addClass('deleteable')
, evt = $.Event('backstretch.show', {
relatedTarget: self.$container[0]
});
// Pause the slideshow
clearInterval(self.interval);
// New image
self.$img = $('<img />')
.css(styles.img)
.bind('load', function (e) {
var imgWidth = this.width || $(e.target).width()
, imgHeight = this.height || $(e.target).height();
// Save the ratio
$(this).data('ratio', imgWidth / imgHeight);
// Show the image, then delete the old one
// "speed" option has been deprecated, but we want backwards compatibilty
$(this).fadeIn(self.options.speed || self.options.fade, function () {
oldImage.remove();
// Resume the slideshow
if (!self.paused) {
self.cycle();
}
// Trigger the event
self.$container.trigger(evt, self);
});
// Resize
self.resize();
})
.appendTo(self.$wrap);
// Hack for IE img onload event
self.$img.attr('src', self.images[index]);
return self;
}
, next: function () {
// Next slide
return this.show(this.index < this.images.length - 1 ? this.index + 1 : 0);
}
, prev: function () {
// Previous slide
return this.show(this.index === 0 ? this.images.length - 1 : this.index - 1);
}
, pause: function () {
// Pause the slideshow
this.paused = true;
return this;
}
, resume: function () {
// Resume the slideshow
this.paused = false;
this.next();
return this;
}
, cycle: function () {
// Start/resume the slideshow
if(this.images.length > 1) {
// Clear the interval, just in case
clearInterval(this.interval);
this.interval = setInterval($.proxy(function () {
// Check for paused slideshow
if (!this.paused) {
this.next();
}
}, this), this.options.duration);
}
return this;
}
, destroy: function (preserveBackground) {
// Stop the resize events
$(window).off('resize.backstretch orientationchange.backstretch');
// Clear the interval
clearInterval(this.interval);
// Remove Backstretch
if(!preserveBackground) {
this.$wrap.remove();
}
this.$container.removeData('backstretch');
}
};
/* SUPPORTS FIXED POSITION?
*
* Based on code from jQuery Mobile 1.1.0
* http://jquerymobile.com/
*
* In a nutshell, we need to figure out if fixed positioning is supported.
* Unfortunately, this is very difficult to do on iOS, and usually involves
* injecting content, scrolling the page, etc.. It's ugly.
* jQuery Mobile uses this workaround. It's not ideal, but works.
*
* Modified to detect IE6
* ========================= */
var supportsFixedPosition = (function () {
var ua = navigator.userAgent
, platform = navigator.platform
// Rendering engine is Webkit, and capture major version
, wkmatch = ua.match( /AppleWebKit\/([0-9]+)/ )
, wkversion = !!wkmatch && wkmatch[ 1 ]
, ffmatch = ua.match( /Fennec\/([0-9]+)/ )
, ffversion = !!ffmatch && ffmatch[ 1 ]
, operammobilematch = ua.match( /Opera Mobi\/([0-9]+)/ )
, omversion = !!operammobilematch && operammobilematch[ 1 ]
, iematch = ua.match( /MSIE ([0-9]+)/ )
, ieversion = !!iematch && iematch[ 1 ];
return !(
// iOS 4.3 and older : Platform is iPhone/Pad/Touch and Webkit version is less than 534 (ios5)
((platform.indexOf( "iPhone" ) > -1 || platform.indexOf( "iPad" ) > -1 || platform.indexOf( "iPod" ) > -1 ) && wkversion && wkversion < 534) ||
// Opera Mini
(window.operamini && ({}).toString.call( window.operamini ) === "[object OperaMini]") ||
(operammobilematch && omversion < 7458) ||
//Android lte 2.1: Platform is Android and Webkit version is less than 533 (Android 2.2)
(ua.indexOf( "Android" ) > -1 && wkversion && wkversion < 533) ||
// Firefox Mobile before 6.0 -
(ffversion && ffversion < 6) ||
// WebOS less than 3
("palmGetResource" in window && wkversion && wkversion < 534) ||
// MeeGo
(ua.indexOf( "MeeGo" ) > -1 && ua.indexOf( "NokiaBrowser/8.5.0" ) > -1) ||
// IE6
(ieversion && ieversion <= 6)
);
}());
}(jQuery, window));

View File

@ -0,0 +1,32 @@
#= require jquery
#= require jquery_ujs
#= require bootstrap
#= require ./shared/jquery.backstretch.js
@flash_delay = ->
$("#flashs").find(".alert").each ->
if !$(this).hasClass("delay")
$(this).addClass("delay")
$(this).delay(3000).fadeOut();
$ ->
flash_delay();
$.backstretch("/login_background5.jpg")
place = ->
margin = ($(window).height() - ($(".form-signin").outerHeight()+60) )/ 2
$(".form-signin").css("margin-top" : margin+"px")
$(document).ready ->
place();
$(".form-signin").hide()
$(".form-signin").css("opacity",1 )
$(".form-signin").fadeIn(1500)
$(window).on "resize", ->
place();

View File

@ -9,6 +9,13 @@
@import "redactor";
@import "pane_hover";
@import "vendor/select2";
@import "admin/topics";
#admin_navbar{
border-radius:0px;
}
span.preview{
img{
max-width:125px;

View File

@ -0,0 +1,293 @@
#topic_app_index{
position:absolute;
top:40px;
left:0px;
right:0px;
bottom:0px;
background:white;
#left{
background:rgba(0,0,0,0.8);
position:absolute;
top:0px;
left:0px;
width:300px;
bottom:0px;
}
#topic_show{
position:absolute;
top:0px;
left:300px;
right:0px;
bottom:0px;
background:rgba(250,250,250,0.9);
overflow:auto;
}
.note{
//@include border-radius(5px);
//@include box-shadow(0px 0px 5px rgba(0,0,0,0.5) inset);
position:relative;
margin-bottom:1em;
min-height:120px;
.left{
//@include box-shadow(0px 0px 5px rgba(0,0,0,0.5));
//@include border-radius(3px 0px 0px 3px);
position:absolute;
top:0px;
left:0px;
bottom:0px;
width:100px;
background:rgba(0,0,0,0.8);
text-align:center;
padding:10px;
color:rgba(255,255,255,0.9);
*{
text-align:center;
}
.avatar{
width:70px;
height:70px;
//@include border-radius(50%);
margin:auto;
}
}
.right{
min-height:150px;
margin-left:120px;
padding:10px;
line-height:1.1em;
float:none;
img{
max-width:100%;
max-height:99%;
}
p,ul, h1,h2,h3{
max-width:600px;
margin-left:5%;
p,ul{
margin-left:0px;
max-width:inherit;
}
}
.large{
max-width:100%;
margin-left:0px;
}
.links{
float:right;
}
}
.bottom{
background:rgb(255, 255, 204);
position:relative;
margin-left:120px;
//@include border-radius(0px 0px 3px 0px);
//@include box-shadow(0px 0px 2px rgba(0,0,0,0.3),-1px -1px 5px rgba(0,0,0,0.2) inset);
padding:10px;
padding-top:2px;
min-height:75px;
.note_file{
margin:8px 0px;
position:relative;
top:-4px;
.icon{
height:28px;
position:relative;
top:8px;
}
}
.note_file_queue{
position:absolute;
top:1em;
right:0em;
.file_upload_progress{
width:100px;
}
}
.fileupload{
.upload{
position:absolute;
right:10px;
top:-24px;
z-index:1000;
.add_files{
background:black;
color:white;
padding:5px 10px;
//@include border-radius(5px 5px 0 0);
}
.progress{
}
}
input[type=file]{
display:none;
}
}
}
}
#file_prev{
position:absolute;
top:10px;
bottom:10px;
background:rgba(0,0,0,0.9);
width:98%;
right:-50%;
//@include border-radius(5px);
//@include transition(all 1s ease);
&:hover{
right:1%;
}
iframe{
position:absolute;
width:96%;
height:95%;
top:20px;
left:0px;
right:0px;
bottom:0px;
margin:auto;
}
}
}
textarea.markdown{
display:block;
width:97%;
margin:1% auto;
min-height:400px;
}
#add_topic{
display:block;
color:rgba(250,250,250,0.8);
text-decoration:none;
margin-left:5px;
margin-top:2px;
padding:5px 10px;
}
#topics{
margin-top:5px;
border-top:1px solid rgba(250,250,250,0.1);
overflow:auto;
position:absolute;
top:2em;
bottom:5px;
left:0px;
right:0px;
a{
color:white;
display:block;
padding:6px 10px;
border-bottom:1px solid rgba(250,250,250,0.1);
color:rgba(250,250,250,0.8);
text-decoration:none;
margin-left:5px;
margin-top:2px;
//@include border-radius(5px 0px 0px 5px);
&.active, &:hover{
background:rgba(250,250,250,0.9);
color:rgba(0,0,0,0.7);
}
}
}
#topic_show{
padding:10px;
.topic_links{
float:right;
}
h1{
margin-top:0px;
margin-bottom:0.2em;
padding-bottom:0px;
}
}

View File

@ -1,18 +1,27 @@
@import "bootstrap";
body {
padding:10px;
padding:0px;
background-color: #f5f5f5;
}
.form-signin {
max-width: 300px;
padding: 19px 29px 29px;
max-width: 500px;
padding: 30px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
background:rgba(255,255,255,.7);
border-radius :5px;
box-shadow: 0 1px 2px rgba(0,0,0,.05);
opacity:0;
color:rgba(0,0,0,.5);
label{
color:rgba(0,0,0,.5);
}
p:last-child{
margin-bottom:0px;
}
}
@ -26,3 +35,48 @@ padding:10px;
margin-bottom: 15px;
padding: 7px 9px;
}
.input-dark{
background:rgba(255,255,255,.5);
border:0px;
box-shadow: 0 1px 2px rgba(0,0,0,.4) inset;
border-radius:3px;
color: rgba(0,0,0,0.9);
}
::-webkit-input-placeholder {
color: rgba(0,0,0,0.7);
}
:-moz-placeholder { /* Firefox 18- */
color: rgba(0,0,0,0.7);
}
::-moz-placeholder { /* Firefox 19+ */
color: rgba(0,0,0,0.7);
}
:-ms-input-placeholder {
color: rgba(0,0,0,0.7);
}
#flashs{
color:rgba(255,255,255,0.7);
div{
max-width: 500px;
margin: auto;
padding:10px;
border:1px solid rgba(255,255,255,0.7);
}
.close{
color:rgba(255,255,255,0.7);
opacity:1;
text-shadow:none;
}
}

View File

@ -32,7 +32,7 @@ legend {
label {
display: inline-block;
margin-bottom: 5px;
font-weight: bold;
font-weight: normal;
}

View File

@ -63,6 +63,8 @@
.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; }
.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; }
.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; }
.#{$fa-css-prefix}-photo:before,
.#{$fa-css-prefix}-image:before,
.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; }
.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; }
.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; }
@ -190,6 +192,8 @@
.#{$fa-css-prefix}-save:before,
.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; }
.#{$fa-css-prefix}-square:before { content: $fa-var-square; }
.#{$fa-css-prefix}-navicon:before,
.#{$fa-css-prefix}-reorder:before,
.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; }
.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; }
.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; }
@ -211,9 +215,9 @@
.#{$fa-css-prefix}-unsorted:before,
.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; }
.#{$fa-css-prefix}-sort-down:before,
.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; }
.#{$fa-css-prefix}-sort-up:before,
.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; }
.#{$fa-css-prefix}-sort-up:before,
.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; }
.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; }
.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; }
.#{$fa-css-prefix}-rotate-left:before,
@ -281,8 +285,8 @@
.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; }
.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; }
.#{$fa-css-prefix}-code:before { content: $fa-var-code; }
.#{$fa-css-prefix}-mail-reply-all:before,
.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; }
.#{$fa-css-prefix}-mail-reply-all:before { content: $fa-var-mail-reply-all; }
.#{$fa-css-prefix}-star-half-empty:before,
.#{$fa-css-prefix}-star-half-full:before,
.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; }
@ -410,3 +414,93 @@
.#{$fa-css-prefix}-turkish-lira:before,
.#{$fa-css-prefix}-try:before { content: $fa-var-try; }
.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; }
.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; }
.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; }
.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; }
.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; }
.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; }
.#{$fa-css-prefix}-institution:before,
.#{$fa-css-prefix}-bank:before,
.#{$fa-css-prefix}-university:before { content: $fa-var-university; }
.#{$fa-css-prefix}-mortar-board:before,
.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; }
.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; }
.#{$fa-css-prefix}-google:before { content: $fa-var-google; }
.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; }
.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; }
.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; }
.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; }
.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; }
.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; }
.#{$fa-css-prefix}-pied-piper-square:before,
.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; }
.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; }
.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; }
.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; }
.#{$fa-css-prefix}-language:before { content: $fa-var-language; }
.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; }
.#{$fa-css-prefix}-building:before { content: $fa-var-building; }
.#{$fa-css-prefix}-child:before { content: $fa-var-child; }
.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; }
.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; }
.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; }
.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; }
.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; }
.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; }
.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; }
.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; }
.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; }
.#{$fa-css-prefix}-automobile:before,
.#{$fa-css-prefix}-car:before { content: $fa-var-car; }
.#{$fa-css-prefix}-cab:before,
.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; }
.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; }
.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; }
.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; }
.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; }
.#{$fa-css-prefix}-database:before { content: $fa-var-database; }
.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; }
.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; }
.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; }
.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; }
.#{$fa-css-prefix}-file-photo-o:before,
.#{$fa-css-prefix}-file-picture-o:before,
.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; }
.#{$fa-css-prefix}-file-zip-o:before,
.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; }
.#{$fa-css-prefix}-file-sound-o:before,
.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; }
.#{$fa-css-prefix}-file-movie-o:before,
.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; }
.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; }
.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; }
.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; }
.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; }
.#{$fa-css-prefix}-life-bouy:before,
.#{$fa-css-prefix}-life-saver:before,
.#{$fa-css-prefix}-support:before,
.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; }
.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; }
.#{$fa-css-prefix}-ra:before,
.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; }
.#{$fa-css-prefix}-ge:before,
.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; }
.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; }
.#{$fa-css-prefix}-git:before { content: $fa-var-git; }
.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; }
.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; }
.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; }
.#{$fa-css-prefix}-wechat:before,
.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; }
.#{$fa-css-prefix}-send:before,
.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; }
.#{$fa-css-prefix}-send-o:before,
.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; }
.#{$fa-css-prefix}-history:before { content: $fa-var-history; }
.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; }
.#{$fa-css-prefix}-header:before { content: $fa-var-header; }
.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; }
.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; }
.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; }
.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; }
.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; }

View File

@ -2,7 +2,7 @@
// --------------------------
@mixin fa-icon-rotate($degrees, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: rotate($degrees);
-moz-transform: rotate($degrees);
-ms-transform: rotate($degrees);
@ -11,7 +11,7 @@
}
@mixin fa-icon-flip($horiz, $vert, $rotation) {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=$rotation);
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
-webkit-transform: scale($horiz, $vert);
-moz-transform: scale($horiz, $vert);
-ms-transform: scale($horiz, $vert);

View File

@ -20,11 +20,13 @@
0% { -o-transform: rotate(0deg); }
100% { -o-transform: rotate(359deg); }
}
@-ms-keyframes spin {
0% { -ms-transform: rotate(0deg); }
100% { -ms-transform: rotate(359deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(359deg); }
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}

View File

@ -1,381 +1,515 @@
// Variables
// --------------------------
$fa-font-path: "/fonts" !default;
//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.0.3/fonts" !default; // for referencing Bootstrap CDN font files directly
$fa-font-path: "../fonts" !default;
//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.1.0/fonts" !default; // for referencing Bootstrap CDN font files directly
$fa-css-prefix: fa !default;
$fa-version: "4.0.3" !default;
$fa-version: "4.1.0" !default;
$fa-border-color: #eee !default;
$fa-inverse: #fff !default;
$fa-li-width: (30em / 14) !default;
$fa-var-glass: "\f000";
$fa-var-music: "\f001";
$fa-var-search: "\f002";
$fa-var-envelope-o: "\f003";
$fa-var-heart: "\f004";
$fa-var-star: "\f005";
$fa-var-star-o: "\f006";
$fa-var-user: "\f007";
$fa-var-film: "\f008";
$fa-var-th-large: "\f009";
$fa-var-th: "\f00a";
$fa-var-th-list: "\f00b";
$fa-var-check: "\f00c";
$fa-var-times: "\f00d";
$fa-var-search-plus: "\f00e";
$fa-var-search-minus: "\f010";
$fa-var-power-off: "\f011";
$fa-var-signal: "\f012";
$fa-var-cog: "\f013";
$fa-var-trash-o: "\f014";
$fa-var-home: "\f015";
$fa-var-file-o: "\f016";
$fa-var-clock-o: "\f017";
$fa-var-road: "\f018";
$fa-var-download: "\f019";
$fa-var-arrow-circle-o-down: "\f01a";
$fa-var-arrow-circle-o-up: "\f01b";
$fa-var-inbox: "\f01c";
$fa-var-play-circle-o: "\f01d";
$fa-var-repeat: "\f01e";
$fa-var-refresh: "\f021";
$fa-var-list-alt: "\f022";
$fa-var-lock: "\f023";
$fa-var-flag: "\f024";
$fa-var-headphones: "\f025";
$fa-var-volume-off: "\f026";
$fa-var-volume-down: "\f027";
$fa-var-volume-up: "\f028";
$fa-var-qrcode: "\f029";
$fa-var-barcode: "\f02a";
$fa-var-tag: "\f02b";
$fa-var-tags: "\f02c";
$fa-var-book: "\f02d";
$fa-var-bookmark: "\f02e";
$fa-var-print: "\f02f";
$fa-var-camera: "\f030";
$fa-var-font: "\f031";
$fa-var-bold: "\f032";
$fa-var-italic: "\f033";
$fa-var-text-height: "\f034";
$fa-var-text-width: "\f035";
$fa-var-align-left: "\f036";
$fa-var-align-center: "\f037";
$fa-var-align-right: "\f038";
$fa-var-align-justify: "\f039";
$fa-var-list: "\f03a";
$fa-var-outdent: "\f03b";
$fa-var-indent: "\f03c";
$fa-var-video-camera: "\f03d";
$fa-var-picture-o: "\f03e";
$fa-var-pencil: "\f040";
$fa-var-map-marker: "\f041";
$fa-var-adjust: "\f042";
$fa-var-tint: "\f043";
$fa-var-pencil-square-o: "\f044";
$fa-var-share-square-o: "\f045";
$fa-var-check-square-o: "\f046";
$fa-var-arrows: "\f047";
$fa-var-step-backward: "\f048";
$fa-var-fast-backward: "\f049";
$fa-var-backward: "\f04a";
$fa-var-play: "\f04b";
$fa-var-pause: "\f04c";
$fa-var-stop: "\f04d";
$fa-var-forward: "\f04e";
$fa-var-fast-forward: "\f050";
$fa-var-step-forward: "\f051";
$fa-var-eject: "\f052";
$fa-var-chevron-left: "\f053";
$fa-var-chevron-right: "\f054";
$fa-var-plus-circle: "\f055";
$fa-var-minus-circle: "\f056";
$fa-var-times-circle: "\f057";
$fa-var-check-circle: "\f058";
$fa-var-question-circle: "\f059";
$fa-var-info-circle: "\f05a";
$fa-var-crosshairs: "\f05b";
$fa-var-times-circle-o: "\f05c";
$fa-var-check-circle-o: "\f05d";
$fa-var-ban: "\f05e";
$fa-var-arrow-left: "\f060";
$fa-var-arrow-right: "\f061";
$fa-var-arrow-up: "\f062";
$fa-var-arrow-down: "\f063";
$fa-var-share: "\f064";
$fa-var-expand: "\f065";
$fa-var-compress: "\f066";
$fa-var-plus: "\f067";
$fa-var-minus: "\f068";
$fa-var-asterisk: "\f069";
$fa-var-exclamation-circle: "\f06a";
$fa-var-gift: "\f06b";
$fa-var-leaf: "\f06c";
$fa-var-fire: "\f06d";
$fa-var-eye: "\f06e";
$fa-var-eye-slash: "\f070";
$fa-var-exclamation-triangle: "\f071";
$fa-var-plane: "\f072";
$fa-var-calendar: "\f073";
$fa-var-random: "\f074";
$fa-var-comment: "\f075";
$fa-var-magnet: "\f076";
$fa-var-chevron-up: "\f077";
$fa-var-chevron-down: "\f078";
$fa-var-retweet: "\f079";
$fa-var-shopping-cart: "\f07a";
$fa-var-folder: "\f07b";
$fa-var-folder-open: "\f07c";
$fa-var-arrows-v: "\f07d";
$fa-var-arrows-h: "\f07e";
$fa-var-bar-chart-o: "\f080";
$fa-var-twitter-square: "\f081";
$fa-var-facebook-square: "\f082";
$fa-var-camera-retro: "\f083";
$fa-var-key: "\f084";
$fa-var-cogs: "\f085";
$fa-var-comments: "\f086";
$fa-var-thumbs-o-up: "\f087";
$fa-var-thumbs-o-down: "\f088";
$fa-var-star-half: "\f089";
$fa-var-heart-o: "\f08a";
$fa-var-sign-out: "\f08b";
$fa-var-linkedin-square: "\f08c";
$fa-var-thumb-tack: "\f08d";
$fa-var-external-link: "\f08e";
$fa-var-sign-in: "\f090";
$fa-var-trophy: "\f091";
$fa-var-github-square: "\f092";
$fa-var-upload: "\f093";
$fa-var-lemon-o: "\f094";
$fa-var-phone: "\f095";
$fa-var-square-o: "\f096";
$fa-var-bookmark-o: "\f097";
$fa-var-phone-square: "\f098";
$fa-var-twitter: "\f099";
$fa-var-facebook: "\f09a";
$fa-var-github: "\f09b";
$fa-var-unlock: "\f09c";
$fa-var-credit-card: "\f09d";
$fa-var-rss: "\f09e";
$fa-var-hdd-o: "\f0a0";
$fa-var-bullhorn: "\f0a1";
$fa-var-bell: "\f0f3";
$fa-var-certificate: "\f0a3";
$fa-var-hand-o-right: "\f0a4";
$fa-var-hand-o-left: "\f0a5";
$fa-var-hand-o-up: "\f0a6";
$fa-var-hand-o-down: "\f0a7";
$fa-var-arrow-circle-left: "\f0a8";
$fa-var-arrow-circle-right: "\f0a9";
$fa-var-arrow-circle-up: "\f0aa";
$fa-var-arrow-circle-down: "\f0ab";
$fa-var-globe: "\f0ac";
$fa-var-wrench: "\f0ad";
$fa-var-tasks: "\f0ae";
$fa-var-filter: "\f0b0";
$fa-var-briefcase: "\f0b1";
$fa-var-arrows-alt: "\f0b2";
$fa-var-users: "\f0c0";
$fa-var-link: "\f0c1";
$fa-var-cloud: "\f0c2";
$fa-var-flask: "\f0c3";
$fa-var-scissors: "\f0c4";
$fa-var-files-o: "\f0c5";
$fa-var-paperclip: "\f0c6";
$fa-var-floppy-o: "\f0c7";
$fa-var-square: "\f0c8";
$fa-var-bars: "\f0c9";
$fa-var-list-ul: "\f0ca";
$fa-var-list-ol: "\f0cb";
$fa-var-strikethrough: "\f0cc";
$fa-var-underline: "\f0cd";
$fa-var-table: "\f0ce";
$fa-var-magic: "\f0d0";
$fa-var-truck: "\f0d1";
$fa-var-pinterest: "\f0d2";
$fa-var-pinterest-square: "\f0d3";
$fa-var-google-plus-square: "\f0d4";
$fa-var-google-plus: "\f0d5";
$fa-var-money: "\f0d6";
$fa-var-caret-down: "\f0d7";
$fa-var-caret-up: "\f0d8";
$fa-var-caret-left: "\f0d9";
$fa-var-caret-right: "\f0da";
$fa-var-columns: "\f0db";
$fa-var-sort: "\f0dc";
$fa-var-sort-asc: "\f0dd";
$fa-var-sort-desc: "\f0de";
$fa-var-envelope: "\f0e0";
$fa-var-linkedin: "\f0e1";
$fa-var-undo: "\f0e2";
$fa-var-gavel: "\f0e3";
$fa-var-tachometer: "\f0e4";
$fa-var-comment-o: "\f0e5";
$fa-var-comments-o: "\f0e6";
$fa-var-bolt: "\f0e7";
$fa-var-sitemap: "\f0e8";
$fa-var-umbrella: "\f0e9";
$fa-var-clipboard: "\f0ea";
$fa-var-lightbulb-o: "\f0eb";
$fa-var-exchange: "\f0ec";
$fa-var-cloud-download: "\f0ed";
$fa-var-cloud-upload: "\f0ee";
$fa-var-user-md: "\f0f0";
$fa-var-stethoscope: "\f0f1";
$fa-var-suitcase: "\f0f2";
$fa-var-bell-o: "\f0a2";
$fa-var-coffee: "\f0f4";
$fa-var-cutlery: "\f0f5";
$fa-var-file-text-o: "\f0f6";
$fa-var-building-o: "\f0f7";
$fa-var-hospital-o: "\f0f8";
$fa-var-adn: "\f170";
$fa-var-align-center: "\f037";
$fa-var-align-justify: "\f039";
$fa-var-align-left: "\f036";
$fa-var-align-right: "\f038";
$fa-var-ambulance: "\f0f9";
$fa-var-medkit: "\f0fa";
$fa-var-fighter-jet: "\f0fb";
$fa-var-beer: "\f0fc";
$fa-var-h-square: "\f0fd";
$fa-var-plus-square: "\f0fe";
$fa-var-anchor: "\f13d";
$fa-var-android: "\f17b";
$fa-var-angle-double-down: "\f103";
$fa-var-angle-double-left: "\f100";
$fa-var-angle-double-right: "\f101";
$fa-var-angle-double-up: "\f102";
$fa-var-angle-double-down: "\f103";
$fa-var-angle-down: "\f107";
$fa-var-angle-left: "\f104";
$fa-var-angle-right: "\f105";
$fa-var-angle-up: "\f106";
$fa-var-angle-down: "\f107";
$fa-var-desktop: "\f108";
$fa-var-laptop: "\f109";
$fa-var-tablet: "\f10a";
$fa-var-mobile: "\f10b";
$fa-var-circle-o: "\f10c";
$fa-var-quote-left: "\f10d";
$fa-var-quote-right: "\f10e";
$fa-var-spinner: "\f110";
$fa-var-circle: "\f111";
$fa-var-reply: "\f112";
$fa-var-github-alt: "\f113";
$fa-var-folder-o: "\f114";
$fa-var-folder-open-o: "\f115";
$fa-var-smile-o: "\f118";
$fa-var-frown-o: "\f119";
$fa-var-meh-o: "\f11a";
$fa-var-gamepad: "\f11b";
$fa-var-keyboard-o: "\f11c";
$fa-var-flag-o: "\f11d";
$fa-var-flag-checkered: "\f11e";
$fa-var-terminal: "\f120";
$fa-var-code: "\f121";
$fa-var-reply-all: "\f122";
$fa-var-mail-reply-all: "\f122";
$fa-var-star-half-o: "\f123";
$fa-var-location-arrow: "\f124";
$fa-var-crop: "\f125";
$fa-var-code-fork: "\f126";
$fa-var-chain-broken: "\f127";
$fa-var-question: "\f128";
$fa-var-info: "\f129";
$fa-var-exclamation: "\f12a";
$fa-var-superscript: "\f12b";
$fa-var-subscript: "\f12c";
$fa-var-eraser: "\f12d";
$fa-var-puzzle-piece: "\f12e";
$fa-var-microphone: "\f130";
$fa-var-microphone-slash: "\f131";
$fa-var-shield: "\f132";
$fa-var-apple: "\f179";
$fa-var-archive: "\f187";
$fa-var-arrow-circle-down: "\f0ab";
$fa-var-arrow-circle-left: "\f0a8";
$fa-var-arrow-circle-o-down: "\f01a";
$fa-var-arrow-circle-o-left: "\f190";
$fa-var-arrow-circle-o-right: "\f18e";
$fa-var-arrow-circle-o-up: "\f01b";
$fa-var-arrow-circle-right: "\f0a9";
$fa-var-arrow-circle-up: "\f0aa";
$fa-var-arrow-down: "\f063";
$fa-var-arrow-left: "\f060";
$fa-var-arrow-right: "\f061";
$fa-var-arrow-up: "\f062";
$fa-var-arrows: "\f047";
$fa-var-arrows-alt: "\f0b2";
$fa-var-arrows-h: "\f07e";
$fa-var-arrows-v: "\f07d";
$fa-var-asterisk: "\f069";
$fa-var-automobile: "\f1b9";
$fa-var-backward: "\f04a";
$fa-var-ban: "\f05e";
$fa-var-bank: "\f19c";
$fa-var-bar-chart-o: "\f080";
$fa-var-barcode: "\f02a";
$fa-var-bars: "\f0c9";
$fa-var-beer: "\f0fc";
$fa-var-behance: "\f1b4";
$fa-var-behance-square: "\f1b5";
$fa-var-bell: "\f0f3";
$fa-var-bell-o: "\f0a2";
$fa-var-bitbucket: "\f171";
$fa-var-bitbucket-square: "\f172";
$fa-var-bitcoin: "\f15a";
$fa-var-bold: "\f032";
$fa-var-bolt: "\f0e7";
$fa-var-bomb: "\f1e2";
$fa-var-book: "\f02d";
$fa-var-bookmark: "\f02e";
$fa-var-bookmark-o: "\f097";
$fa-var-briefcase: "\f0b1";
$fa-var-btc: "\f15a";
$fa-var-bug: "\f188";
$fa-var-building: "\f1ad";
$fa-var-building-o: "\f0f7";
$fa-var-bullhorn: "\f0a1";
$fa-var-bullseye: "\f140";
$fa-var-cab: "\f1ba";
$fa-var-calendar: "\f073";
$fa-var-calendar-o: "\f133";
$fa-var-fire-extinguisher: "\f134";
$fa-var-rocket: "\f135";
$fa-var-maxcdn: "\f136";
$fa-var-camera: "\f030";
$fa-var-camera-retro: "\f083";
$fa-var-car: "\f1b9";
$fa-var-caret-down: "\f0d7";
$fa-var-caret-left: "\f0d9";
$fa-var-caret-right: "\f0da";
$fa-var-caret-square-o-down: "\f150";
$fa-var-caret-square-o-left: "\f191";
$fa-var-caret-square-o-right: "\f152";
$fa-var-caret-square-o-up: "\f151";
$fa-var-caret-up: "\f0d8";
$fa-var-certificate: "\f0a3";
$fa-var-chain: "\f0c1";
$fa-var-chain-broken: "\f127";
$fa-var-check: "\f00c";
$fa-var-check-circle: "\f058";
$fa-var-check-circle-o: "\f05d";
$fa-var-check-square: "\f14a";
$fa-var-check-square-o: "\f046";
$fa-var-chevron-circle-down: "\f13a";
$fa-var-chevron-circle-left: "\f137";
$fa-var-chevron-circle-right: "\f138";
$fa-var-chevron-circle-up: "\f139";
$fa-var-chevron-circle-down: "\f13a";
$fa-var-html5: "\f13b";
$fa-var-chevron-down: "\f078";
$fa-var-chevron-left: "\f053";
$fa-var-chevron-right: "\f054";
$fa-var-chevron-up: "\f077";
$fa-var-child: "\f1ae";
$fa-var-circle: "\f111";
$fa-var-circle-o: "\f10c";
$fa-var-circle-o-notch: "\f1ce";
$fa-var-circle-thin: "\f1db";
$fa-var-clipboard: "\f0ea";
$fa-var-clock-o: "\f017";
$fa-var-cloud: "\f0c2";
$fa-var-cloud-download: "\f0ed";
$fa-var-cloud-upload: "\f0ee";
$fa-var-cny: "\f157";
$fa-var-code: "\f121";
$fa-var-code-fork: "\f126";
$fa-var-codepen: "\f1cb";
$fa-var-coffee: "\f0f4";
$fa-var-cog: "\f013";
$fa-var-cogs: "\f085";
$fa-var-columns: "\f0db";
$fa-var-comment: "\f075";
$fa-var-comment-o: "\f0e5";
$fa-var-comments: "\f086";
$fa-var-comments-o: "\f0e6";
$fa-var-compass: "\f14e";
$fa-var-compress: "\f066";
$fa-var-copy: "\f0c5";
$fa-var-credit-card: "\f09d";
$fa-var-crop: "\f125";
$fa-var-crosshairs: "\f05b";
$fa-var-css3: "\f13c";
$fa-var-anchor: "\f13d";
$fa-var-unlock-alt: "\f13e";
$fa-var-bullseye: "\f140";
$fa-var-cube: "\f1b2";
$fa-var-cubes: "\f1b3";
$fa-var-cut: "\f0c4";
$fa-var-cutlery: "\f0f5";
$fa-var-dashboard: "\f0e4";
$fa-var-database: "\f1c0";
$fa-var-dedent: "\f03b";
$fa-var-delicious: "\f1a5";
$fa-var-desktop: "\f108";
$fa-var-deviantart: "\f1bd";
$fa-var-digg: "\f1a6";
$fa-var-dollar: "\f155";
$fa-var-dot-circle-o: "\f192";
$fa-var-download: "\f019";
$fa-var-dribbble: "\f17d";
$fa-var-dropbox: "\f16b";
$fa-var-drupal: "\f1a9";
$fa-var-edit: "\f044";
$fa-var-eject: "\f052";
$fa-var-ellipsis-h: "\f141";
$fa-var-ellipsis-v: "\f142";
$fa-var-rss-square: "\f143";
$fa-var-play-circle: "\f144";
$fa-var-ticket: "\f145";
$fa-var-empire: "\f1d1";
$fa-var-envelope: "\f0e0";
$fa-var-envelope-o: "\f003";
$fa-var-envelope-square: "\f199";
$fa-var-eraser: "\f12d";
$fa-var-eur: "\f153";
$fa-var-euro: "\f153";
$fa-var-exchange: "\f0ec";
$fa-var-exclamation: "\f12a";
$fa-var-exclamation-circle: "\f06a";
$fa-var-exclamation-triangle: "\f071";
$fa-var-expand: "\f065";
$fa-var-external-link: "\f08e";
$fa-var-external-link-square: "\f14c";
$fa-var-eye: "\f06e";
$fa-var-eye-slash: "\f070";
$fa-var-facebook: "\f09a";
$fa-var-facebook-square: "\f082";
$fa-var-fast-backward: "\f049";
$fa-var-fast-forward: "\f050";
$fa-var-fax: "\f1ac";
$fa-var-female: "\f182";
$fa-var-fighter-jet: "\f0fb";
$fa-var-file: "\f15b";
$fa-var-file-archive-o: "\f1c6";
$fa-var-file-audio-o: "\f1c7";
$fa-var-file-code-o: "\f1c9";
$fa-var-file-excel-o: "\f1c3";
$fa-var-file-image-o: "\f1c5";
$fa-var-file-movie-o: "\f1c8";
$fa-var-file-o: "\f016";
$fa-var-file-pdf-o: "\f1c1";
$fa-var-file-photo-o: "\f1c5";
$fa-var-file-picture-o: "\f1c5";
$fa-var-file-powerpoint-o: "\f1c4";
$fa-var-file-sound-o: "\f1c7";
$fa-var-file-text: "\f15c";
$fa-var-file-text-o: "\f0f6";
$fa-var-file-video-o: "\f1c8";
$fa-var-file-word-o: "\f1c2";
$fa-var-file-zip-o: "\f1c6";
$fa-var-files-o: "\f0c5";
$fa-var-film: "\f008";
$fa-var-filter: "\f0b0";
$fa-var-fire: "\f06d";
$fa-var-fire-extinguisher: "\f134";
$fa-var-flag: "\f024";
$fa-var-flag-checkered: "\f11e";
$fa-var-flag-o: "\f11d";
$fa-var-flash: "\f0e7";
$fa-var-flask: "\f0c3";
$fa-var-flickr: "\f16e";
$fa-var-floppy-o: "\f0c7";
$fa-var-folder: "\f07b";
$fa-var-folder-o: "\f114";
$fa-var-folder-open: "\f07c";
$fa-var-folder-open-o: "\f115";
$fa-var-font: "\f031";
$fa-var-forward: "\f04e";
$fa-var-foursquare: "\f180";
$fa-var-frown-o: "\f119";
$fa-var-gamepad: "\f11b";
$fa-var-gavel: "\f0e3";
$fa-var-gbp: "\f154";
$fa-var-ge: "\f1d1";
$fa-var-gear: "\f013";
$fa-var-gears: "\f085";
$fa-var-gift: "\f06b";
$fa-var-git: "\f1d3";
$fa-var-git-square: "\f1d2";
$fa-var-github: "\f09b";
$fa-var-github-alt: "\f113";
$fa-var-github-square: "\f092";
$fa-var-gittip: "\f184";
$fa-var-glass: "\f000";
$fa-var-globe: "\f0ac";
$fa-var-google: "\f1a0";
$fa-var-google-plus: "\f0d5";
$fa-var-google-plus-square: "\f0d4";
$fa-var-graduation-cap: "\f19d";
$fa-var-group: "\f0c0";
$fa-var-h-square: "\f0fd";
$fa-var-hacker-news: "\f1d4";
$fa-var-hand-o-down: "\f0a7";
$fa-var-hand-o-left: "\f0a5";
$fa-var-hand-o-right: "\f0a4";
$fa-var-hand-o-up: "\f0a6";
$fa-var-hdd-o: "\f0a0";
$fa-var-header: "\f1dc";
$fa-var-headphones: "\f025";
$fa-var-heart: "\f004";
$fa-var-heart-o: "\f08a";
$fa-var-history: "\f1da";
$fa-var-home: "\f015";
$fa-var-hospital-o: "\f0f8";
$fa-var-html5: "\f13b";
$fa-var-image: "\f03e";
$fa-var-inbox: "\f01c";
$fa-var-indent: "\f03c";
$fa-var-info: "\f129";
$fa-var-info-circle: "\f05a";
$fa-var-inr: "\f156";
$fa-var-instagram: "\f16d";
$fa-var-institution: "\f19c";
$fa-var-italic: "\f033";
$fa-var-joomla: "\f1aa";
$fa-var-jpy: "\f157";
$fa-var-jsfiddle: "\f1cc";
$fa-var-key: "\f084";
$fa-var-keyboard-o: "\f11c";
$fa-var-krw: "\f159";
$fa-var-language: "\f1ab";
$fa-var-laptop: "\f109";
$fa-var-leaf: "\f06c";
$fa-var-legal: "\f0e3";
$fa-var-lemon-o: "\f094";
$fa-var-level-down: "\f149";
$fa-var-level-up: "\f148";
$fa-var-life-bouy: "\f1cd";
$fa-var-life-ring: "\f1cd";
$fa-var-life-saver: "\f1cd";
$fa-var-lightbulb-o: "\f0eb";
$fa-var-link: "\f0c1";
$fa-var-linkedin: "\f0e1";
$fa-var-linkedin-square: "\f08c";
$fa-var-linux: "\f17c";
$fa-var-list: "\f03a";
$fa-var-list-alt: "\f022";
$fa-var-list-ol: "\f0cb";
$fa-var-list-ul: "\f0ca";
$fa-var-location-arrow: "\f124";
$fa-var-lock: "\f023";
$fa-var-long-arrow-down: "\f175";
$fa-var-long-arrow-left: "\f177";
$fa-var-long-arrow-right: "\f178";
$fa-var-long-arrow-up: "\f176";
$fa-var-magic: "\f0d0";
$fa-var-magnet: "\f076";
$fa-var-mail-forward: "\f064";
$fa-var-mail-reply: "\f112";
$fa-var-mail-reply-all: "\f122";
$fa-var-male: "\f183";
$fa-var-map-marker: "\f041";
$fa-var-maxcdn: "\f136";
$fa-var-medkit: "\f0fa";
$fa-var-meh-o: "\f11a";
$fa-var-microphone: "\f130";
$fa-var-microphone-slash: "\f131";
$fa-var-minus: "\f068";
$fa-var-minus-circle: "\f056";
$fa-var-minus-square: "\f146";
$fa-var-minus-square-o: "\f147";
$fa-var-level-up: "\f148";
$fa-var-level-down: "\f149";
$fa-var-check-square: "\f14a";
$fa-var-mobile: "\f10b";
$fa-var-mobile-phone: "\f10b";
$fa-var-money: "\f0d6";
$fa-var-moon-o: "\f186";
$fa-var-mortar-board: "\f19d";
$fa-var-music: "\f001";
$fa-var-navicon: "\f0c9";
$fa-var-openid: "\f19b";
$fa-var-outdent: "\f03b";
$fa-var-pagelines: "\f18c";
$fa-var-paper-plane: "\f1d8";
$fa-var-paper-plane-o: "\f1d9";
$fa-var-paperclip: "\f0c6";
$fa-var-paragraph: "\f1dd";
$fa-var-paste: "\f0ea";
$fa-var-pause: "\f04c";
$fa-var-paw: "\f1b0";
$fa-var-pencil: "\f040";
$fa-var-pencil-square: "\f14b";
$fa-var-external-link-square: "\f14c";
$fa-var-share-square: "\f14d";
$fa-var-compass: "\f14e";
$fa-var-caret-square-o-down: "\f150";
$fa-var-caret-square-o-up: "\f151";
$fa-var-caret-square-o-right: "\f152";
$fa-var-eur: "\f153";
$fa-var-gbp: "\f154";
$fa-var-usd: "\f155";
$fa-var-inr: "\f156";
$fa-var-jpy: "\f157";
$fa-var-pencil-square-o: "\f044";
$fa-var-phone: "\f095";
$fa-var-phone-square: "\f098";
$fa-var-photo: "\f03e";
$fa-var-picture-o: "\f03e";
$fa-var-pied-piper: "\f1a7";
$fa-var-pied-piper-alt: "\f1a8";
$fa-var-pied-piper-square: "\f1a7";
$fa-var-pinterest: "\f0d2";
$fa-var-pinterest-square: "\f0d3";
$fa-var-plane: "\f072";
$fa-var-play: "\f04b";
$fa-var-play-circle: "\f144";
$fa-var-play-circle-o: "\f01d";
$fa-var-plus: "\f067";
$fa-var-plus-circle: "\f055";
$fa-var-plus-square: "\f0fe";
$fa-var-plus-square-o: "\f196";
$fa-var-power-off: "\f011";
$fa-var-print: "\f02f";
$fa-var-puzzle-piece: "\f12e";
$fa-var-qq: "\f1d6";
$fa-var-qrcode: "\f029";
$fa-var-question: "\f128";
$fa-var-question-circle: "\f059";
$fa-var-quote-left: "\f10d";
$fa-var-quote-right: "\f10e";
$fa-var-ra: "\f1d0";
$fa-var-random: "\f074";
$fa-var-rebel: "\f1d0";
$fa-var-recycle: "\f1b8";
$fa-var-reddit: "\f1a1";
$fa-var-reddit-square: "\f1a2";
$fa-var-refresh: "\f021";
$fa-var-renren: "\f18b";
$fa-var-reorder: "\f0c9";
$fa-var-repeat: "\f01e";
$fa-var-reply: "\f112";
$fa-var-reply-all: "\f122";
$fa-var-retweet: "\f079";
$fa-var-rmb: "\f157";
$fa-var-road: "\f018";
$fa-var-rocket: "\f135";
$fa-var-rotate-left: "\f0e2";
$fa-var-rotate-right: "\f01e";
$fa-var-rouble: "\f158";
$fa-var-rss: "\f09e";
$fa-var-rss-square: "\f143";
$fa-var-rub: "\f158";
$fa-var-krw: "\f159";
$fa-var-btc: "\f15a";
$fa-var-file: "\f15b";
$fa-var-file-text: "\f15c";
$fa-var-ruble: "\f158";
$fa-var-rupee: "\f156";
$fa-var-save: "\f0c7";
$fa-var-scissors: "\f0c4";
$fa-var-search: "\f002";
$fa-var-search-minus: "\f010";
$fa-var-search-plus: "\f00e";
$fa-var-send: "\f1d8";
$fa-var-send-o: "\f1d9";
$fa-var-share: "\f064";
$fa-var-share-alt: "\f1e0";
$fa-var-share-alt-square: "\f1e1";
$fa-var-share-square: "\f14d";
$fa-var-share-square-o: "\f045";
$fa-var-shield: "\f132";
$fa-var-shopping-cart: "\f07a";
$fa-var-sign-in: "\f090";
$fa-var-sign-out: "\f08b";
$fa-var-signal: "\f012";
$fa-var-sitemap: "\f0e8";
$fa-var-skype: "\f17e";
$fa-var-slack: "\f198";
$fa-var-sliders: "\f1de";
$fa-var-smile-o: "\f118";
$fa-var-sort: "\f0dc";
$fa-var-sort-alpha-asc: "\f15d";
$fa-var-sort-alpha-desc: "\f15e";
$fa-var-sort-amount-asc: "\f160";
$fa-var-sort-amount-desc: "\f161";
$fa-var-sort-asc: "\f0de";
$fa-var-sort-desc: "\f0dd";
$fa-var-sort-down: "\f0dd";
$fa-var-sort-numeric-asc: "\f162";
$fa-var-sort-numeric-desc: "\f163";
$fa-var-thumbs-up: "\f164";
$fa-var-thumbs-down: "\f165";
$fa-var-youtube-square: "\f166";
$fa-var-youtube: "\f167";
$fa-var-xing: "\f168";
$fa-var-xing-square: "\f169";
$fa-var-youtube-play: "\f16a";
$fa-var-dropbox: "\f16b";
$fa-var-sort-up: "\f0de";
$fa-var-soundcloud: "\f1be";
$fa-var-space-shuttle: "\f197";
$fa-var-spinner: "\f110";
$fa-var-spoon: "\f1b1";
$fa-var-spotify: "\f1bc";
$fa-var-square: "\f0c8";
$fa-var-square-o: "\f096";
$fa-var-stack-exchange: "\f18d";
$fa-var-stack-overflow: "\f16c";
$fa-var-instagram: "\f16d";
$fa-var-flickr: "\f16e";
$fa-var-adn: "\f170";
$fa-var-bitbucket: "\f171";
$fa-var-bitbucket-square: "\f172";
$fa-var-star: "\f005";
$fa-var-star-half: "\f089";
$fa-var-star-half-empty: "\f123";
$fa-var-star-half-full: "\f123";
$fa-var-star-half-o: "\f123";
$fa-var-star-o: "\f006";
$fa-var-steam: "\f1b6";
$fa-var-steam-square: "\f1b7";
$fa-var-step-backward: "\f048";
$fa-var-step-forward: "\f051";
$fa-var-stethoscope: "\f0f1";
$fa-var-stop: "\f04d";
$fa-var-strikethrough: "\f0cc";
$fa-var-stumbleupon: "\f1a4";
$fa-var-stumbleupon-circle: "\f1a3";
$fa-var-subscript: "\f12c";
$fa-var-suitcase: "\f0f2";
$fa-var-sun-o: "\f185";
$fa-var-superscript: "\f12b";
$fa-var-support: "\f1cd";
$fa-var-table: "\f0ce";
$fa-var-tablet: "\f10a";
$fa-var-tachometer: "\f0e4";
$fa-var-tag: "\f02b";
$fa-var-tags: "\f02c";
$fa-var-tasks: "\f0ae";
$fa-var-taxi: "\f1ba";
$fa-var-tencent-weibo: "\f1d5";
$fa-var-terminal: "\f120";
$fa-var-text-height: "\f034";
$fa-var-text-width: "\f035";
$fa-var-th: "\f00a";
$fa-var-th-large: "\f009";
$fa-var-th-list: "\f00b";
$fa-var-thumb-tack: "\f08d";
$fa-var-thumbs-down: "\f165";
$fa-var-thumbs-o-down: "\f088";
$fa-var-thumbs-o-up: "\f087";
$fa-var-thumbs-up: "\f164";
$fa-var-ticket: "\f145";
$fa-var-times: "\f00d";
$fa-var-times-circle: "\f057";
$fa-var-times-circle-o: "\f05c";
$fa-var-tint: "\f043";
$fa-var-toggle-down: "\f150";
$fa-var-toggle-left: "\f191";
$fa-var-toggle-right: "\f152";
$fa-var-toggle-up: "\f151";
$fa-var-trash-o: "\f014";
$fa-var-tree: "\f1bb";
$fa-var-trello: "\f181";
$fa-var-trophy: "\f091";
$fa-var-truck: "\f0d1";
$fa-var-try: "\f195";
$fa-var-tumblr: "\f173";
$fa-var-tumblr-square: "\f174";
$fa-var-long-arrow-down: "\f175";
$fa-var-long-arrow-up: "\f176";
$fa-var-long-arrow-left: "\f177";
$fa-var-long-arrow-right: "\f178";
$fa-var-apple: "\f179";
$fa-var-windows: "\f17a";
$fa-var-android: "\f17b";
$fa-var-linux: "\f17c";
$fa-var-dribbble: "\f17d";
$fa-var-skype: "\f17e";
$fa-var-foursquare: "\f180";
$fa-var-trello: "\f181";
$fa-var-female: "\f182";
$fa-var-male: "\f183";
$fa-var-gittip: "\f184";
$fa-var-sun-o: "\f185";
$fa-var-moon-o: "\f186";
$fa-var-archive: "\f187";
$fa-var-bug: "\f188";
$fa-var-vk: "\f189";
$fa-var-weibo: "\f18a";
$fa-var-renren: "\f18b";
$fa-var-pagelines: "\f18c";
$fa-var-stack-exchange: "\f18d";
$fa-var-arrow-circle-o-right: "\f18e";
$fa-var-arrow-circle-o-left: "\f190";
$fa-var-caret-square-o-left: "\f191";
$fa-var-dot-circle-o: "\f192";
$fa-var-wheelchair: "\f193";
$fa-var-turkish-lira: "\f195";
$fa-var-twitter: "\f099";
$fa-var-twitter-square: "\f081";
$fa-var-umbrella: "\f0e9";
$fa-var-underline: "\f0cd";
$fa-var-undo: "\f0e2";
$fa-var-university: "\f19c";
$fa-var-unlink: "\f127";
$fa-var-unlock: "\f09c";
$fa-var-unlock-alt: "\f13e";
$fa-var-unsorted: "\f0dc";
$fa-var-upload: "\f093";
$fa-var-usd: "\f155";
$fa-var-user: "\f007";
$fa-var-user-md: "\f0f0";
$fa-var-users: "\f0c0";
$fa-var-video-camera: "\f03d";
$fa-var-vimeo-square: "\f194";
$fa-var-try: "\f195";
$fa-var-plus-square-o: "\f196";
$fa-var-vine: "\f1ca";
$fa-var-vk: "\f189";
$fa-var-volume-down: "\f027";
$fa-var-volume-off: "\f026";
$fa-var-volume-up: "\f028";
$fa-var-warning: "\f071";
$fa-var-wechat: "\f1d7";
$fa-var-weibo: "\f18a";
$fa-var-weixin: "\f1d7";
$fa-var-wheelchair: "\f193";
$fa-var-windows: "\f17a";
$fa-var-won: "\f159";
$fa-var-wordpress: "\f19a";
$fa-var-wrench: "\f0ad";
$fa-var-xing: "\f168";
$fa-var-xing-square: "\f169";
$fa-var-yahoo: "\f19e";
$fa-var-yen: "\f157";
$fa-var-youtube: "\f167";
$fa-var-youtube-play: "\f16a";
$fa-var-youtube-square: "\f166";

View File

@ -1,5 +1,5 @@
/*!
* Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
* Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/

View File

@ -0,0 +1,448 @@
@import "bootstrap";
@import "fontawesome/font-awesome";
@import "./redactor";
.download_content a{
display:block;
padding:5px 10px;
border: 1px solid rgba(84,132,187,1);
border-radius:3px;
margin:1em 0;
&:hover{
background:rgba(84,132,187,.1);
text-decoration:none;
}
}
img{
max-width:100%;
}
.row{
//margin-left:0px;
//margin-right:0px;
}
.form-signin {
max-width: 900px;
padding: 30px;
margin: 0 auto 20px;
background:rgba(255,255,255,.7);
border-radius :5px;
box-shadow: 0 1px 2px rgba(0,0,0,.05);
opacity:0;
color:rgba(0,0,0,.5);
label{
color:rgba(0,0,0,.5);
}
p:last-child{
margin-bottom:0px;
}
}
.white_block{
background:rgba(250,250,250,0.9);
border-radius:4px;
}
.pad{
padding:10px;
}
.student_users{
tr th{
background:transparent !important;
}
}
#topic_app_index{
#left{
li{
a{
background:rgba(250,250,250,0.9);
}
&.active{
a{
background:rgba(66,139,202,0.9);
}
}
}
}
#topic_show{
.note_files{
padding:10px;
background:rgba(84,132,187,.4);
}
.note_file{
margin:8px 0px;
img{
height:40px;
}
}
.note{
border-radius:4px;
margin-bottom:1em;
background:rgba(250,250,250,0.9);
.note_content{
padding:10px;
}
}
}
}
#menu_top{
background:rgba(84,132,187,0.5);
border-radius:0;
border:0;
color:rgba(255,255,255,.9);
a{
color:rgba(255,255,255,.9);
}
.dropdown ul{
a{
color:rgba(0,0,0,.9);
}
}
}
#main{
min-height:600px;
}
.footer{
//background:rgba(221,221,221,1);
padding:2em;
}
.transparent{
td, th{
background-color:transparent !important;}
}
#main{
padding:0 1em;
}
.icon{
border:1px solid #0088cc;
display:inline-block;
padding:6px;
border-radius:50%;
text-align:center;
background:white;
&:hover{
background:#0088cc;
color:white;
text-decoration:none;
}
}
.container-fluid{
max-width:1100px;
margin:auto;
}
h1{
margin-top:10px;
font-family:Stylograph;
}
.student_users{
td{
vertical-align:middle !important;
}
}
.message{
min-height:150px;
border:1px solid black;
margin:1em 1em 0 1em;
}
.right{float:right;}
.forum_message{
border-radius: 0 2em 0 2em ;
border:1px solid rgba(244,243,239,1);
position:relative;
margin-bottom:1em;
min-height:120px;
.left{
border-radius :0px 0px 0px 2em ;
position:absolute;
top:0px;
left:0px;
bottom:0px;
width:150px;
background:rgba(244,243,239,1);
text-align:center;
padding:10px;
*{
text-align:center;
}
.avatar{
width:90px;
border-radius:60%;
margin:auto;
margin-bottom:1em;
}
}
.right{
min-height:150px;
margin-left:170px;
padding:10px 2%;
line-height:1.1em;
float:none;
position:relative;
img{
max-width:100%;
max-height:90%;
display:block;
margin:1em auto;
}
.large{
max-width:100%;
margin-left:0px;
}
.links{
position:absolute;
top:-1.2em;
right:1em;
}
}
}
.user_images{
width:430px;
box-shadow:0 0 5px rgba(0,0,0,0.5);
position:fixed;
bottom:2em;
right:-450px;
top:100px;
background:white;
padding:0;
padding-left:20px;
h3, a{
color:black;
}
.toggle-button{
font-size:25px;
color:white;
background:rgba(24,24,24,0.9);
width:25px;
height:25px;
text-align:center;
padding:10px;
position:absolute;
top:0px;
left:-45px;
.c{
display:none;
}
}
&:hover{
right:0px;
.o{
display:none;
}
.c{
display:block;
}
}
.progress{
float:right;
width:250px;
.bar{
text-align:right;
}
}
input[type=file]{
display:none;
}
.images{
height:400px;
overflow:auto;
.user_image_block{
padding:5px;
float:left;
width:120px;
min-height:140px;
text-align:center;
margin:5px;
.user_image{
cursor:pointer;
display:block;
margin:auto;
max-width:120px;
max-height:120px;
}
}
}
}
.redactor_box{
border:0px !important;
background:transparent !important;
}
.message_form{
.form{
width:60%;
float:left;
.ace_editor{
height:400px;
width:57%;
border:solid 1px #C9C9C9;
.ace_scroller{
background:transparent !important;
}
}
}
}
#toolbar-text{
background: linear-gradient(to bottom, #f1f1f1 0%, #e2e2e2 100%);
z-index:10;
position:fixed;
top:40px;
left:0px;
right:0px;
.redactor_toolbar{
border:0px;
margin:5px 0 !important;
background:transparent !important;
}
}
.fix-submit{
z-index:10;
position:fixed;
top:40px;
margin-top:5px;
right:1em;
}
#flashs{
position:fixed;
bottom:0px;
right:1em;
min-width:600px;
width:50%;
}

View File

@ -0,0 +1,38 @@
# -*- encoding : utf-8 -*-
class Admin::NoteFilesController < ApplicationController
before_filter :auth_admin
layout "admin"
def show
@note_file = NoteFile.find(params[:id])
if params[:inline] and !params[:force]
else
send_file @note_file.file.path, :filename => @note_file.abstract_file_name_slug, :disposition => (params[:download] ? "attachment" : "inline")
end
end
def create
@note_file = NoteFile.new(:original_filename => params[:files][0].original_filename ,:name => params[:files][0].original_filename, :note_id => params[:note_id], :file =>params[:files][0])
if @note_file.save
else
end
end
def destroy
@note_file = NoteFile.find(params[:id])
@note_file.destroy
end
end

View File

@ -0,0 +1,55 @@
# -*- encoding : utf-8 -*-
class Admin::NotesController < ApplicationController
before_filter :auth_admin
layout "admin"
def show
@note = Note.find(params[:id])
end
def new
@note = Note.new(:topic_id => params[:topic_id])
end
def edit
@note = Note.find(params[:id])
end
def create
@note = Note.new(params.require(:note).permit!)
@note.admin = current_admin
if @note.save
else
render :action => :new
end
end
def update
@note = Note.find(params[:id])
if @note.update_attributes(params.require(:note).permit!)
else
render :action => :edit
end
end
def destroy
@note = Note.find(params[:id])
@note.destroy
end
end

View File

@ -0,0 +1,66 @@
class Admin::StudentGroupsController < ApplicationController
layout "admin"
before_filter :auth_admin
def index
@student_groups = StudentGroup.all
end
def show
@student_group = StudentGroup.find(params[:id])
end
def new
@student_group = StudentGroup.new
end
def edit
@student_group = StudentGroup.find(params[:id])
end
def create
@student_group = StudentGroup.new(student_group_params)
if @student_group.save
redirect_to admin_student_groups_path
else
render :action => "new"
end
end
def update
@student_group = StudentGroup.find(params[:id])
if @student_group.update_attributes(student_group_params)
redirect_to admin_student_groups_path
else
render :action => "edit"
end
end
def destroy
@student_group = StudentGroup.find(params[:id])
@student_group.destroy if @student_group != @current_student_group
end
private
def student_group_params
params.require(:student_group).permit!
end
end

View File

@ -0,0 +1,66 @@
class Admin::StudentUsersController < ApplicationController
layout "admin"
before_filter :auth_admin
def index
@student_users = StudentUser.all
end
def show
@student_user = StudentUser.find(params[:id])
end
def new
@student_user = StudentUser.new
end
def edit
@student_user = StudentUser.find(params[:id])
end
def create
@student_user = StudentUser.new(student_user_params)
if @student_user.save
redirect_to admin_student_users_path
else
render :action => "new"
end
end
def update
@student_user = StudentUser.find(params[:id])
if @student_user.update_attributes(student_user_params)
redirect_to admin_student_users_path
else
render :action => "edit"
end
end
def destroy
@student_user = StudentUser.find(params[:id])
@student_user.destroy if @student_user != @current_student_user
end
private
def student_user_params
params.require(:student_user).permit!
end
end

View File

@ -0,0 +1,59 @@
# -*- encoding : utf-8 -*-
class Admin::TopicsController < ApplicationController
before_filter :auth_admin
layout "admin"
def index
@topics = Topic.all
end
def show
@topic = Topic.find(params[:id])
end
def new
@topic = Topic.new
end
def edit
@topic = Topic.find(params[:id])
end
def create
@topic = Topic.new(params.require(:topic).permit!)
@topic.admin = current_admin
if @topic.save
@topics = Topic.all
else
@topic_create = true
render :action => :new
end
end
def update
@topic = Topic.find(params[:id])
if @topic.update_attributes(params.require(:topic).permit!)
@topics = Topic.all
else
render :action => :edit
end
end
def destroy
@topic = Topic.find(params[:id])
@topic.destroy
end
end

View File

@ -12,8 +12,37 @@ class ApplicationController < ActionController::Base
end
def auth_suser
if !current_suser
redirect_to new_student_auth_path
end
end
private
def current_suser
@current_suser ||= StudentUser.find_by_auth_token!(cookies[:student_auth_token]) if cookies[:student_auth_token]
if @current_suser.lock?
@current_suser = false
end
return @current_suser
#if session[:student_user_id] and StudentUser.exists?(session[:student_user_id])
# @current_suser = StudentUser.find(session[:student_user_id])
#else
# nil
#end
end
helper_method :current_suser, :auth_suser
def current_admin
if cookies[:admin_remember_token]

View File

@ -102,7 +102,7 @@ class Portlet::BlockContentsController < ApplicationController
end
respond_to do |format|
format.html {}
format.html {render :inline => "test"}
format.js { render :template => "portlet/shared/destroy" }
end
end

View File

@ -39,7 +39,7 @@ class Public::MenuItemsController < ApplicationController
end
else
redirect_to "/", :notice => "La page que vous demandez n'a pas pu être trouvée.<br /><br />Vous avez donc été redirigé sur notre page d'accueil"
@menu_item = MenuItem.find_by_slug("404")
end
end

View File

@ -0,0 +1,40 @@
# -*- encoding : utf-8 -*-
class Student::AuthsController < ApplicationController
layout "connexion"
def new
@student = true
end
def create
@student = true
user = StudentUser.find_by_email(params[:email])
if user && user.authenticate(params[:password]) && !user.lock
#session[:student_user_id] = user.id
if params[:remember_me]
cookies.permanent[:student_auth_token] = user.auth_token
else
cookies[:student_auth_token] = user.auth_token
end
redirect_to student_root_path, notice: "Connecté !"
elsif user && user.authenticate(params[:password])
flash.now[:error] = "Votre compte n'est pas encore activé."
render "new"
else
flash.now[:error] = "Email ou mot de passe incorect"
render "new"
end
end
def logout
cookies.delete(:student_auth_token)
redirect_to student_root_path, notice: "Déconnecté."
end
end

View File

@ -0,0 +1,52 @@
# -*- encoding : utf-8 -*-
class Student::PasswordResetsController < ApplicationController
layout "connexion"
def new
@student = true
end
def create
@student = true
student_user = StudentUser.find_by_email(params[:email])
if student_user
student_user.reset_password_token = SecureRandom.urlsafe_base64(nil, false)
student_user.reset_password_sent_at = Time.now
student_user.save
StudentMails.reset_password(student_user).deliver
redirect_to student_student_topics_path, notice: "Un message vient de vous être envoyé avec un lien pour réinitialiser votre mot de passe."
else
flash.now.alert = "Email incorect"
render "new"
end
end
def edit
@student = true
@student_user = StudentUser.find_by_reset_password_token(params[:id])
if @student_user and @student_user.reset_password_sent_at > Time.now - 1.day
else
end
end
def update
@student = true
@student_user = StudentUser.find_by_reset_password_token(params[:id])
if @student_user.update_attributes(params.require(:student_user).permit(:password, :password_confirmation))
redirect_to student_student_topics_path, :notice => "Votre mot de passe a bien été changé, vous pouvez vous connecter dès maintenant."
else
render :action => "edit"
end
end
end

View File

@ -0,0 +1,72 @@
class Student::StudentUsersController < ApplicationController
layout "student"
before_filter :auth_suser, :except => [:new, :create]
def index
@users = StudentUser.all
end
def show
@user = StudentUser.find(params[:id])
end
def new
@user = StudentUser.new()
end
def edit
@user = StudentUser.find(params[:id])
end
def create
@user = StudentUser.new(params.require(:student_user).permit!)
@user.lock = true
@user.locked_at = Time.now
if @user.save
@user.authenticate(params[:password])
session[:student_user_id] = @user.id
redirect_to student_student_topics_path, notice: "Vous êtes désormais inscrit."
else
render :action => "new"
end
end
def update
@user = StudentUser.find(params[:id])
if @user == current_suser or moderator?
if @user.update_attributes(params.require(:student_user).permit!)
redirect_to student_student_user_path(@user)
else
render :action => "edit"
end
end
end
def destroy
if moderator?
@user = StudentUser.find(params[:id])
@user.destroy
redirect_to student_student_users_path
end
end
end

View File

@ -0,0 +1,21 @@
# -*- encoding : utf-8 -*-
class Student::TopicsController < ApplicationController
before_filter :auth_admin
layout "student"
def index
@topics = current_suser.topics.order("updated_at DESC").uniq
@topic = @topics[0]
end
def show
@topic = Topic.find(params[:id])
render :layout => false
end
end

View File

@ -0,0 +1,16 @@
class StudentMails < ActionMailer::Base
layout 'mail'
default from: "Geneviève Gagos <contact@ecole-eft-france.fr>"
def reset_password(student_user, options = {})
@student_user = student_user
@options = options
mail(:to => student_user.email, :subject => "Réinitialisation de votre mot de passe.")
end
end

View File

@ -13,7 +13,7 @@ class Block < ActiveRecord::Base
DynamicContent: "Contenu dynamique",
TableContent: "Tableau",
BlockContent: "Bloc",
MapContent: "Plan",
MapContent: "Plan"
}
@ -36,10 +36,10 @@ class Block < ActiveRecord::Base
end
end
def alloweds_types
def alloweds_types
allow_types :all #:TitleContent, :ImageContent
end
end
def dup
@block = Block.new(self.attributes)

View File

@ -1,7 +1,7 @@
# -*- encoding : utf-8 -*-
class BlockContent < ActiveRecord::Base
has_one :portlet, :as => :content, :dependent => :destroy
has_many :blocks, :as => :blockable, :dependent => :destroy
has_many :blocks, :as => :blockable #, :dependent => :destroy
validates :nbr_columns, :presence => true

7
app/models/note.rb Normal file
View File

@ -0,0 +1,7 @@
# -*- encoding : utf-8 -*-
class Note < ActiveRecord::Base
belongs_to :admin
belongs_to :topic
has_many :note_files
#attr_accessible :message, :subject, :topic, :topic_id
end

36
app/models/note_file.rb Normal file
View File

@ -0,0 +1,36 @@
# -*- encoding : utf-8 -*-
class NoteFile < ActiveRecord::Base
attr_accessor :original_filename
#attr_accessible :description, :file, :name, :slug, :note, :note_id, :file_cache, :original_filename
belongs_to :note
mount_uploader :file, FileUploader
before_save do
if !self.name?
self.name = File.basename(self.file.filename, File.extname(self.file.filename)).to_s if self.file?
end
end
def file_type
mime = `file --mime -br "#{self.file.path}"`.strip.split(';')[0]
mime
end
def abstract_file_name
self.name+File.extname(self.attributes['file'])
end
def abstract_file_name_slug
self.name.to_slug+File.extname(self.attributes['file'])
end
end

View File

@ -0,0 +1,8 @@
class StudentGroup < ActiveRecord::Base
has_many :student_user_groups
has_many :student_user, :through => :student_user_groups
has_many :topic_student_groups
has_many :topics, :through => :topic_student_groups
end

View File

@ -0,0 +1,40 @@
class StudentUser < ActiveRecord::Base
#attr_accessible :bio, :email, :firstname, :name, :password, :password_confirmation, :avatar, :moderator
has_secure_password
validates_presence_of :password, :on => :create
validates :email, :presence => true, :uniqueness => true, :format => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :name, :presence => true
validates :firstname, :presence => true
mount_uploader :avatar, AvatarUploader
has_many :messages, :class_name => "StudentMessage"
has_many :topics, :class_name => "StudentTopic"
has_many :images, :class_name => "StudentUserImage", :order => "created_at DESC"
has_many :student_user_groups
has_many :student_group, :through => :student_user_groups
has_many :topics, :through => :student_group
belongs_to :sheet
before_create { generate_token(:auth_token) }
before_validation do
if self.lock_changed? and self.lock
self.locked_at = Time.now
end
end
def generate_token(column)
begin
self[column] = SecureRandom.urlsafe_base64
end while StudentUser.exists?(column => self[column])
end
end

View File

@ -0,0 +1,4 @@
class StudentUserGroup < ActiveRecord::Base
belongs_to :student_user
belongs_to :student_group
end

Some files were not shown because too many files have changed in this diff Show More