spud_core 0.7.5 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/javascripts/spud/admin/application.js +8 -11
- data/app/assets/libs/bootstrap/css/bootstrap-responsive.css +686 -0
- data/app/assets/libs/bootstrap/css/bootstrap-responsive.min.css +12 -0
- data/app/assets/libs/bootstrap/css/bootstrap.css +3990 -0
- data/app/assets/libs/bootstrap/css/bootstrap.min.css +689 -0
- data/app/assets/libs/bootstrap/img/glyphicons-halflings-white.png +0 -0
- data/app/assets/libs/bootstrap/img/glyphicons-halflings.png +0 -0
- data/app/assets/libs/bootstrap/js/bootstrap.js +1726 -0
- data/app/assets/libs/bootstrap/js/bootstrap.min.js +6 -0
- data/app/assets/stylesheets/spud/admin/application.css +14 -120
- data/app/controllers/spud/application_controller.rb +9 -1
- data/app/controllers/spud/users_controller.rb +1 -1
- data/app/helpers/spud/admin/application_helper.rb +2 -2
- data/app/models/spud_user.rb +1 -1
- data/app/views/spud/admin/users/_edit.html.erb +4 -6
- data/app/views/spud/admin/users/_form.html.erb +68 -31
- data/app/views/spud/admin/users/_new.html.erb +5 -6
- data/app/views/spud/admin/users/index.html.erb +1 -1
- data/app/views/spud/setup/index.html.erb +36 -18
- data/app/views/spud/users/_form.html.erb +48 -24
- data/app/views/spud/users/settings.html.erb +4 -6
- data/db/migrate/20120327124229_add_time_zone_to_spud_user.rb +6 -0
- data/lib/spud_core/engine.rb +14 -13
- data/lib/spud_core/version.rb +1 -1
- data/lib/spud_core.rb +3 -4
- data/test/dummy/log/test.log +974 -0
- metadata +47 -135
- data/app/assets/javascripts/spud/admin/settings.js +0 -2
- data/app/assets/javascripts/spud/admin/users.js +0 -2
- data/app/assets/javascripts/spud/setup.js +0 -2
- data/app/assets/javascripts/spud/sitemaps.js +0 -2
- data/app/assets/javascripts/spud/user_sessions.js +0 -2
- data/app/assets/javascripts/spud/users.js +0 -2
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-article.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-aside.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-command.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-details.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-figcaption.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-figure.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-footer.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-header.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-hgroup.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-mark.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-meter.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-nav.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-p.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-progress.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-rp.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-rt.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-ruby.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-section.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-summary.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/lbl-time.png +0 -0
- data/app/assets/javascripts/wymeditor/iframe/default/readme.md +0 -1
- data/app/assets/javascripts/wymeditor/iframe/default/wymiframe.css +0 -91
- data/app/assets/javascripts/wymeditor/iframe/default/wymiframe.html +0 -26
- data/app/assets/javascripts/wymeditor/jquery.wymeditor.js +0 -9983
- data/app/assets/javascripts/wymeditor/jquery.wymeditor.min.js +0 -34
- data/app/assets/javascripts/wymeditor/lang/bg.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/ca.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/cs.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/cy.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/de.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/en.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/es.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/fa.js +0 -46
- data/app/assets/javascripts/wymeditor/lang/fi.js +0 -44
- data/app/assets/javascripts/wymeditor/lang/fr.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/gl.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/he.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/hr.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/hu.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/it.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/ja.js +0 -44
- data/app/assets/javascripts/wymeditor/lang/lt.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/nb.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/nl.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/nn.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/pl.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/pt-br.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/pt.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/ru.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/sv.js +0 -46
- data/app/assets/javascripts/wymeditor/lang/tr.js +0 -45
- data/app/assets/javascripts/wymeditor/lang/zh_cn.js +0 -47
- data/app/assets/javascripts/wymeditor/plugins/embed/jquery.wymeditor.embed.js +0 -82
- data/app/assets/javascripts/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
- data/app/assets/javascripts/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +0 -124
- data/app/assets/javascripts/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +0 -49
- data/app/assets/javascripts/wymeditor/plugins/list/jquery.wymeditor.list.js +0 -60
- data/app/assets/javascripts/wymeditor/plugins/rdfa/jquery.wymeditor.rdfa.js +0 -186
- data/app/assets/javascripts/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +0 -77
- data/app/assets/javascripts/wymeditor/plugins/resizable/readme.txt +0 -124
- data/app/assets/javascripts/wymeditor/plugins/table/jquery.wymeditor.table.js +0 -721
- data/app/assets/javascripts/wymeditor/plugins/table/table_delete_column.png +0 -0
- data/app/assets/javascripts/wymeditor/plugins/table/table_delete_row.png +0 -0
- data/app/assets/javascripts/wymeditor/plugins/table/table_insert_column.png +0 -0
- data/app/assets/javascripts/wymeditor/plugins/table/table_insert_row.png +0 -0
- data/app/assets/javascripts/wymeditor/plugins/table/table_join_row.png +0 -0
- data/app/assets/javascripts/wymeditor/plugins/tidy/README +0 -19
- data/app/assets/javascripts/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +0 -78
- data/app/assets/javascripts/wymeditor/plugins/tidy/tidy.php +0 -58
- data/app/assets/javascripts/wymeditor/plugins/tidy/wand.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/compact/icons.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/compact/skin.css +0 -134
- data/app/assets/javascripts/wymeditor/skins/compact/skin.js +0 -37
- data/app/assets/javascripts/wymeditor/skins/default/icons.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/default/skin.css +0 -133
- data/app/assets/javascripts/wymeditor/skins/default/skin.js +0 -40
- data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.header.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/minimal/skin.css +0 -131
- data/app/assets/javascripts/wymeditor/skins/minimal/skin.js +0 -30
- data/app/assets/javascripts/wymeditor/skins/silver/COPYING +0 -674
- data/app/assets/javascripts/wymeditor/skins/silver/README +0 -27
- data/app/assets/javascripts/wymeditor/skins/silver/images/bg.header.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/silver/images/icons.silver.gif +0 -0
- data/app/assets/javascripts/wymeditor/skins/silver/skin.css +0 -297
- data/app/assets/javascripts/wymeditor/skins/silver/skin.js +0 -61
- data/app/assets/javascripts/wymeditor/skins/twopanels/icons.png +0 -0
- data/app/assets/javascripts/wymeditor/skins/twopanels/skin.css +0 -134
- data/app/assets/javascripts/wymeditor/skins/twopanels/skin.js +0 -39
- data/app/assets/javascripts/wymeditor/skins/wymeditor_icon.png +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bootstrap.js by @fat & @mdo
|
|
3
|
+
* Copyright 2012 Twitter, Inc.
|
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
5
|
+
*/
|
|
6
|
+
!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger("close").removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;return!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=(a||"").toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.$element.change(),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},keypress:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},blur:function(a){var b=this;setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/* ...
|
|
2
|
+
*= require bootstrap/css/bootstrap
|
|
2
3
|
*= require_self
|
|
4
|
+
|
|
3
5
|
*= require spud/admin/jquery-ui
|
|
4
|
-
*= require spud/forms
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
font-family: Helvetica, Arial;
|
|
8
|
-
font-size:14px;
|
|
9
|
-
}
|
|
7
|
+
|
|
10
8
|
body {
|
|
11
9
|
background:#eee;
|
|
10
|
+
background-color:#eee;
|
|
12
11
|
margin: 0 0;
|
|
13
12
|
}
|
|
14
|
-
a
|
|
13
|
+
a {
|
|
15
14
|
color:#0073EA;
|
|
16
15
|
text-decoration:none;
|
|
17
16
|
}
|
|
17
|
+
.btn a:visited {
|
|
18
|
+
color:none;
|
|
19
|
+
}
|
|
18
20
|
a:hover {
|
|
19
21
|
text-decoration:underline;
|
|
20
22
|
}
|
|
@@ -162,6 +164,7 @@ div.admin_application:hover {
|
|
|
162
164
|
}
|
|
163
165
|
#details {
|
|
164
166
|
padding:0 10px;
|
|
167
|
+
clear:both;
|
|
165
168
|
overflow: hidden;
|
|
166
169
|
}
|
|
167
170
|
#detail_nav_wrapper {
|
|
@@ -210,107 +213,7 @@ div.admin_application:hover {
|
|
|
210
213
|
top:1px;
|
|
211
214
|
}
|
|
212
215
|
|
|
213
|
-
#dialog,
|
|
214
|
-
form {
|
|
215
|
-
margin:0 auto;
|
|
216
|
-
/*width:400px;*/
|
|
217
|
-
}
|
|
218
|
-
fieldset {
|
|
219
|
-
|
|
220
|
-
padding: 0;
|
|
221
|
-
|
|
222
|
-
clear:both;
|
|
223
|
-
width: 100%;
|
|
224
|
-
margin: 0 auto 1.5em auto;
|
|
225
|
-
border: 1px solid #BFBAB0;
|
|
226
|
-
background-color: #F2EFE9;
|
|
227
|
-
background: #F2EFE9 -webkit-gradient(linear, left top, left 60%, from(#FFFFFF), to(#E9EFF2)) ;
|
|
228
|
-
background: -moz-linear-gradient(top, #FFFFFF 0%, #E9EFF2 100%);
|
|
229
|
-
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffFFFFFF,endColorstr=#ffE9EFF2);
|
|
230
|
-
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffFFFFFF,endColorstr=#ffE9EFF2)";
|
|
231
|
-
}
|
|
232
|
-
fieldset p
|
|
233
|
-
{
|
|
234
|
-
padding:0 20px;
|
|
235
|
-
}
|
|
236
|
-
legend {
|
|
237
|
-
margin-left:1em;
|
|
238
|
-
color: #444;
|
|
239
|
-
font-weight:bold;
|
|
240
|
-
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
form ol,fieldset ol { padding: 1em 1em 0 1em; list-style-type:none;}
|
|
244
|
-
form ol li, fieldset ol li { padding-bottom: 1em;}
|
|
245
|
-
fieldset.submit {
|
|
246
|
-
border-style:none;
|
|
247
|
-
background-color: transparent;
|
|
248
|
-
background: none;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
label { display:block;}
|
|
252
|
-
|
|
253
|
-
.left_aligned_form label {
|
|
254
|
-
display:inline;
|
|
255
|
-
float:left;
|
|
256
|
-
width: 10em;
|
|
257
|
-
margin-right: 1em;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.left_aligned_form ol li,
|
|
261
|
-
.right_aligned_form ol li
|
|
262
|
-
{
|
|
263
|
-
float:left;
|
|
264
|
-
clear:left;
|
|
265
|
-
width: 100%;
|
|
266
|
-
padding-bottom:1em;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.left_aligned_form fieldset,
|
|
270
|
-
.right_aligned_form fieldset
|
|
271
|
-
{
|
|
272
|
-
/*float:left ;*/
|
|
273
|
-
clear:left;
|
|
274
|
-
width: 100%;
|
|
275
|
-
margin: 0 0 1.5em 0;
|
|
276
|
-
padding: 0;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.left_aligned_form fieldset.submit,
|
|
280
|
-
.right_aligned_form fieldset.submit
|
|
281
|
-
{
|
|
282
|
-
margin:5px 0;
|
|
283
|
-
text-align:right;
|
|
284
|
-
width: auto;
|
|
285
|
-
border: 0 none #fff;
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.right_aligned_form label {
|
|
290
|
-
float:left ;
|
|
291
|
-
display:inline;
|
|
292
|
-
width: 6em;
|
|
293
|
-
margin-right:1em;
|
|
294
|
-
|
|
295
|
-
text-align: right;
|
|
296
|
-
}
|
|
297
216
|
|
|
298
|
-
#form_tip
|
|
299
|
-
{
|
|
300
|
-
position:absolute;
|
|
301
|
-
bottom:40px;
|
|
302
|
-
display:none;
|
|
303
|
-
width:190px;
|
|
304
|
-
/* margin: 10px 10px 10px 0;*/
|
|
305
|
-
padding: 10px;
|
|
306
|
-
background: #FEED77;
|
|
307
|
-
border: 1px solid #FEDF02;
|
|
308
|
-
text-align:justify;
|
|
309
|
-
}
|
|
310
|
-
#form_tip.active
|
|
311
|
-
{
|
|
312
|
-
display:block;
|
|
313
|
-
}
|
|
314
217
|
|
|
315
218
|
div.field_with_errors {
|
|
316
219
|
display:inline;
|
|
@@ -418,19 +321,7 @@ form h2 {
|
|
|
418
321
|
line-height:20px !important;
|
|
419
322
|
height:20px;
|
|
420
323
|
}
|
|
421
|
-
|
|
422
|
-
/*.wym_skin_default .wym_section h2 {
|
|
423
|
-
display:none !important;
|
|
424
|
-
}*/
|
|
425
|
-
.wym_tools h2 {
|
|
426
|
-
display:none !important;
|
|
427
|
-
}
|
|
428
|
-
.wym_status {
|
|
429
|
-
display:none !important;
|
|
430
|
-
}
|
|
431
|
-
.wym_classes {
|
|
432
|
-
display:none !important;
|
|
433
|
-
}
|
|
324
|
+
|
|
434
325
|
/*Flash Styles*/
|
|
435
326
|
div.flash {
|
|
436
327
|
padding:10px;
|
|
@@ -452,7 +343,10 @@ div.flash ul {
|
|
|
452
343
|
color:white !important;
|
|
453
344
|
font-size:12px !important;
|
|
454
345
|
}
|
|
455
|
-
|
|
346
|
+
form input.full-width {
|
|
347
|
+
display: block;
|
|
348
|
+
width: 99%;
|
|
349
|
+
}
|
|
456
350
|
/* Pagination
|
|
457
351
|
--------------- */
|
|
458
352
|
.spud_admin_pagination{
|
|
@@ -2,7 +2,7 @@ class Spud::ApplicationController < ActionController::Base
|
|
|
2
2
|
unloadable
|
|
3
3
|
protect_from_forgery
|
|
4
4
|
helper_method :current_user_session, :current_user
|
|
5
|
-
|
|
5
|
+
around_filter :set_time_zone
|
|
6
6
|
|
|
7
7
|
private
|
|
8
8
|
def current_user_session
|
|
@@ -45,4 +45,12 @@ class Spud::ApplicationController < ActionController::Base
|
|
|
45
45
|
redirect_to(session[:return_to] || default)
|
|
46
46
|
session[:return_to] = nil
|
|
47
47
|
end
|
|
48
|
+
|
|
49
|
+
def set_time_zone
|
|
50
|
+
old_time_zone = Time.zone
|
|
51
|
+
Time.zone = current_user.time_zone if current_user and current_user.time_zone.blank? == false
|
|
52
|
+
yield
|
|
53
|
+
ensure
|
|
54
|
+
Time.zone = old_time_zone
|
|
55
|
+
end
|
|
48
56
|
end
|
|
@@ -13,7 +13,7 @@ class Spud::UsersController < Spud::ApplicationController
|
|
|
13
13
|
add_breadcrumb "Settings", :spud_settings_path
|
|
14
14
|
@page_thumbnail = "spud/admin/users_thumb.png"
|
|
15
15
|
@page_name = "Settings"
|
|
16
|
-
if @current_user.update_attributes(params[:spud_user].slice :login,:first_name,:last_name,:email,:password,:password_confirmation)
|
|
16
|
+
if @current_user.update_attributes(params[:spud_user].slice :login,:first_name,:last_name,:email,:password,:password_confirmation,:time_zone)
|
|
17
17
|
flash[:notice] = "User settings saved successfully."
|
|
18
18
|
redirect_to spud_admin_root_url()
|
|
19
19
|
else
|
|
@@ -5,7 +5,7 @@ module Spud::Admin::ApplicationHelper
|
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def link_to_remove_fields(name, f)
|
|
8
|
-
f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)")
|
|
8
|
+
f.hidden_field(:_destroy) + link_to_function(name, "remove_fields(this)",:class => "btn btn-danger")
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def link_to_add_fields(name, f, association)
|
|
@@ -13,7 +13,7 @@ module Spud::Admin::ApplicationHelper
|
|
|
13
13
|
fields = f.fields_for(association, new_object, :child_index => "new_#{association}") do |builder|
|
|
14
14
|
render(association.to_s.singularize + "_fields", :f => builder)
|
|
15
15
|
end
|
|
16
|
-
link_to_function(name, "add_fields(this, \"#{association}\", \"#{escape_javascript(fields)}\")")
|
|
16
|
+
link_to_function(name, "add_fields(this, \"#{association}\", \"#{escape_javascript(fields)}\")",:class =>"btn")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
def error_messages_for(object)
|
data/app/models/spud_user.rb
CHANGED
|
@@ -2,7 +2,7 @@ class SpudUser < ActiveRecord::Base
|
|
|
2
2
|
has_many :spud_admin_permissions,:foreign_key => :user_id
|
|
3
3
|
accepts_nested_attributes_for :spud_admin_permissions, :allow_destroy => true
|
|
4
4
|
|
|
5
|
-
attr_accessible :login,:email,:first_name,:last_name,:password,:password_confirmation,:password_salt,:last_login_at,:last_request_at,:last_login_ip,:failed_login_count,:current_login_at,:login_count,:persistence_token,:perishable_token,:single_access_token,:crypted_password, :current_login_ip, :created_at, :updated_at,:spud_admin_permissions_attributes
|
|
5
|
+
attr_accessible :login,:email,:first_name,:last_name,:password,:password_confirmation,:password_salt,:last_login_at,:last_request_at,:last_login_ip,:failed_login_count,:current_login_at,:login_count,:persistence_token,:perishable_token,:single_access_token,:crypted_password, :current_login_ip, :created_at, :updated_at,:spud_admin_permissions_attributes,:time_zone
|
|
6
6
|
acts_as_authentic do |c|
|
|
7
7
|
# c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic
|
|
8
8
|
end # block optional
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<p> Fill in all information pertaining to the current user you wish to modify. Fields marked with * are required and must be filled out.</p>
|
|
4
4
|
|
|
5
|
-
<%=form_for @user,:url => spud_admin_user_path(:id => @user.id),:html=>{:class=>"
|
|
5
|
+
<%=form_for @user,:url => spud_admin_user_path(:id => @user.id),:html=>{:class=>"form-horizontal"} do |f|%>
|
|
6
6
|
<%=render :partial => "form",:locals => {:f => f}%>
|
|
7
|
-
<
|
|
7
|
+
<div class="form-actions">
|
|
8
|
+
<%=f.submit "Save User", :class=>"btn btn-primary"%> or <%=link_to "cancel","#",:class => "close_dialog btn"%>
|
|
9
|
+
</div>
|
|
8
10
|
<%end%>
|
|
9
11
|
|
|
10
|
-
<script type="text/javascript">
|
|
11
|
-
$('input[type=submit],.close_dialog').button();
|
|
12
|
-
|
|
13
|
-
</script>
|
|
14
12
|
|
|
@@ -2,52 +2,89 @@
|
|
|
2
2
|
|
|
3
3
|
<fieldset>
|
|
4
4
|
<legend>User Details</legend>
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
<%=f.
|
|
5
|
+
|
|
6
|
+
<div class="control-group">
|
|
7
|
+
<%=f.label :login, :required=>true,:class=> "control-label"%>
|
|
8
|
+
<div class="controls">
|
|
9
|
+
<%=f.text_field :login,:title => "",:size=>25%>
|
|
10
|
+
<p class="help-block">This is the username used to login to the account.</p>
|
|
11
|
+
</div>
|
|
8
12
|
|
|
9
|
-
</
|
|
10
|
-
<
|
|
11
|
-
<%=f.
|
|
13
|
+
</div>
|
|
14
|
+
<div class="control-group">
|
|
15
|
+
<%=f.label :email,:class=> "control-label"%>
|
|
16
|
+
<div class="controls">
|
|
17
|
+
<%=f.text_field :email, :title => "",:size => 25%>
|
|
18
|
+
<p class="help-block">The email address must be a valid email address.</p>
|
|
19
|
+
</div>
|
|
12
20
|
|
|
13
|
-
</
|
|
14
|
-
<
|
|
15
|
-
<%=f.
|
|
21
|
+
</div>
|
|
22
|
+
<div class="control-group">
|
|
23
|
+
<%=f.label :first_name,:class=> "control-label"%>
|
|
24
|
+
<div class="controls">
|
|
25
|
+
<%=f.text_field :first_name, :title => "",:size => 25%>
|
|
26
|
+
</div>
|
|
16
27
|
|
|
17
|
-
</
|
|
18
|
-
<
|
|
19
|
-
<%=f.
|
|
28
|
+
</div>
|
|
29
|
+
<div class="control-group">
|
|
30
|
+
<%=f.label :last_name,:class=> "control-label"%>
|
|
31
|
+
<div class="controls">
|
|
32
|
+
<%=f.text_field :last_name, :title => "",:size => 25%>
|
|
33
|
+
</div>
|
|
20
34
|
|
|
21
|
-
</
|
|
35
|
+
</div>
|
|
36
|
+
<div class="control-group">
|
|
37
|
+
<%=f.label :time_zone,:class => "control-label"%>
|
|
38
|
+
<div class="controls">
|
|
39
|
+
<%=f.time_zone_select :time_zone,ActiveSupport::TimeZone.us_zones,:default => Rails.application.config.time_zone%>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
22
42
|
|
|
23
|
-
</ol>
|
|
24
43
|
</fieldset>
|
|
25
44
|
<fieldset>
|
|
26
45
|
<legend>Credentials</legend>
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
<%=f.
|
|
46
|
+
|
|
47
|
+
<div class="control-group">
|
|
48
|
+
<%=f.label :password,:class=> "control-label"%>
|
|
49
|
+
<div class="controls">
|
|
50
|
+
<%=f.password_field :password, :title => "",:size => 25%>
|
|
51
|
+
<p class="help-block">Password must be at least 8 characters</p>
|
|
52
|
+
</div>
|
|
30
53
|
|
|
31
|
-
</
|
|
32
|
-
<
|
|
33
|
-
<%=f.
|
|
54
|
+
</div>
|
|
55
|
+
<div class="control-group">
|
|
56
|
+
<%=f.label :password_confirmation,"Confirm",:class=> "control-label"%>
|
|
57
|
+
<div class="controls">
|
|
58
|
+
<%=f.password_field :password_confirmation, :title => "",:size => 25%>
|
|
59
|
+
<p class="help-block">Retype your password here.</p>
|
|
60
|
+
</div>
|
|
34
61
|
|
|
35
|
-
</
|
|
36
|
-
<
|
|
37
|
-
<%=f.
|
|
38
|
-
|
|
39
|
-
|
|
62
|
+
</div>
|
|
63
|
+
<div class="control-group">
|
|
64
|
+
<%=f.label :super_admin,"Super Admin",:class=> "control-label"%>
|
|
65
|
+
<div class="controls">
|
|
66
|
+
<label class="checkbox inline">
|
|
67
|
+
<%=f.check_box :super_admin, :title => ""%>
|
|
68
|
+
The super administrator bypasses all permissions.
|
|
69
|
+
</label>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
40
73
|
</fieldset>
|
|
41
74
|
<fieldset>
|
|
42
75
|
<legend>Permissions</legend>
|
|
43
|
-
|
|
76
|
+
<div class="control-group">
|
|
77
|
+
<label class="control-label">Access Control</label>
|
|
78
|
+
<div class="controls">
|
|
44
79
|
<%=f.fields_for :spud_admin_permissions do |builder|%>
|
|
45
80
|
|
|
46
|
-
<li>
|
|
47
81
|
<%=builder.hidden_field :name%>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
<label class="checkbox inline">
|
|
83
|
+
|
|
84
|
+
<%=builder.check_box :access%><%=builder.object.name%>
|
|
85
|
+
</label>
|
|
86
|
+
|
|
51
87
|
<%end%>
|
|
52
|
-
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
53
90
|
</fieldset>
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
<p> Fill in all information pertaining to the new user you wish to create. Fields marked with * are required and must be filled out.</p>
|
|
4
4
|
|
|
5
|
-
<%=form_for @user,:url => spud_admin_users_path(),:html=>{:class=>"
|
|
5
|
+
<%=form_for @user,:url => spud_admin_users_path(),:html=>{:class=>"form-horizontal"} do |f|%>
|
|
6
6
|
<%=render :partial => "form",:locals => {:f => f}%>
|
|
7
|
-
<
|
|
7
|
+
<div class="form-actions">
|
|
8
|
+
<%=f.submit "Create User", :class=>"btn btn-primary"%> or <%=link_to "cancel","#",:class => "close_dialog btn"%>
|
|
9
|
+
</div>
|
|
8
10
|
<%end%>
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
$('input[type=submit],.close_dialog').button();
|
|
12
|
-
|
|
13
|
-
</script>
|
|
12
|
+
|
|
14
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<%=content_for :data_controls do%>
|
|
2
|
-
<%=link_to "New User",new_spud_admin_user_path(),:class => "ajax
|
|
2
|
+
<%=link_to "New User",new_spud_admin_user_path(),:class => "ajax btn btn-primary",:title => "New User"%>
|
|
3
3
|
<%end%>
|
|
4
4
|
<%=content_for :detail do%>
|
|
5
5
|
<table class="admin-table data-table" id="usertable">
|
|
@@ -1,25 +1,43 @@
|
|
|
1
1
|
<%content_for :detail do%>
|
|
2
|
-
<%=form_tag "/spud/setup",:method => :post,:class=>"
|
|
2
|
+
<%=form_tag "/spud/setup",:method => :post,:class=>"form-horizontal" do %>
|
|
3
3
|
<fieldset>
|
|
4
4
|
<legend>New Admin Account</legend>
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</
|
|
5
|
+
|
|
6
|
+
<div class="control-group">
|
|
7
|
+
<%=label_tag :login, "Login",:class => "control-label"%>
|
|
8
|
+
<div class="controls">
|
|
9
|
+
<%=text_field_tag :login,nil,:title => "",:size=>25%>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="control-group">
|
|
13
|
+
<%=label_tag :email, "Email",:class => "control-label"%>
|
|
14
|
+
<div class="controls">
|
|
15
|
+
<%=text_field_tag :email,nil,:title => "",:size=>25%>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="control-group">
|
|
20
|
+
<%=label_tag :password, "Password",:class => "control-label"%>
|
|
21
|
+
<div class="controls">
|
|
22
|
+
<%=password_field_tag :password,nil,:title => "",:size=>25%>
|
|
23
|
+
<p class="help-block">Password must be at least 8 characters</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="control-group">
|
|
27
|
+
<%=label_tag :password_confirmation, "Confirm",:class => "control-label"%>
|
|
28
|
+
<div class="controls">
|
|
29
|
+
<%=password_field_tag :password_confirmation,nil,:title => "",:size=>25%>
|
|
30
|
+
<p class="help-block">Retype your password here.</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
18
33
|
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
|
|
35
|
+
|
|
21
36
|
</fieldset>
|
|
22
|
-
<
|
|
37
|
+
<div class="form-actions">
|
|
38
|
+
<%=submit_tag "Create Admin Account", :class=>"btn btn-primary"%>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
23
41
|
<%end%>
|
|
24
|
-
|
|
42
|
+
|
|
25
43
|
<%end%>
|
|
@@ -1,36 +1,60 @@
|
|
|
1
1
|
<%=error_messages_for f.object%>
|
|
2
2
|
<fieldset>
|
|
3
3
|
<legend>User Details</legend>
|
|
4
|
-
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<%=f.text_field :email, :title => "",:size => 25%>
|
|
11
|
-
|
|
12
|
-
</li>
|
|
13
|
-
<li><%=f.label :first_name%>
|
|
14
|
-
<%=f.text_field :first_name, :title => "",:size => 25%>
|
|
4
|
+
|
|
5
|
+
<div class="control-group">
|
|
6
|
+
<%=f.label :login, :required=>true,:class=>"control-label"%>
|
|
7
|
+
<div class="controls">
|
|
8
|
+
<%=f.text_field :login,:title => "",:size=>25%>
|
|
9
|
+
</div>
|
|
15
10
|
|
|
16
|
-
</
|
|
17
|
-
<
|
|
18
|
-
|
|
11
|
+
</div>
|
|
12
|
+
<div class="control-group">
|
|
13
|
+
<%=f.label :email,:class=>"control-label"%>
|
|
14
|
+
<div class="controls">
|
|
15
|
+
<%=f.text_field :email, :title => "",:size => 25%>
|
|
16
|
+
</div>
|
|
19
17
|
|
|
20
|
-
</
|
|
18
|
+
</div>
|
|
19
|
+
<div class="control-group">
|
|
20
|
+
<%=f.label :first_name,:class=>"control-label"%>
|
|
21
|
+
<div class="controls">
|
|
22
|
+
<%=f.text_field :first_name, :title => "",:size => 25%>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="control-group">
|
|
26
|
+
<%=f.label :last_name,:class=>"control-label"%>
|
|
27
|
+
<div class="controls">
|
|
28
|
+
<%=f.text_field :last_name, :title => "",:size => 25%>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="control-group">
|
|
32
|
+
<%=f.label :time_zone,:class => "control-label"%>
|
|
33
|
+
<div class="controls">
|
|
34
|
+
<%=f.time_zone_select :time_zone,ActiveSupport::TimeZone.us_zones,:default => Rails.application.config.time_zone%>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
21
38
|
|
|
22
|
-
</ol>
|
|
23
39
|
</fieldset>
|
|
24
40
|
<fieldset>
|
|
25
41
|
<legend>Credentials</legend>
|
|
26
|
-
|
|
27
|
-
<
|
|
28
|
-
|
|
42
|
+
|
|
43
|
+
<div class="control-group">
|
|
44
|
+
<%=f.label :password,:class=>"control-label"%>
|
|
45
|
+
<div class="controls">
|
|
46
|
+
<%=f.password_field :password, :title => "",:size => 25%>
|
|
47
|
+
<p class="help-block">Password must be at least 8 characters</p>
|
|
48
|
+
</div>
|
|
29
49
|
|
|
30
|
-
</
|
|
31
|
-
<
|
|
32
|
-
|
|
50
|
+
</div>
|
|
51
|
+
<div class="control-group">
|
|
52
|
+
<%=f.label :password_confirmation,"Confirm",:class=>"control-label"%>
|
|
53
|
+
<div class="controls">
|
|
54
|
+
<%=f.password_field :password_confirmation, :title => "",:size => 25%>
|
|
55
|
+
<p class="help-block">Retype your password here.</p>
|
|
56
|
+
</div>
|
|
33
57
|
|
|
34
|
-
</
|
|
35
|
-
|
|
58
|
+
</div>
|
|
59
|
+
|
|
36
60
|
</fieldset>
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
<p>Fields marked with * are required and must be filled out.</p>
|
|
4
4
|
|
|
5
|
-
<%=form_for @current_user,:url => spud_user_path(),:html=>{:class=>"
|
|
5
|
+
<%=form_for @current_user,:url => spud_user_path(),:html=>{:class=>"form-horizontal"} do |f|%>
|
|
6
6
|
<%=render :partial => "form",:locals => {:f => f}%>
|
|
7
|
-
<
|
|
7
|
+
<div class="form-actions">
|
|
8
|
+
<%=f.submit "Save Settings", :class=>"btn btn-primary"%> or <%=link_to "cancel",request.referer,:class => "btn"%>
|
|
9
|
+
</div>
|
|
8
10
|
<%end%>
|
|
9
11
|
|
|
10
|
-
<script type="text/javascript">
|
|
11
|
-
$('input[type=submit],.close_dialog').button();
|
|
12
|
-
|
|
13
|
-
</script>
|
|
14
12
|
|