Merge branch 'new_widget_setting_interface' of github.com:Rulingcom/orbit into new_widget_setting_interface
This commit is contained in:
commit
9630d0a841
10
Gemfile
10
Gemfile
|
@ -21,7 +21,7 @@ gem 'kaminari', :git => 'git://github.com/amatsuda/kaminari.git'
|
||||||
gem 'mini_magick'
|
gem 'mini_magick'
|
||||||
gem 'mongoid', '> 2.1', '< 3.0.0'
|
gem 'mongoid', '> 2.1', '< 3.0.0'
|
||||||
gem 'mongoid-tree', :require => 'mongoid/tree'
|
gem 'mongoid-tree', :require => 'mongoid/tree'
|
||||||
gem "mongo_session_store-rails3"
|
gem "mongo_session_store-rails3", '3.0.6'
|
||||||
gem 'nokogiri'
|
gem 'nokogiri'
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,10 +72,10 @@ end
|
||||||
|
|
||||||
|
|
||||||
group :test, :development do
|
group :test, :development do
|
||||||
gem 'pry'
|
#gem 'pry'
|
||||||
gem 'pry-remote'
|
#gem 'pry-remote'
|
||||||
gem 'pry-stack_explorer'
|
#gem 'pry-stack_explorer'
|
||||||
gem 'pry-debugger'
|
#gem 'pry-debugger'
|
||||||
gem 'faker'
|
gem 'faker'
|
||||||
|
|
||||||
gem "sunspot-rails-tester"
|
gem "sunspot-rails-tester"
|
||||||
|
|
|
@ -14,6 +14,5 @@
|
||||||
//= require orbitdesktopAPI
|
//= require orbitdesktopAPI
|
||||||
//= require orbitTimeline
|
//= require orbitTimeline
|
||||||
//= require orbitdesktop
|
//= require orbitdesktop
|
||||||
//= require desktop/journal_pages
|
|
||||||
//= require desktop/seminar_pages
|
|
||||||
//= require desktop/books_pages
|
//= require desktop/books_pages
|
||||||
|
//= require desktop/seminar_pages
|
||||||
|
|
|
@ -37,7 +37,7 @@ $('#index').live('pageinit',function(){
|
||||||
// $('.newlist').swipePlanes();
|
// $('.newlist').swipePlanes();
|
||||||
// }, 1000);
|
// }, 1000);
|
||||||
});
|
});
|
||||||
$('#news_content').live('pageinit',function(){
|
$('#announcement_content').live('pageinit',function(){
|
||||||
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
|
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
|
||||||
});
|
});
|
||||||
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
|
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
|
||||||
|
@ -113,8 +113,8 @@ $(window).bind("orientationchange", function(){
|
||||||
|
|
||||||
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
||||||
$('.slideshow').cycle({
|
$('.slideshow').cycle({
|
||||||
fx:'scrollLeft',
|
fx: $effect,
|
||||||
timeout: 6000,
|
timeout: $timeout
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".newlist").css({
|
$(".newlist").css({
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
[data-icon]:before {
|
[data-icons]:before {
|
||||||
font-family: 'entypo';
|
font-family: 'entypo';
|
||||||
content: attr(data-icon);
|
content: attr(data-icons);
|
||||||
speak: none;
|
speak: none;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-height: .6em;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'entypo';
|
font-family: 'entypo';
|
||||||
|
@ -56,15 +59,20 @@ a [class*=" icon"] {
|
||||||
vertical-align: -10%;
|
vertical-align: -10%;
|
||||||
font-size: 1.3333333333333333em;
|
font-size: 1.3333333333333333em;
|
||||||
}
|
}
|
||||||
.btn [class^="icon"],
|
|
||||||
.nav [class^="icon"],
|
.nav [class^="icon"],
|
||||||
.btn [class*=" icon"],
|
|
||||||
.nav [class*=" icon"] {
|
.nav [class*=" icon"] {
|
||||||
display: inline;
|
display: inline;
|
||||||
/* keeps button heights with and without icons the same */
|
/* keeps button heights with and without icons the same */
|
||||||
|
|
||||||
line-height: 1.4em;
|
line-height: 1.5em;
|
||||||
font-size: 1.5em;
|
}
|
||||||
|
.btn [class^="icon"],
|
||||||
|
.btn [class*=" icon"] {
|
||||||
|
display: inline;
|
||||||
|
/* keeps button heights with and without icons the same */
|
||||||
|
|
||||||
|
line-height: .9em;
|
||||||
}
|
}
|
||||||
.btn [class^="icon"].icon-spin,
|
.btn [class^="icon"].icon-spin,
|
||||||
.nav [class^="icon"].icon-spin,
|
.nav [class^="icon"].icon-spin,
|
||||||
|
|
|
@ -0,0 +1,303 @@
|
||||||
|
/* Font Awesome
|
||||||
|
the iconic font designed for use with Twitter Bootstrap
|
||||||
|
-------------------------------------------------------
|
||||||
|
The full suite of pictographic icons, examples, and documentation
|
||||||
|
can be found at: http://fortawesome.github.com/Font-Awesome/
|
||||||
|
|
||||||
|
License
|
||||||
|
-------------------------------------------------------
|
||||||
|
The Font Awesome webfont, CSS, and LESS files are licensed under CC BY 3.0:
|
||||||
|
http://creativecommons.org/licenses/by/3.0/ A mention of
|
||||||
|
'Font Awesome - http://fortawesome.github.com/Font-Awesome' in human-readable
|
||||||
|
source code is considered acceptable attribution (most common on the web).
|
||||||
|
If human readable source code is not available to the end user, a mention in
|
||||||
|
an 'About' or 'Credits' screen is considered acceptable (most common in desktop
|
||||||
|
or mobile software).
|
||||||
|
|
||||||
|
Contact
|
||||||
|
-------------------------------------------------------
|
||||||
|
Email: dave@davegandy.com
|
||||||
|
Twitter: http://twitter.com/fortaweso_me
|
||||||
|
Work: http://lemonwi.se co-founder
|
||||||
|
|
||||||
|
*/
|
||||||
|
@font-face {
|
||||||
|
font-family: "FontAwesome";
|
||||||
|
src: url('../fonts/fontawesome-webfont.eot');
|
||||||
|
src: url('../fonts/fontawesome-webfont.eot?#iefix') format('eot'), url('../fonts/fontawesome-webfont.woff') format('woff'), url('../fonts/fontawesome-webfont.ttf') format('truetype'), url('../font/fontawesome-webfont.svg#FontAwesome') format('svg');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Font Awesome styles
|
||||||
|
------------------------------------------------------- */
|
||||||
|
[class^="icon-"]:before, [class*=" icon-"]:before {
|
||||||
|
font-family: FontAwesome;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
a [class^="icon-"], a [class*=" icon-"] {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
/* makes the font 33% larger relative to the icon container */
|
||||||
|
.icon-large:before {
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 1.3333333333333333em;
|
||||||
|
}
|
||||||
|
.btn [class^="icon-"], .btn [class*=" icon-"] {
|
||||||
|
/* keeps button heights with and without icons the same */
|
||||||
|
|
||||||
|
line-height: .9em;
|
||||||
|
}
|
||||||
|
li [class^="icon-"], li [class*=" icon-"] {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1.25em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
li .icon-large[class^="icon-"], li .icon-large[class*=" icon-"] {
|
||||||
|
/* 1.5 increased font size for icon-large * 1.25 width */
|
||||||
|
|
||||||
|
width: 1.875em;
|
||||||
|
}
|
||||||
|
li[class^="icon-"], li[class*=" icon-"] {
|
||||||
|
margin-left: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
li[class^="icon-"]:before, li[class*=" icon-"]:before {
|
||||||
|
text-indent: -2em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
li[class^="icon-"].icon-large:before, li[class*=" icon-"].icon-large:before {
|
||||||
|
text-indent: -1.3333333333333333em;
|
||||||
|
}
|
||||||
|
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
|
||||||
|
readers do not read off random characters that represent icons */
|
||||||
|
.icon-glass:before { content: "\f000"; }
|
||||||
|
.icon-music:before { content: "\f001"; }
|
||||||
|
.icon-search:before { content: "\f002"; }
|
||||||
|
.icon-envelope:before { content: "\f003"; }
|
||||||
|
.icon-heart:before { content: "\f004"; }
|
||||||
|
.icon-star:before { content: "\f005"; }
|
||||||
|
.icon-star-empty:before { content: "\f006"; }
|
||||||
|
.icon-user:before { content: "\f007"; }
|
||||||
|
.icon-film:before { content: "\f008"; }
|
||||||
|
.icon-th-large:before { content: "\f009"; }
|
||||||
|
.icon-th:before { content: "\f00a"; }
|
||||||
|
.icon-th-list:before { content: "\f00b"; }
|
||||||
|
.icon-ok:before { content: "\f00c"; }
|
||||||
|
.icon-remove:before { content: "\f00d"; }
|
||||||
|
.icon-zoom-in:before { content: "\f00e"; }
|
||||||
|
|
||||||
|
.icon-zoom-out:before { content: "\f010"; }
|
||||||
|
.icon-off:before { content: "\f011"; }
|
||||||
|
.icon-signal:before { content: "\f012"; }
|
||||||
|
.icon-cog:before { content: "\f013"; }
|
||||||
|
.icon-trash:before { content: "\f014"; }
|
||||||
|
.icon-home:before { content: "\f015"; }
|
||||||
|
.icon-file:before { content: "\f016"; }
|
||||||
|
.icon-time:before { content: "\f017"; }
|
||||||
|
.icon-road:before { content: "\f018"; }
|
||||||
|
.icon-download-alt:before { content: "\f019"; }
|
||||||
|
.icon-download:before { content: "\f01a"; }
|
||||||
|
.icon-upload:before { content: "\f01b"; }
|
||||||
|
.icon-inbox:before { content: "\f01c"; }
|
||||||
|
.icon-play-circle:before { content: "\f01d"; }
|
||||||
|
.icon-repeat:before { content: "\f01e"; }
|
||||||
|
|
||||||
|
/* \f020 doesn't work in Safari. all shifted one down */
|
||||||
|
.icon-refresh:before { content: "\f021"; }
|
||||||
|
.icon-list-alt:before { content: "\f022"; }
|
||||||
|
.icon-lock:before { content: "\f023"; }
|
||||||
|
.icon-flag:before { content: "\f024"; }
|
||||||
|
.icon-headphones:before { content: "\f025"; }
|
||||||
|
.icon-volume-off:before { content: "\f026"; }
|
||||||
|
.icon-volume-down:before { content: "\f027"; }
|
||||||
|
.icon-volume-up:before { content: "\f028"; }
|
||||||
|
.icon-qrcode:before { content: "\f029"; }
|
||||||
|
.icon-barcode:before { content: "\f02a"; }
|
||||||
|
.icon-tag:before { content: "\f02b"; }
|
||||||
|
.icon-tags:before { content: "\f02c"; }
|
||||||
|
.icon-book:before { content: "\f02d"; }
|
||||||
|
.icon-bookmark:before { content: "\f02e"; }
|
||||||
|
.icon-print:before { content: "\f02f"; }
|
||||||
|
|
||||||
|
.icon-camera:before { content: "\f030"; }
|
||||||
|
.icon-font:before { content: "\f031"; }
|
||||||
|
.icon-bold:before { content: "\f032"; }
|
||||||
|
.icon-italic:before { content: "\f033"; }
|
||||||
|
.icon-text-height:before { content: "\f034"; }
|
||||||
|
.icon-text-width:before { content: "\f035"; }
|
||||||
|
.icon-align-left:before { content: "\f036"; }
|
||||||
|
.icon-align-center:before { content: "\f037"; }
|
||||||
|
.icon-align-right:before { content: "\f038"; }
|
||||||
|
.icon-align-justify:before { content: "\f039"; }
|
||||||
|
.icon-list:before { content: "\f03a"; }
|
||||||
|
.icon-indent-left:before { content: "\f03b"; }
|
||||||
|
.icon-indent-right:before { content: "\f03c"; }
|
||||||
|
.icon-facetime-video:before { content: "\f03d"; }
|
||||||
|
.icon-picture:before { content: "\f03e"; }
|
||||||
|
|
||||||
|
.icon-pencil:before { content: "\f040"; }
|
||||||
|
.icon-map-marker:before { content: "\f041"; }
|
||||||
|
.icon-adjust:before { content: "\f042"; }
|
||||||
|
.icon-tint:before { content: "\f043"; }
|
||||||
|
.icon-edit:before { content: "\f044"; }
|
||||||
|
.icon-share:before { content: "\f045"; }
|
||||||
|
.icon-check:before { content: "\f046"; }
|
||||||
|
.icon-move:before { content: "\f047"; }
|
||||||
|
.icon-step-backward:before { content: "\f048"; }
|
||||||
|
.icon-fast-backward:before { content: "\f049"; }
|
||||||
|
.icon-backward:before { content: "\f04a"; }
|
||||||
|
.icon-play:before { content: "\f04b"; }
|
||||||
|
.icon-pause:before { content: "\f04c"; }
|
||||||
|
.icon-stop:before { content: "\f04d"; }
|
||||||
|
.icon-forward:before { content: "\f04e"; }
|
||||||
|
|
||||||
|
.icon-fast-forward:before { content: "\f050"; }
|
||||||
|
.icon-step-forward:before { content: "\f051"; }
|
||||||
|
.icon-eject:before { content: "\f052"; }
|
||||||
|
.icon-chevron-left:before { content: "\f053"; }
|
||||||
|
.icon-chevron-right:before { content: "\f054"; }
|
||||||
|
.icon-plus-sign:before { content: "\f055"; }
|
||||||
|
.icon-minus-sign:before { content: "\f056"; }
|
||||||
|
.icon-remove-sign:before { content: "\f057"; }
|
||||||
|
.icon-ok-sign:before { content: "\f058"; }
|
||||||
|
.icon-question-sign:before { content: "\f059"; }
|
||||||
|
.icon-info-sign:before { content: "\f05a"; }
|
||||||
|
.icon-screenshot:before { content: "\f05b"; }
|
||||||
|
.icon-remove-circle:before { content: "\f05c"; }
|
||||||
|
.icon-ok-circle:before { content: "\f05d"; }
|
||||||
|
.icon-ban-circle:before { content: "\f05e"; }
|
||||||
|
|
||||||
|
.icon-arrow-left:before { content: "\f060"; }
|
||||||
|
.icon-arrow-right:before { content: "\f061"; }
|
||||||
|
.icon-arrow-up:before { content: "\f062"; }
|
||||||
|
.icon-arrow-down:before { content: "\f063"; }
|
||||||
|
.icon-share-alt:before { content: "\f064"; }
|
||||||
|
.icon-resize-full:before { content: "\f065"; }
|
||||||
|
.icon-resize-small:before { content: "\f066"; }
|
||||||
|
.icon-plus:before { content: "\f067"; }
|
||||||
|
.icon-minus:before { content: "\f068"; }
|
||||||
|
.icon-asterisk:before { content: "\f069"; }
|
||||||
|
.icon-exclamation-sign:before { content: "\f06a"; }
|
||||||
|
.icon-gift:before { content: "\f06b"; }
|
||||||
|
.icon-leaf:before { content: "\f06c"; }
|
||||||
|
.icon-fire:before { content: "\f06d"; }
|
||||||
|
.icon-eye-open:before { content: "\f06e"; }
|
||||||
|
|
||||||
|
.icon-eye-close:before { content: "\f070"; }
|
||||||
|
.icon-warning-sign:before { content: "\f071"; }
|
||||||
|
.icon-plane:before { content: "\f072"; }
|
||||||
|
.icon-calendar:before { content: "\f073"; }
|
||||||
|
.icon-random:before { content: "\f074"; }
|
||||||
|
.icon-comment:before { content: "\f075"; }
|
||||||
|
.icon-magnet:before { content: "\f076"; }
|
||||||
|
.icon-chevron-up:before { content: "\f077"; }
|
||||||
|
.icon-chevron-down:before { content: "\f078"; }
|
||||||
|
.icon-retweet:before { content: "\f079"; }
|
||||||
|
.icon-shopping-cart:before { content: "\f07a"; }
|
||||||
|
.icon-folder-close:before { content: "\f07b"; }
|
||||||
|
.icon-folder-open:before { content: "\f07c"; }
|
||||||
|
.icon-resize-vertical:before { content: "\f07d"; }
|
||||||
|
.icon-resize-horizontal:before { content: "\f07e"; }
|
||||||
|
|
||||||
|
.icon-bar-chart:before { content: "\f080"; }
|
||||||
|
.icon-twitter-sign:before { content: "\f081"; }
|
||||||
|
.icon-facebook-sign:before { content: "\f082"; }
|
||||||
|
.icon-camera-retro:before { content: "\f083"; }
|
||||||
|
.icon-key:before { content: "\f084"; }
|
||||||
|
.icon-cogs:before { content: "\f085"; }
|
||||||
|
.icon-comments:before { content: "\f086"; }
|
||||||
|
.icon-thumbs-up:before { content: "\f087"; }
|
||||||
|
.icon-thumbs-down:before { content: "\f088"; }
|
||||||
|
.icon-star-half:before { content: "\f089"; }
|
||||||
|
.icon-heart-empty:before { content: "\f08a"; }
|
||||||
|
.icon-signout:before { content: "\f08b"; }
|
||||||
|
.icon-linkedin-sign:before { content: "\f08c"; }
|
||||||
|
.icon-pushpin:before { content: "\f08d"; }
|
||||||
|
.icon-external-link:before { content: "\f08e"; }
|
||||||
|
|
||||||
|
.icon-signin:before { content: "\f090"; }
|
||||||
|
.icon-trophy:before { content: "\f091"; }
|
||||||
|
.icon-github-sign:before { content: "\f092"; }
|
||||||
|
.icon-upload-alt:before { content: "\f093"; }
|
||||||
|
.icon-lemon:before { content: "\f094"; }
|
||||||
|
.icon-phone:before { content: "\f095"; }
|
||||||
|
.icon-check-empty:before { content: "\f096"; }
|
||||||
|
.icon-bookmark-empty:before { content: "\f097"; }
|
||||||
|
.icon-phone-sign:before { content: "\f098"; }
|
||||||
|
.icon-twitter:before { content: "\f099"; }
|
||||||
|
.icon-facebook:before { content: "\f09a"; }
|
||||||
|
.icon-github:before { content: "\f09b"; }
|
||||||
|
.icon-unlock:before { content: "\f09c"; }
|
||||||
|
.icon-credit-card:before { content: "\f09d"; }
|
||||||
|
.icon-rss:before { content: "\f09e"; }
|
||||||
|
|
||||||
|
.icon-hdd:before { content: "\f0a0"; }
|
||||||
|
.icon-bullhorn:before { content: "\f0a1"; }
|
||||||
|
.icon-bell:before { content: "\f0a2"; }
|
||||||
|
.icon-certificate:before { content: "\f0a3"; }
|
||||||
|
.icon-hand-right:before { content: "\f0a4"; }
|
||||||
|
.icon-hand-left:before { content: "\f0a5"; }
|
||||||
|
.icon-hand-up:before { content: "\f0a6"; }
|
||||||
|
.icon-hand-down:before { content: "\f0a7"; }
|
||||||
|
.icon-circle-arrow-left:before { content: "\f0a8"; }
|
||||||
|
.icon-circle-arrow-right:before { content: "\f0a9"; }
|
||||||
|
.icon-circle-arrow-up:before { content: "\f0aa"; }
|
||||||
|
.icon-circle-arrow-down:before { content: "\f0ab"; }
|
||||||
|
.icon-globe:before { content: "\f0ac"; }
|
||||||
|
.icon-wrench:before { content: "\f0ad"; }
|
||||||
|
.icon-tasks:before { content: "\f0ae"; }
|
||||||
|
|
||||||
|
.icon-filter:before { content: "\f0b0"; }
|
||||||
|
.icon-briefcase:before { content: "\f0b1"; }
|
||||||
|
.icon-fullscreen:before { content: "\f0b2"; }
|
||||||
|
|
||||||
|
.icon-group:before { content: "\f0c0"; }
|
||||||
|
.icon-link:before { content: "\f0c1"; }
|
||||||
|
.icon-cloud:before { content: "\f0c2"; }
|
||||||
|
.icon-beaker:before { content: "\f0c3"; }
|
||||||
|
.icon-cut:before { content: "\f0c4"; }
|
||||||
|
.icon-copy:before { content: "\f0c5"; }
|
||||||
|
.icon-paper-clip:before { content: "\f0c6"; }
|
||||||
|
.icon-save:before { content: "\f0c7"; }
|
||||||
|
.icon-sign-blank:before { content: "\f0c8"; }
|
||||||
|
.icon-reorder:before { content: "\f0c9"; }
|
||||||
|
.icon-list-ul:before { content: "\f0ca"; }
|
||||||
|
.icon-list-ol:before { content: "\f0cb"; }
|
||||||
|
.icon-strikethrough:before { content: "\f0cc"; }
|
||||||
|
.icon-underline:before { content: "\f0cd"; }
|
||||||
|
.icon-table:before { content: "\f0ce"; }
|
||||||
|
|
||||||
|
.icon-magic:before { content: "\f0d0"; }
|
||||||
|
.icon-truck:before { content: "\f0d1"; }
|
||||||
|
.icon-pinterest:before { content: "\f0d2"; }
|
||||||
|
.icon-pinterest-sign:before { content: "\f0d3"; }
|
||||||
|
.icon-google-plus-sign:before { content: "\f0d4"; }
|
||||||
|
.icon-google-plus:before { content: "\f0d5"; }
|
||||||
|
.icon-money:before { content: "\f0d6"; }
|
||||||
|
.icon-caret-down:before { content: "\f0d7"; }
|
||||||
|
.icon-caret-up:before { content: "\f0d8"; }
|
||||||
|
.icon-caret-left:before { content: "\f0d9"; }
|
||||||
|
.icon-caret-right:before { content: "\f0da"; }
|
||||||
|
.icon-columns:before { content: "\f0db"; }
|
||||||
|
.icon-sort:before { content: "\f0dc"; }
|
||||||
|
.icon-sort-down:before { content: "\f0dd"; }
|
||||||
|
.icon-sort-up:before { content: "\f0de"; }
|
||||||
|
|
||||||
|
.icon-envelope-alt:before { content: "\f0e0"; }
|
||||||
|
.icon-linkedin:before { content: "\f0e1"; }
|
||||||
|
.icon-undo:before { content: "\f0e2"; }
|
||||||
|
.icon-legal:before { content: "\f0e3"; }
|
||||||
|
.icon-dashboard:before { content: "\f0e4"; }
|
||||||
|
.icon-comment-alt:before { content: "\f0e5"; }
|
||||||
|
.icon-comments-alt:before { content: "\f0e6"; }
|
||||||
|
.icon-bolt:before { content: "\f0e7"; }
|
||||||
|
.icon-sitemap:before { content: "\f0e8"; }
|
||||||
|
.icon-umbrella:before { content: "\f0e9"; }
|
||||||
|
.icon-paste:before { content: "\f0ea"; }
|
||||||
|
|
||||||
|
.icon-user-md:before { content: "\f200"; }
|
|
@ -0,0 +1,519 @@
|
||||||
|
/* WARNING: Your are using ligatures for your icon font.
|
||||||
|
Ligatures are not supported in IE 9 (and older).
|
||||||
|
Use the Private Use Area encoding for best browser support.
|
||||||
|
==================================================================== */
|
||||||
|
@font-face {
|
||||||
|
font-family: 'entypo';
|
||||||
|
src:url(<%= asset_path 'entypo.eot' %>);
|
||||||
|
src:url(<%= asset_path 'entypo.eot?#iefix' %>) format('embedded-opentype'),
|
||||||
|
url(<%= asset_path 'entypo.svg#entypo' %>) format('svg'),
|
||||||
|
url(<%= asset_path 'entypo.woff' %>) format('woff'),
|
||||||
|
url(<%= asset_path 'entypo.ttf' %>) format('truetype');
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Use the following CSS code if you want to use data attributes for inserting your icons */
|
||||||
|
[data-icons]:before {
|
||||||
|
font-family: 'entypo';
|
||||||
|
content: attr(data-icon);
|
||||||
|
speak: none;
|
||||||
|
/* Enable Ligatures */
|
||||||
|
-webkit-font-feature-settings:"liga","dlig";
|
||||||
|
-moz-font-feature-settings:"liga=1, dlig=1";
|
||||||
|
-moz-font-feature-settings:"liga","dlig";
|
||||||
|
-ms-font-feature-settings:"liga","dlig";
|
||||||
|
-o-font-feature-settings:"liga","dlig";
|
||||||
|
font-feature-settings:"liga","dlig";
|
||||||
|
text-rendering:optimizeLegibility;
|
||||||
|
font-weight: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Use the following CSS code if you want to have a class per icon */
|
||||||
|
[class^="icons-"]:before, [class*=" icons-"]:before {
|
||||||
|
font-size: 1.5em;
|
||||||
|
font-family: 'entypo';
|
||||||
|
font-style: normal;
|
||||||
|
speak: none;
|
||||||
|
/* Enable Ligatures */
|
||||||
|
-webkit-font-feature-settings:"liga","dlig";
|
||||||
|
-moz-font-feature-settings:"liga=1, dlig=1";
|
||||||
|
-moz-font-feature-settings:"liga","dlig";
|
||||||
|
-ms-font-feature-settings:"liga","dlig";
|
||||||
|
-o-font-feature-settings:"liga","dlig";
|
||||||
|
font-feature-settings:"liga","dlig";
|
||||||
|
text-rendering:optimizeLegibility;
|
||||||
|
font-weight: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
a [class^="icons-"], a [class*=" icons-"] {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
/* makes the font 33% larger relative to the icon container */
|
||||||
|
.icons-large:before {
|
||||||
|
vertical-align: top;
|
||||||
|
font-size: 1.3333333333333333em;
|
||||||
|
}
|
||||||
|
.btn [class^="icons-"], .btn [class*=" icons-"] {
|
||||||
|
/* keeps button heights with and without icons the same */
|
||||||
|
|
||||||
|
line-height: .9em;
|
||||||
|
}
|
||||||
|
li [class^="icons-"], li [class*=" icons-"] {
|
||||||
|
display: inline-block;
|
||||||
|
width: 1.25em;
|
||||||
|
text-align: center;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
li .icons-large[class^="icons-"], li .icons-large[class*=" icons-"] {
|
||||||
|
/* 1.5 increased font size for icons-large * 1.25 width */
|
||||||
|
|
||||||
|
width: 1.875em;
|
||||||
|
}
|
||||||
|
li[class^="icons-"], li[class*=" icons-"] {
|
||||||
|
margin-left: 0;
|
||||||
|
list-style-type: none;
|
||||||
|
}
|
||||||
|
li[class^="icons-"]:before, li[class*=" icons-"]:before {
|
||||||
|
text-indent: -2em;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
li[class^="icons-"].icons-large:before, li[class*=" icons-"].icons-large:before {
|
||||||
|
text-indent: -1.3333333333333333em;
|
||||||
|
}
|
||||||
|
.icons-phone:before {
|
||||||
|
content: "\70\68\6f\6e\65";
|
||||||
|
}
|
||||||
|
.icons-directions:before {
|
||||||
|
content: "\64\69\72\65\63\74\69\6f\6e\73";
|
||||||
|
}
|
||||||
|
.icons-mail:before {
|
||||||
|
content: "\6d\61\69\6c";
|
||||||
|
}
|
||||||
|
.icons-pencil:before {
|
||||||
|
content: "\70\65\6e\63\69\6c";
|
||||||
|
}
|
||||||
|
.icons-paperclip:before {
|
||||||
|
content: "\70\61\70\65\72\63\6c\69\70";
|
||||||
|
}
|
||||||
|
.icons-drawer:before {
|
||||||
|
content: "\64\72\61\77\65\72";
|
||||||
|
}
|
||||||
|
.icons-member:before {
|
||||||
|
content: "\6d\65\6d\62\65\72";
|
||||||
|
}
|
||||||
|
.icons-group:before {
|
||||||
|
content: "\67\72\6f\75\70";
|
||||||
|
}
|
||||||
|
.icons-addmember:before {
|
||||||
|
content: "\61\64\64\6d\65\6d\62\65\72";
|
||||||
|
}
|
||||||
|
.icons-location:before {
|
||||||
|
content: "\6c\6f\63\61\74\69\6f\6e";
|
||||||
|
}
|
||||||
|
.icons-share:before {
|
||||||
|
content: "\73\68\61\72\65";
|
||||||
|
}
|
||||||
|
.icons-heart-full:before {
|
||||||
|
content: "\68\65\61\72\74\2d\66\75\6c\6c";
|
||||||
|
}
|
||||||
|
.icons-heart-bare:before {
|
||||||
|
content: "\68\65\61\72\74\2d\62\61\72\65";
|
||||||
|
}
|
||||||
|
.icons-star-full:before {
|
||||||
|
content: "\73\74\61\72\2d\66\75\6c\6c";
|
||||||
|
}
|
||||||
|
.icons-star-bare:before {
|
||||||
|
content: "\73\74\61\72\2d\62\61\72\65";
|
||||||
|
}
|
||||||
|
.icons-discuss:before {
|
||||||
|
content: "\64\69\73\63\75\73\73";
|
||||||
|
}
|
||||||
|
.icons-comment:before {
|
||||||
|
content: "\63\6f\6d\6d\65\6e\74";
|
||||||
|
}
|
||||||
|
.icons-quote:before {
|
||||||
|
content: "\71\75\6f\74\65";
|
||||||
|
}
|
||||||
|
.icons-house:before {
|
||||||
|
content: "\68\6f\75\73\65";
|
||||||
|
}
|
||||||
|
.icons-search:before {
|
||||||
|
content: "\73\65\61\72\63\68";
|
||||||
|
}
|
||||||
|
.icons-printer:before {
|
||||||
|
content: "\70\72\69\6e\74\65\72";
|
||||||
|
}
|
||||||
|
.icons-bell:before {
|
||||||
|
content: "\62\65\6c\6c";
|
||||||
|
}
|
||||||
|
.icons-link:before {
|
||||||
|
content: "\6c\69\6e\6b";
|
||||||
|
}
|
||||||
|
.icons-flag:before {
|
||||||
|
content: "\66\61\6c\67";
|
||||||
|
}
|
||||||
|
.icons-cog:before {
|
||||||
|
content: "\63\6f\67";
|
||||||
|
}
|
||||||
|
.icons-tools:before {
|
||||||
|
content: "\74\6f\6f\6c\73";
|
||||||
|
}
|
||||||
|
.icons-tag:before {
|
||||||
|
content: "\74\61\67";
|
||||||
|
}
|
||||||
|
.icons-camera:before {
|
||||||
|
content: "\63\61\6d\65\72\61";
|
||||||
|
}
|
||||||
|
.icons-megaphone:before {
|
||||||
|
content: "\6d\65\67\61\70\68\6f\6e\65";
|
||||||
|
}
|
||||||
|
.icons-new:before {
|
||||||
|
content: "\6e\65\77";
|
||||||
|
}
|
||||||
|
.icons-graduation:before {
|
||||||
|
content: "\67\72\61\64\75\61\74\69\6f\6e";
|
||||||
|
}
|
||||||
|
.icons-books:before {
|
||||||
|
content: "\62\6f\6f\6b\73";
|
||||||
|
}
|
||||||
|
.icons-page:before {
|
||||||
|
content: "\70\61\67\65";
|
||||||
|
}
|
||||||
|
.icons-lifebuoy:before {
|
||||||
|
content: "\6c\69\66\65\62\75\6f\79";
|
||||||
|
}
|
||||||
|
.icons-eye:before {
|
||||||
|
content: "\65\79\65";
|
||||||
|
}
|
||||||
|
.icons-clock:before {
|
||||||
|
content: "\63\6c\6f\63\6b";
|
||||||
|
}
|
||||||
|
.icons-calendar:before {
|
||||||
|
content: "\63\61\6c\65\6e\64\61\72";
|
||||||
|
}
|
||||||
|
.icons-briefcase:before {
|
||||||
|
content: "\62\72\69\65\66\63\61\73\65";
|
||||||
|
}
|
||||||
|
.icons-gauge:before {
|
||||||
|
content: "\67\61\75\67\65";
|
||||||
|
}
|
||||||
|
.icons-language:before {
|
||||||
|
content: "\6c\61\6e\67\75\61\67\65";
|
||||||
|
}
|
||||||
|
.icons-keys:before {
|
||||||
|
content: "\6b\65\79\73";
|
||||||
|
}
|
||||||
|
.icons-earth:before {
|
||||||
|
content: "\65\61\72\74\68";
|
||||||
|
}
|
||||||
|
.icons-keyboard:before {
|
||||||
|
content: "\6b\65\79\62\6f\61\72\64";
|
||||||
|
}
|
||||||
|
.icons-browser:before {
|
||||||
|
content: "\62\72\6f\77\73\65\72";
|
||||||
|
}
|
||||||
|
.icons-publish:before {
|
||||||
|
content: "\70\75\62\6c\69\73\68";
|
||||||
|
}
|
||||||
|
.icons-code:before {
|
||||||
|
content: "\63\6f\64\65";
|
||||||
|
}
|
||||||
|
.icons-light-bulb:before {
|
||||||
|
content: "\6c\69\67\68\74\2d\62\75\6c\62";
|
||||||
|
}
|
||||||
|
.icons-database:before {
|
||||||
|
content: "\64\61\74\61\62\61\73\65";
|
||||||
|
}
|
||||||
|
.icons-box:before {
|
||||||
|
content: "\62\6f\78";
|
||||||
|
}
|
||||||
|
.icons-rss:before {
|
||||||
|
content: "\72\73\73";
|
||||||
|
}
|
||||||
|
.icons-clipboard:before {
|
||||||
|
content: "\63\6c\69\70\62\6f\61\72\64";
|
||||||
|
}
|
||||||
|
.icons-cart:before {
|
||||||
|
content: "\63\61\72\74";
|
||||||
|
}
|
||||||
|
.icons-untitled:before {
|
||||||
|
content: "\75\6e\74\69\74\6c\65\64";
|
||||||
|
}
|
||||||
|
.icons-statistics:before {
|
||||||
|
content: "\73\74\61\74\69\73\74\69\63\73";
|
||||||
|
}
|
||||||
|
.icons-pie:before {
|
||||||
|
content: "\70\69\65";
|
||||||
|
}
|
||||||
|
.icons-bars:before {
|
||||||
|
content: "\62\61\72\73";
|
||||||
|
}
|
||||||
|
.icons-graph:before {
|
||||||
|
content: "\67\72\61\70\68";
|
||||||
|
}
|
||||||
|
.icons-lock:before {
|
||||||
|
content: "\6c\6f\63\6b";
|
||||||
|
}
|
||||||
|
.icons-unlock:before {
|
||||||
|
content: "\75\6e\6c\6f\63\6b";
|
||||||
|
}
|
||||||
|
.icons-outlog:before {
|
||||||
|
content: "\6f\75\74\6c\6f\67";
|
||||||
|
}
|
||||||
|
.icons-inlog:before {
|
||||||
|
content: "\69\6e\6c\6f\67";
|
||||||
|
}
|
||||||
|
.icons-checkmark:before {
|
||||||
|
content: "\63\68\65\63\6b\6d\61\72\6b";
|
||||||
|
}
|
||||||
|
.icons-aminus:before {
|
||||||
|
content: "\61\6d\69\6e\75\73";
|
||||||
|
}
|
||||||
|
.icons-aplus:before {
|
||||||
|
content: "\61\70\6c\75\73";
|
||||||
|
}
|
||||||
|
.icons-aclose:before {
|
||||||
|
content: "\61\63\6c\6f\73\65";
|
||||||
|
}
|
||||||
|
.icons-bminus:before {
|
||||||
|
content: "\62\6d\69\6e\75\73";
|
||||||
|
}
|
||||||
|
.icons-bplus:before {
|
||||||
|
content: "\62\70\6c\75\73";
|
||||||
|
}
|
||||||
|
.icons-bclose:before {
|
||||||
|
content: "\62\63\6c\6f\73\65";
|
||||||
|
}
|
||||||
|
.icons-cminus:before {
|
||||||
|
content: "\63\6d\69\6e\75\73";
|
||||||
|
}
|
||||||
|
.icons-cplus:before {
|
||||||
|
content: "\63\70\6c\75\73";
|
||||||
|
}
|
||||||
|
.icons-cross:before {
|
||||||
|
content: "\63\72\6f\73\73";
|
||||||
|
}
|
||||||
|
.icons-blocked:before {
|
||||||
|
content: "\62\6c\6f\63\6b\65\64";
|
||||||
|
}
|
||||||
|
.icons-information:before {
|
||||||
|
content: "\69\6e\66\6f\72\6d\61\74\69\6f\6e";
|
||||||
|
}
|
||||||
|
.icons-binfo:before {
|
||||||
|
content: "\62\69\6e\66\6f";
|
||||||
|
}
|
||||||
|
.icons-question:before {
|
||||||
|
content: "\71\75\65\73\74\69\6f\6e";
|
||||||
|
}
|
||||||
|
.icons-help:before {
|
||||||
|
content: "\68\65\6c\70";
|
||||||
|
}
|
||||||
|
.icons-warning:before {
|
||||||
|
content: "\77\61\72\6e\69\6e\67";
|
||||||
|
}
|
||||||
|
.icons-shuffle:before {
|
||||||
|
content: "\73\68\75\66\66\6c\65";
|
||||||
|
}
|
||||||
|
.icons-return:before {
|
||||||
|
content: "\72\65\74\75\72\6e";
|
||||||
|
}
|
||||||
|
.icons-enter:before {
|
||||||
|
content: "\65\6e\74\65\72";
|
||||||
|
}
|
||||||
|
.icons-exchange:before {
|
||||||
|
content: "\65\78\63\68\61\6e\67\65";
|
||||||
|
}
|
||||||
|
.icons-loop:before {
|
||||||
|
content: "\6c\6f\6f\70";
|
||||||
|
}
|
||||||
|
.icons-th-list:before {
|
||||||
|
content: "\74\68\2d\6c\69\73\74";
|
||||||
|
}
|
||||||
|
.icons-th-large:before {
|
||||||
|
content: "\74\68\2d\6c\61\72\67\65";
|
||||||
|
}
|
||||||
|
.icons-align-justify:before {
|
||||||
|
content: "\61\6c\69\67\6e\2d\6a\75\73\74\69\66\79";
|
||||||
|
}
|
||||||
|
.icons-wtext:before {
|
||||||
|
content: "\77\74\65\78\74";
|
||||||
|
}
|
||||||
|
.icons-btext:before {
|
||||||
|
content: "\62\74\65\78\74";
|
||||||
|
}
|
||||||
|
.icons-pictures:before {
|
||||||
|
content: "\70\69\63\74\75\72\65";
|
||||||
|
}
|
||||||
|
.icons-video:before {
|
||||||
|
content: "\76\69\64\65\6f";
|
||||||
|
}
|
||||||
|
.icons-music:before {
|
||||||
|
content: "\6d\6f\75\73\65";
|
||||||
|
}
|
||||||
|
.icons-folder:before {
|
||||||
|
content: "\66\6f\6c\64\65\72";
|
||||||
|
}
|
||||||
|
.icons-archive:before {
|
||||||
|
content: "\61\72\63\68\69\76\65";
|
||||||
|
}
|
||||||
|
.icons-trash:before {
|
||||||
|
content: "\74\72\61\73\68";
|
||||||
|
}
|
||||||
|
.icons-upload:before {
|
||||||
|
content: "\75\70\6c\6f\61\64";
|
||||||
|
}
|
||||||
|
.icons-download:before {
|
||||||
|
content: "\64\6f\77\6e\6c\6f\61\64";
|
||||||
|
}
|
||||||
|
.icons-disk:before {
|
||||||
|
content: "\64\69\73\6b";
|
||||||
|
}
|
||||||
|
.icons-bookmark:before {
|
||||||
|
content: "\62\6f\6f\6b\6d\61\72\6b";
|
||||||
|
}
|
||||||
|
.icons-booma:before {
|
||||||
|
content: "\62\6f\6f\6d\61";
|
||||||
|
}
|
||||||
|
.icons-resize-enlarge:before {
|
||||||
|
content: "\72\65\73\69\7a\65\2d\65\6e\6c\61\72\67\65";
|
||||||
|
}
|
||||||
|
.icons-resize-shrink:before {
|
||||||
|
content: "\72\65\73\69\7a\65\2d\73\68\72\69\6e\6b";
|
||||||
|
}
|
||||||
|
.icons-flow-tree:before {
|
||||||
|
content: "\66\6c\6f\77\2d\74\72\65\65";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-a:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\61";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-a:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\61";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-a:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\61";
|
||||||
|
}
|
||||||
|
.icons-arrow-right-a:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\61";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-b:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\62";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-b:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\62";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-b:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\62";
|
||||||
|
}
|
||||||
|
.icons-arrow-right-b:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\62";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-c:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\63";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-c:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\63";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-c:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\63";
|
||||||
|
}
|
||||||
|
.icons-arrow-right-c:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\63";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-d:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\64";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-d:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\64";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-d:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\64";
|
||||||
|
}
|
||||||
|
.icons-arrow-right-d:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\64";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-e:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\65";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-e:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\65";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-e:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\65";
|
||||||
|
}
|
||||||
|
.icons-arrow-right-e:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\65";
|
||||||
|
}
|
||||||
|
.icons-arrow-left-f:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\6c\65\66\74\2d\66";
|
||||||
|
}
|
||||||
|
.icons-arrow-bottom-f:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\62\6f\74\74\6f\6d\2d\66";
|
||||||
|
}
|
||||||
|
.icons-arrow-top-f:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\74\6f\70\2d\66";
|
||||||
|
}
|
||||||
|
.icons-left-f:before {
|
||||||
|
content: "\61\72\72\6f\77\2d\72\69\67\68\74\2d\66";
|
||||||
|
}
|
||||||
|
.icons-menu:before {
|
||||||
|
content: "\6d\65\6e\75";
|
||||||
|
}
|
||||||
|
.icons-ellipsis:before {
|
||||||
|
content: "\65\6c\6c\69\70\73\69\73";
|
||||||
|
}
|
||||||
|
.icons-dots:before {
|
||||||
|
content: "\64\6f\74\73";
|
||||||
|
}
|
||||||
|
.icons-dot:before {
|
||||||
|
content: "\64\6f\74";
|
||||||
|
}
|
||||||
|
.icons-like:before {
|
||||||
|
content: "\6c\69\6b\65";
|
||||||
|
}
|
||||||
|
.icons-suck:before {
|
||||||
|
content: "\73\75\63\6b";
|
||||||
|
}
|
||||||
|
.icons-export:before {
|
||||||
|
content: "\65\78\70\6f\72\74";
|
||||||
|
}
|
||||||
|
.icons-vcard:before {
|
||||||
|
content: "\76\63\61\72\64";
|
||||||
|
}
|
||||||
|
.icons-flow-cascade:before {
|
||||||
|
content: "\21";
|
||||||
|
}
|
||||||
|
.icons-landscape:before {
|
||||||
|
content: "\22";
|
||||||
|
}
|
||||||
|
.icons-brush:before {
|
||||||
|
content: "\62\72\75\73\68";
|
||||||
|
}
|
||||||
|
.icons-palette:before {
|
||||||
|
content: "\70\61\6c\65\74\74\65";
|
||||||
|
}
|
||||||
|
.icons-desktop:before {
|
||||||
|
content: "\64\65\73\6b\74\6f\70";
|
||||||
|
}
|
||||||
|
.icons-plane:before {
|
||||||
|
content: "\70\6c\61\6e\65";
|
||||||
|
}
|
||||||
|
.icons-booklet:before {
|
||||||
|
content: "\62\6f\6f\6b\6c\65\74";
|
||||||
|
}
|
||||||
|
.icons-update:before {
|
||||||
|
content: "\75\70\64\61\74\65";
|
||||||
|
}
|
||||||
|
.icons-reload:before {
|
||||||
|
content: "\72\65\6c\6f\61\64";
|
||||||
|
}
|
||||||
|
.icons-unload:before {
|
||||||
|
content: "\75\6e\6c\6f\61\64";
|
||||||
|
}
|
||||||
|
.icons-trophy:before {
|
||||||
|
content: "\74\72\6f\70\68\79";
|
||||||
|
}
|
|
@ -128,8 +128,8 @@ div[data-role="page"] {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
.header .language .ui-btn-text i {
|
.header .language .ui-btn-text i {
|
||||||
font-size: 1.1em;
|
font-size: .83em;
|
||||||
margin-top: .3em;
|
margin-top: .2em;
|
||||||
}
|
}
|
||||||
.header .language .ui-icon {
|
.header .language .ui-icon {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
@ -194,28 +194,25 @@ div[data-role="page"] {
|
||||||
padding: 0 0 20px;
|
padding: 0 0 20px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
#news_content .content .newpic {
|
#announcement_content .content .newpic {
|
||||||
width: 320px;
|
width: 320px;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
#news_content .content .newstitle {
|
#announcement_content .content .newstitle {
|
||||||
font-size: 1.4em;
|
font-size: 1.4em;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
#news_content .content .newsDate {
|
#announcement_content .content .newsDate {
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
color: #8D8D8D;
|
color: #8D8D8D;
|
||||||
}
|
}
|
||||||
#news_content .content .newsummary {
|
#announcement_content .content .newsummary {
|
||||||
padding: 0 10px 20px;
|
padding: 0 10px 20px;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
#announcement_content .content {
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
#map div[data-role="content"] {
|
#map div[data-role="content"] {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*= require orbit-bar
|
*= require orbit-bar
|
||||||
*= require bootstrap-orbit
|
*= require bootstrap-orbit
|
||||||
*= require list
|
*= require list
|
||||||
*= require widgets
|
*= require widget
|
||||||
*= require scroll_style
|
*= require scroll_style
|
||||||
*= require isotope
|
*= require isotope
|
||||||
*= require icons
|
*= require icons
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
}
|
}
|
||||||
.widget-box {
|
.widget-box {
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
overflow: hidden;
|
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
margin: 0 0 5px 5px;
|
margin: 0 0 5px 5px;
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
|
@ -1,160 +0,0 @@
|
||||||
.widget-size-300 {
|
|
||||||
width:298px;
|
|
||||||
}
|
|
||||||
.widget-box {
|
|
||||||
background-color: #FFF;
|
|
||||||
overflow: hidden;
|
|
||||||
min-width: 300px;
|
|
||||||
margin: 0 0 5px 5px;
|
|
||||||
position:relative;
|
|
||||||
}
|
|
||||||
.widget-box .widget-title {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.5em;
|
|
||||||
line-height: 1.5em;
|
|
||||||
color: #FFF;
|
|
||||||
padding-left: 5px;
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
-moz-border-radius: 5px 5px 0 0;
|
|
||||||
-webkit-border-radius: 5px 5px 0 0;
|
|
||||||
background-image: -moz-linear-gradient(top, #B7B7B7, #9d9d9d);
|
|
||||||
background-image: -ms-linear-gradient(top, #B7B7B7, #9d9d9d);
|
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#B7B7B7), to(#9d9d9d));
|
|
||||||
background-image: -webkit-linear-gradient(top, #B7B7B7, #9d9d9d);
|
|
||||||
background-image: -o-linear-gradient(top, #B7B7B7, #9d9d9d);
|
|
||||||
background-image: linear-gradient(top, #B7B7B7, #9d9d9d);
|
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#B7B7B7', endColorstr='#9d9d9d', GradientType=0);
|
|
||||||
}
|
|
||||||
.widget-box .widget-title [class^="icon"] {
|
|
||||||
margin: 3px 5px 0 2px;
|
|
||||||
}
|
|
||||||
.widget-box .widget-content {
|
|
||||||
padding: 10px;
|
|
||||||
border-width: 0 1px 1px;
|
|
||||||
border-style: solid;
|
|
||||||
border-color: #CCCCCC;
|
|
||||||
border-radius: 0 0 5px 5px;
|
|
||||||
-moz-border-radius: 0 0 5px 5px;
|
|
||||||
-webkit-border-radius: 0 0 5px 5px;
|
|
||||||
}
|
|
||||||
.widget-box .form-horizontal .control-group > label {
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
.widget-box .form-horizontal .controls {
|
|
||||||
margin-left: 60px;
|
|
||||||
}
|
|
||||||
.widget-action {
|
|
||||||
position:absolute;
|
|
||||||
right:1px;
|
|
||||||
top:6px;
|
|
||||||
}
|
|
||||||
.action {
|
|
||||||
float: left;
|
|
||||||
display:inline-block;
|
|
||||||
margin-right: 5px;
|
|
||||||
opacity: 0.8;
|
|
||||||
filter: alpha(opacity=80);
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
.action:hover {
|
|
||||||
opacity: 1;
|
|
||||||
filter: alpha(opacity=80);
|
|
||||||
cursor: pointer;
|
|
||||||
color: #FFF;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.select-role {
|
|
||||||
display:none;
|
|
||||||
padding: 10px 0;
|
|
||||||
}
|
|
||||||
.file-upload {
|
|
||||||
position:relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.file-upload .file-name {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px 1px 1px 0;
|
|
||||||
border-color: #CCC;
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
padding: 4px 10px;
|
|
||||||
height: 18px;
|
|
||||||
line-height: 18px;
|
|
||||||
-webkit-border-radius: 0 3px 3px 0;
|
|
||||||
-moz-border-radius: 0 3px 3px 0;
|
|
||||||
border-radius: 0 3px 3px 0;
|
|
||||||
text-align: left;
|
|
||||||
margin: 0;
|
|
||||||
width: 193px;
|
|
||||||
}
|
|
||||||
.file-upload .upload {
|
|
||||||
margin:0;
|
|
||||||
padding:0;
|
|
||||||
position:absolute;
|
|
||||||
top: 0;
|
|
||||||
left:0;
|
|
||||||
opacity:.0;
|
|
||||||
font-size: 60px;
|
|
||||||
left: -595px/9;
|
|
||||||
filter: alpha(opacity= 0);
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
.file-upload .upload:focus {
|
|
||||||
position:absolute;
|
|
||||||
}
|
|
||||||
.file-upload .input-medium {
|
|
||||||
border-radius: 3px 3px 3px 3px !important;
|
|
||||||
width: 267px;
|
|
||||||
position: relative;
|
|
||||||
z-index: 5;
|
|
||||||
display: block;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.file-upload .control-label {
|
|
||||||
margin-top: 0;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.upload-picture {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
text-align: center;
|
|
||||||
width: 276px;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 90px;
|
|
||||||
}
|
|
||||||
.upload-picture img {
|
|
||||||
left: 0;
|
|
||||||
margin-top: -15%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.widget-box .widgetInfo {
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
width: 255px;
|
|
||||||
margin : 0px 0 5px;
|
|
||||||
padding: 5px 10px;
|
|
||||||
}
|
|
||||||
#widget-link table {
|
|
||||||
margin-bottom:0
|
|
||||||
}
|
|
||||||
/*Date*/
|
|
||||||
.showDate {
|
|
||||||
border-style: solid;
|
|
||||||
border-width: 1px 0 1px 1px;
|
|
||||||
border-color: #CCC;
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
padding: 4px 10px;
|
|
||||||
height: 18px;
|
|
||||||
line-height: 18px;
|
|
||||||
-webkit-border-radius: 3px 0 0 3px;
|
|
||||||
-moz-border-radius: 3px 0 0 3px;
|
|
||||||
border-radius: 3px 0 0 3px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.calendarInput {
|
|
||||||
position: absolute;
|
|
||||||
visibility: hidden;
|
|
||||||
left: 11px;
|
|
||||||
}
|
|
|
@ -40,9 +40,10 @@ class Admin::InfosController < ApplicationController
|
||||||
@attribute.update_attributes(params[:info])
|
@attribute.update_attributes(params[:info])
|
||||||
@attribute.attribute_fields.each{|t| t.destroy if t["to_delete"] == true}
|
@attribute.attribute_fields.each{|t| t.destroy if t["to_delete"] == true}
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to :action => :index }
|
format.html { redirect_to(edit_admin_info_path(params[:id])) }
|
||||||
format.js { render 'admin/attributes/toggle_enable' }
|
format.js { render 'admin/attributes/toggle_enable' }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|
|
@ -3,7 +3,7 @@ class Admin::ModuleAppsController < ApplicationController
|
||||||
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
|
before_filter :user_has_sub_manager_privilege?, :only => [ :assign_sub_manager, :remove_sub_manager ]
|
||||||
|
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
|
helper Admin::PagePartsHelper
|
||||||
def index
|
def index
|
||||||
@module_apps = ModuleApp.all.entries
|
@module_apps = ModuleApp.all.entries
|
||||||
end
|
end
|
||||||
|
|
|
@ -3,7 +3,7 @@ class Admin::RolesController < ApplicationController
|
||||||
layout "new_admin"
|
layout "new_admin"
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
before_filter :is_admin?
|
before_filter :is_admin?
|
||||||
before_filter :set_attribute, :only => [:index, :show, :new, :edit]
|
before_filter :set_attribute, :only => [:index, :show, :new, :edit, :role_field, :sub_role, :add_sub_role, :edit_sub_role, :sub_role_field]
|
||||||
helper Admin::AttributeValuesViewHelper
|
helper Admin::AttributeValuesViewHelper
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
@ -13,13 +13,100 @@ class Admin::RolesController < ApplicationController
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def role_field
|
||||||
|
|
||||||
|
@field_name = 'role'
|
||||||
|
|
||||||
|
@attribute = Role.find(params[:role_id])
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def sub_role
|
||||||
|
|
||||||
|
@attribute = Role.find(params[:role_id])
|
||||||
|
@attribute_fields_upper_object = @attribute.sub_roles
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_sub_role
|
||||||
|
|
||||||
|
@attribute = Role.find(params[:role_id])
|
||||||
|
# @sub_attribute = Role.find(params[:role_id])
|
||||||
|
|
||||||
|
@sub_attribute = SubRole.new
|
||||||
|
@sub_attribute.role_id = params[:role_id]
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit_sub_role
|
||||||
|
|
||||||
|
@sub_attribute = SubRole.find(params[:role_id])
|
||||||
|
|
||||||
|
@attribute = Role.find(@sub_attribute.role_id)
|
||||||
|
|
||||||
|
@sub_attribute.role_id = @sub_attribute.role_id
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def sub_role_field
|
||||||
|
|
||||||
|
@field_name = 'sub_role'
|
||||||
|
|
||||||
|
@sub_attribute = SubRole.find(params[:role_id])
|
||||||
|
|
||||||
|
@attribute = Role.find(@sub_attribute.role_id)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
def add_attribute_field
|
||||||
|
|
||||||
|
if params[:sub_role]
|
||||||
|
|
||||||
|
@field_name = 'sub_role'
|
||||||
|
|
||||||
|
attribute = SubRole.find(params[:sub_role][:id]) rescue nil
|
||||||
|
@attribute_field_counter = attribute.attribute_fields.count
|
||||||
|
@attribute_field = attribute.attribute_fields.build
|
||||||
|
@attribute_field.save
|
||||||
|
|
||||||
|
@attribute_field[:af_count] = @attribute_field_counter
|
||||||
|
|
||||||
|
@attribute = SubRole.find(params[:sub_role][:id])
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
@field_name = 'role'
|
||||||
|
|
||||||
|
attribute = Role.find(params[:role_id]) rescue nil
|
||||||
|
@attribute_field_counter = attribute.attribute_fields.count
|
||||||
|
@attribute_field = attribute.attribute_fields.build
|
||||||
|
@attribute_field.save
|
||||||
|
|
||||||
|
@attribute_field[:af_count] = @attribute_field_counter
|
||||||
|
|
||||||
|
@attribute = Role.find(params[:role_id])
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.js { render 'add_attribute_field' }
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@attribute = Role.new
|
@attribute = Role.new
|
||||||
|
|
||||||
|
if !params[:parent_id]
|
||||||
render :template => 'admin/attributes/new'
|
render :template => 'admin/attributes/new'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@attribute = Role.find(params[:id])
|
@attribute = Role.find(params[:id])
|
||||||
@attribute_fields_upper_object = @attribute.sub_roles
|
@attribute_fields_upper_object = @attribute.sub_roles
|
||||||
|
@ -27,24 +114,75 @@ class Admin::RolesController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
||||||
|
if params[:sub_role]
|
||||||
|
|
||||||
|
@sub_role = SubRole.new(params[:sub_role])
|
||||||
|
|
||||||
|
# @sub_role.role_id = params[:id]
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @sub_role.save
|
||||||
|
format.html { redirect_to(admin_role_sub_role_url(params[:sub_role][:role_id])) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
@attribute = Role.new(params[:role])
|
@attribute = Role.new(params[:role])
|
||||||
@attribute.save
|
@attribute.save
|
||||||
redirect_to :action => :index
|
redirect_to :action => :index
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
||||||
|
if params[:sub_role]
|
||||||
|
|
||||||
|
@sub_role = SubRole.find(params[:sub_role][:id])
|
||||||
|
@sub_role.update_attributes(params[:sub_role])
|
||||||
|
@sub_role.attribute_fields.each{|t| t.destroy if t["to_delete"] == true}
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) }
|
||||||
|
format.js { render 'toggle_enable' }
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
@attribute = Role.find(params[:id])
|
@attribute = Role.find(params[:id])
|
||||||
@attribute.update_attributes(params[:role])
|
@attribute.update_attributes(params[:role])
|
||||||
|
@attribute.attribute_fields.each{|t| t.destroy if t["to_delete"] == true}
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html { redirect_to :action => :index }
|
format.html { redirect_to :action => :index }
|
||||||
format.js { render 'admin/attributes/toggle_enable' }
|
format.js { render 'admin/attributes/toggle_enable' }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
|
|
||||||
|
if params[:sub_role]
|
||||||
|
|
||||||
|
@sub_role = SubRole.find(params[:sub_role][:id])
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @sub_role.destroy
|
||||||
|
format.html { redirect_to(admin_role_sub_role_url(@sub_role.role_id)) }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
@attribute = Role.find(params[:id])
|
@attribute = Role.find(params[:id])
|
||||||
@attribute.destroy
|
@attribute.destroy
|
||||||
redirect_to :action => :index
|
redirect_to :action => :index
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
class Admin::SubRolesController < RolesController
|
||||||
|
|
||||||
|
|
||||||
|
end
|
|
@ -1,18 +0,0 @@
|
||||||
class Desktop::JournalListsController < ApplicationController
|
|
||||||
def index
|
|
||||||
level_types = JournalLevelType.all
|
|
||||||
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
|
||||||
all_journal_lists = all_journal_lists.map do |j|
|
|
||||||
[ j.journal_title,
|
|
||||||
j.journal_level_type_ids.map do |type|
|
|
||||||
level_types.find(type).title
|
|
||||||
end]
|
|
||||||
end
|
|
||||||
|
|
||||||
@journal_lists = all_journal_lists.uniq
|
|
||||||
|
|
||||||
respond_to do |format|
|
|
||||||
format.html { render :layout => false}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -117,8 +117,8 @@ class DesktopController< ApplicationController
|
||||||
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
widge = DesktopWidget.find(tile.desktop_widget_id.to_s)
|
||||||
# data_content = widge.widget_layout.file
|
# data_content = widge.widget_layout.file
|
||||||
data_content = "/desktop/widget_layout?id="+tile.desktop_widget_id.to_s
|
data_content = "/desktop/widget_layout?id="+tile.desktop_widget_id.to_s
|
||||||
jsfile = widge.javascripts.collect{|js| js.file}
|
jsfile = widge.javascripts.collect{|js| js.file.as_json[:file]}
|
||||||
cssfile = widge.css_default.file
|
cssfile = widge.css_default.file.as_json[:file]
|
||||||
shape = widge.shape
|
shape = widge.shape
|
||||||
title = widge.name
|
title = widge.name
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
require 'mime/types'
|
require 'mime/types'
|
||||||
|
|
||||||
class DesktopPublicationsController< ApplicationController
|
class DesktopPublicationsController< ApplicationController
|
||||||
def journal_p
|
#def journal_p
|
||||||
render "desktop/journal_p", :layout => false
|
# render "desktop/journal_p", :layout => false
|
||||||
end
|
#end
|
||||||
|
|
||||||
def books
|
def books
|
||||||
render "desktop/books", :layout => false
|
render "desktop/books", :layout => false
|
||||||
|
|
|
@ -2,6 +2,8 @@ class MobileController < ApplicationController
|
||||||
|
|
||||||
layout 'mobile'
|
layout 'mobile'
|
||||||
|
|
||||||
|
before_filter :no_footer_for_app
|
||||||
|
|
||||||
def index
|
def index
|
||||||
date_now = Time.now
|
date_now = Time.now
|
||||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
|
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page(params[:page_main]).per(15)
|
||||||
|
@ -49,4 +51,10 @@ class MobileController < ApplicationController
|
||||||
@page_title = @page_context.page.title
|
@page_title = @page_context.page.title
|
||||||
end
|
end
|
||||||
|
|
||||||
|
protected
|
||||||
|
|
||||||
|
def no_footer_for_app
|
||||||
|
@no_footer = true if request.path.starts_with?("/app")
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -149,7 +149,7 @@ protected
|
||||||
link_entry_ary = [".#{get_pairing_tab_class({})}",".#{key}"]
|
link_entry_ary = [".#{get_pairing_tab_class({})}",".#{key}"]
|
||||||
link_entry_ary << ".add_more_item_#{add_more_counter}" if can_add_more
|
link_entry_ary << ".add_more_item_#{add_more_counter}" if can_add_more
|
||||||
link_entry = link_entry_ary.join
|
link_entry = link_entry_ary.join
|
||||||
content_tag(:li,link_to(I18n.t("langs."+key),link_entry,:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil),:for=>key)
|
content_tag(:li,link_to(I18nVariable.from_locale(key),link_entry,:data=>{:toggle=>"tab"}),:class=>(key == I18n.locale.to_s ? "active" : nil),:for=>key)
|
||||||
end.join.html_safe # of VALID_LOCALES.collect for tabs
|
end.join.html_safe # of VALID_LOCALES.collect for tabs
|
||||||
end # of content ul
|
end # of content ul
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
module Desktop::CoAuthorRelationsHelper
|
|
||||||
end
|
|
|
@ -1,2 +0,0 @@
|
||||||
module Desktop::JournalListsHelper
|
|
||||||
end
|
|
|
@ -2,8 +2,8 @@ module FrontHelper
|
||||||
|
|
||||||
def ad_image_link(ad_image)
|
def ad_image_link(ad_image)
|
||||||
link = ad_image.out_link
|
link = ad_image.out_link
|
||||||
link =front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank?
|
link = front_show_inner_ad_image_path(:id=> ad_image.id) if link.blank? && !ad_image.context.blank?
|
||||||
|
link
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -6,6 +6,9 @@ class AdImage
|
||||||
|
|
||||||
field :title, localize: true
|
field :title, localize: true
|
||||||
field :context, localize: true
|
field :context, localize: true
|
||||||
|
field :to_save, :type => Boolean
|
||||||
|
field :to_destroy, :type => Boolean
|
||||||
|
|
||||||
|
|
||||||
field :direct_to_after_click,type: Boolean
|
field :direct_to_after_click,type: Boolean
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ class Attribute
|
||||||
field :disabled, :type => Boolean, :default => false
|
field :disabled, :type => Boolean, :default => false
|
||||||
field :title, localize: true
|
field :title, localize: true
|
||||||
|
|
||||||
|
field :to_search, :type => Boolean, :default => false
|
||||||
|
|
||||||
has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
||||||
accepts_nested_attributes_for :attribute_fields, :allow_destroy => true
|
accepts_nested_attributes_for :attribute_fields, :allow_destroy => true
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@ class AttributeField
|
||||||
field :built_in, :type => Boolean, :default => false
|
field :built_in, :type => Boolean, :default => false
|
||||||
field :disabled, :type => Boolean, :default => false
|
field :disabled, :type => Boolean, :default => false
|
||||||
field :to_delete,:type=> Boolean,:default => false
|
field :to_delete,:type=> Boolean,:default => false
|
||||||
|
|
||||||
|
field :to_search,:type=> Boolean,:default => false
|
||||||
|
|
||||||
field :typeA,:type=> Hash,:default=>{:cross_lang=>false}
|
field :typeA,:type=> Hash,:default=>{:cross_lang=>false}
|
||||||
field :typeB,:type=> Hash,:default=>{}
|
field :typeB,:type=> Hash,:default=>{}
|
||||||
field :typeC,:type=> Hash,:default=>{:calendar=>"west_calendar",:format=>"format3"}
|
field :typeC,:type=> Hash,:default=>{:calendar=>"west_calendar",:format=>"format3"}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class Role
|
class Role < Attribute
|
||||||
|
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
include Mongoid::Timestamps
|
include Mongoid::Timestamps
|
||||||
|
@ -6,12 +6,13 @@ class Role
|
||||||
field :key
|
field :key
|
||||||
field :built_in, :type => Boolean, :default => false
|
field :built_in, :type => Boolean, :default => false
|
||||||
field :disabled, :type => Boolean, :default => false
|
field :disabled, :type => Boolean, :default => false
|
||||||
|
|
||||||
field :title, localize: true
|
field :title, localize: true
|
||||||
|
|
||||||
has_many :sub_roles, :autosave => true, :dependent => :destroy
|
has_many :sub_roles, :autosave => true, :dependent => :destroy
|
||||||
has_many :users
|
has_many :users
|
||||||
has_many :statuses, :autosave => true, :dependent => :destroy
|
has_many :statuses, :autosave => true, :dependent => :destroy
|
||||||
has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
# has_many :attribute_fields, :autosave => true, :dependent => :destroy
|
||||||
accepts_nested_attributes_for :sub_roles, :allow_destroy => true
|
accepts_nested_attributes_for :sub_roles, :allow_destroy => true
|
||||||
|
|
||||||
def is_built_in?
|
def is_built_in?
|
||||||
|
|
|
@ -72,14 +72,32 @@ class User
|
||||||
sub_roles.where(role_id: role.id)
|
sub_roles.where(role_id: role.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def disable_sub_role=(var)
|
def disable_role=(var)
|
||||||
var[:id].each do |id,val|
|
var[:id].each do |id,val|
|
||||||
# binding.pry if id == '5052c5b22b5c49ab02000004'
|
# binding.pry if id == '5052c5b22b5c49ab02000004'
|
||||||
if (val=="true")
|
if (val=="true")
|
||||||
|
self.roles = self.roles.reject{|t| t.id.to_s==id}
|
||||||
|
elsif(val=="false")
|
||||||
|
self.roles << Role.find(id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def disable_sub_role=(var)
|
||||||
|
var[:id].each do |id,val|
|
||||||
|
|
||||||
|
@sr = SubRole.find(id)
|
||||||
|
|
||||||
|
@roid = Role.find(@sr.role_id.to_s)
|
||||||
|
|
||||||
|
# binding.pry if id == '5052c5b22b5c49ab02000004'
|
||||||
|
|
||||||
|
if ( self.roles.include?(@roid) == false or val=="true")
|
||||||
self.sub_roles = self.sub_roles.reject{|t| t.id.to_s==id}
|
self.sub_roles = self.sub_roles.reject{|t| t.id.to_s==id}
|
||||||
elsif(val=="false")
|
elsif(val=="false")
|
||||||
self.sub_roles << SubRole.find(id)
|
self.sub_roles << SubRole.find(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -189,7 +207,8 @@ class User
|
||||||
|
|
||||||
protected
|
protected
|
||||||
def save_roles
|
def save_roles
|
||||||
self.roles = self.sub_roles.collect{|t| t.role}.uniq
|
# self.roles = self.sub_roles.collect{|t| t.role}.uniq
|
||||||
|
self.roles = self.roles.uniq
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
<!--Widget start-->
|
<!--Widget start-->
|
||||||
<div id="sub-wiget">
|
<div id="sub-wiget">
|
||||||
<div id="widget-date" class="widget-box">
|
<div id="widget-date" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="<%= t('ad.set_dates') %>">
|
||||||
<a href="#" class="action"><i title="<%= t('ad.set_dates') %>" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a href="#" class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-calendar"></i><%= t(:date_) %></h3>
|
<h3 class="widget-title"><i class="icons-calendar"></i><%= t(:date_) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-picture" class="widget-box">
|
<div id="widget-picture" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="<%= t('ad.upload_pictures') %>" >
|
||||||
<a class="action"><i title="<%= t('ad.upload_pictures') %>" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><iclass="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-pictures"></i><%= t(:picture) %></h3>
|
<h3 class="widget-title"><i class="icons-pictures"></i><%= t(:picture) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -49,8 +49,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-type" class="widget-box">
|
<div id="widget-type" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="<%= t('ad.select_fx') %>">
|
||||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.select_fx') %>"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-target"></i><%= t(:type) %></h3>
|
<h3 class="widget-title"><i class="icons-target"></i><%= t(:type) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -59,8 +59,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-time" class="widget-box widget-size-300">
|
<div id="widget-time" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="<%= t('ad.set_range') %>">
|
||||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.set_range') %>"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-time"></i><%= t(:frequency) %></h3>
|
<h3 class="widget-title"><i class="icons-time"></i><%= t(:frequency) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-link" class="widget-box widget-size-300">
|
<div id="widget-link" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="<%= t('ad.add_link') %>">
|
||||||
<a class="action"><i class="icon-exclamation-sign icon-white tip" data-original-title="<%= t('ad.add_link') %>"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-link"></i><%= t(:link) %></h3>
|
<h3 class="widget-title"><i class="icons-link"></i><%= t(:link) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<div class="map-block back attributes">
|
||||||
|
<h4><span><%= attribute_field_list.title+ t("admin.attributes")%></span></h4>
|
||||||
|
<%= render :partial=>"shared/attribute_field/attribute_field",:collection=>attribute_field_list.attribute_fields%>
|
||||||
|
</div>
|
|
@ -1,9 +1,28 @@
|
||||||
<%= form_for @attribute,:url => admin_info_path(@attribute) ,:class=> "form-horizontal" do |f| %>
|
<% content_for :side_bar do %>
|
||||||
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
||||||
<div class="site-map role-block">
|
<div class="site-map role-block">
|
||||||
<div class="map-block back">
|
<div class="map-block back">
|
||||||
<h4><span><%= t(:info)%></span></h4>
|
<h4><span><%= t(eval(":#{@attribute_type}"))%></span></h4>
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, true %>
|
||||||
|
Yes
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, false %>
|
||||||
|
No
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="control-group pull-left">
|
<div class="control-group pull-left">
|
||||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
@ -14,10 +33,11 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"info[title_translations]"}%>
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% if @attribute._type == "Info" %>
|
||||||
|
|
||||||
<div class="map-block back attributes">
|
<div class="map-block back attributes">
|
||||||
<h4><span><%= @attribute.title+ t(:attributes)%></span></h4>
|
<h4><span><%= @attribute.title+ t(:attributes)%></span></h4>
|
||||||
|
@ -26,11 +46,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="add-attributes form-actions pagination-right">
|
||||||
|
<%= ( link_to content_tag(:i,t(:add_attribute_field),:class=>"icon-plus icon-white"),admin_info_add_attribute_field_path(@attribute),:class=>"btn btn-primary",:remote => true )%>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-actions form-fixed pagination-right">
|
<div class="form-actions form-fixed pagination-right">
|
||||||
<%= link_to content_tag(:i,t(:add_attribute_field),:class=>"icon-plus icon-white"),admin_info_add_attribute_field_path(@attribute),:class=>"btn btn-primary",:remote => true%>
|
|
||||||
<%= f.submit t(:save),:class=>"btn btn-primary"%>
|
<%= f.submit t(:save),:class=>"btn btn-primary"%>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% content_for :page_specific_css do -%>
|
<% content_for :page_specific_css do -%>
|
||||||
|
|
|
@ -1,39 +1,58 @@
|
||||||
<% content_for :secondary do %>
|
<% content_for :side_bar do %>
|
||||||
<%= render 'admin/users_new_interface/side_bar' %>
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="main_list">
|
|
||||||
<div class="button_bar up">
|
|
||||||
<%= link_to t("new.#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
<div class="subnav">
|
||||||
|
<div id="accordion">
|
||||||
|
<div class="accordion-group filters">
|
||||||
|
<div class="table-label">
|
||||||
|
<table class="table main-list">
|
||||||
|
<thead>
|
||||||
|
<tr class="sort-header">
|
||||||
|
<th id="sort-name" class="sort span1-2 select active"><span><a href="#"><%= t("#{@attribute_type}") %><b class="web-symbol"></b></a></span></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<table>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table main-list member-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="<%= @attribute_type %>s"><%= t("#{@attribute_type}") %></td>
|
<th class="span1-2"></th>
|
||||||
<td class="action"><%= t(:action) %></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<% @attributes.each do |attribute| %>
|
|
||||||
<tr id="attribute_<%= attribute.id %>" class="have <%= "#{attribute.is_disabled? ? 'disable' : ''}" %>">
|
|
||||||
<td class="<%= @attribute_type %>s <%= attribute.key.downcase %>"><%= attribute.title %></span>
|
|
||||||
<td class="action">
|
|
||||||
|
|
||||||
<%= link_to t(:edit), eval("edit_admin_#{@attribute_type}_path(attribute)"), :class => 'edit' %>
|
<% @attributes.each do |attribute| %>
|
||||||
<%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %>
|
<tr class="with_action">
|
||||||
<%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %>
|
<td class="span1-2">
|
||||||
<% if !attribute.is_built_in? %>
|
<%= attribute.title %>
|
||||||
<%= link_to t(:delete_), eval("admin_#{@attribute_type}_path(attribute)"), :class => 'delete', :confirm => t('sure?'), :method => :delete %>
|
<div class="quick-edit">
|
||||||
|
<ul class="nav nav-pills hide">
|
||||||
|
<li><%= link_to t(:edit), eval("edit_admin_#{@attribute_type}_path(attribute)") %></li>
|
||||||
|
<% if @attribute_type == 'role' %>
|
||||||
|
<li><%= link_to t(:role_field), eval("admin_#{@attribute_type}_role_field_path(attribute)") %></li>
|
||||||
|
<li><%= link_to t(:sub_role), eval("admin_#{@attribute_type}_sub_role_path(attribute)") %></li>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => true})"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
|
||||||
|
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :#{@attribute_type} => {:disabled => false})"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
|
||||||
|
|
||||||
|
<% if !attribute.is_built_in? %>
|
||||||
|
<li><%= link_to t(:delete_), eval("admin_#{@attribute_type}_path(attribute)"), :class => 'delete', :confirm => t('sure?'), :method => :delete %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td colspan="5"></td>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="button_bar">
|
<div class="form-actions form-fixed pagination-right">
|
||||||
<%= link_to t("new.#{@attribute_type}"), eval("new_admin_#{@attribute_type}_path"), :class => 'new' %>
|
<%= link_to content_tag(:i,t("new.#{@attribute_type}"),:class=>"icon-plus icon-white"),eval("new_admin_#{@attribute_type}_path"),:class=>"btn btn-primary pull-right"%>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,14 +1,49 @@
|
||||||
<% content_for :secondary do %>
|
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}s_path") ,:class=> "form-horizontal" do |f| %>
|
||||||
<%= render 'admin/users_new_interface/side_bar' %>
|
<div class="site-map role-block">
|
||||||
<% end %>
|
<div class="map-block back">
|
||||||
|
<h4><span><%= t(eval(":#{@attribute_type}"))%></span></h4>
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="clear">
|
||||||
|
|
||||||
<div id="profile">
|
<div class="control-group pull-left">
|
||||||
<%= form_for @attribute, :url => eval("admin_#{@attribute_type}s_path") do |f| %>
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
<%= f.error_messages %>
|
<div class="controls">
|
||||||
<%= render :partial => "admin/#{@attribute_type}s/form", :locals => { :f => f, :is_new => true } %>
|
<label class="radio inline">
|
||||||
<div class="button_bar">
|
<%= f.radio_button :to_search, true %>
|
||||||
<%= link_back %>
|
Yes
|
||||||
<%= link_to t('create'), "#", :onclick=>"$('#new_#{@attribute_type}').submit()" %>
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, false %>
|
||||||
|
No
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<% end -%>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<% if @attribute.new_record? %>
|
||||||
|
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||||
|
<% else %>
|
||||||
|
<div><%= @attribute.key%></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"#{@attribute_type}[title_translations]"}%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<% content_for :page_specific_css do -%>
|
||||||
|
<%= stylesheet_link_tag "member" %>
|
||||||
|
<%= stylesheet_link_tag "site-map" %>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,121 @@
|
||||||
|
<div class="form-horizontal <%= attribute_field.disabled ? 'disabled' : ''%>">
|
||||||
|
<%
|
||||||
|
attribute_field.af_count ? @af_counter = attribute_field_counter + attribute_field.af_count : @af_counter = attribute_field_counter
|
||||||
|
%>
|
||||||
|
<%= @af_counter + 1 %>
|
||||||
|
<%#= attribute_field_counter %>
|
||||||
|
<legend>
|
||||||
|
<button class="onoff pull-right <%= attribute_field.disabled ? 'disabled' : ''%>"><%= attribute_field.disabled ? 'OFF' : 'ON'%></button>
|
||||||
|
<%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","disabled",:value=>attribute_field.disabled,:class=>"attribute_field_disabled"%>
|
||||||
|
<%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%>
|
||||||
|
<a class="btn btn-small pull-right btn-danger remove_attribute"><i class="icon-trash icon-large"></i> <%= t(:delete_)%></a>
|
||||||
|
<div class="clear">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}]", "to_search", "true",:checked => (attribute_field.to_search == true ? true : false)) %><%= t(:yes_)%>
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}]", "to_search", "false",:checked => (attribute_field.to_search == false ? true : false)) %><%= t(:no_)%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
|
<div class="multipleInput">
|
||||||
|
<div class="controls">
|
||||||
|
<%= text_field "#{@field_name}[attribute_fields][#{@af_counter}]","key",:value=>attribute_field.key%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field.title_translations,:class_ext=>"pull-left",:label_ext=>t(:name),:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][title_translations]"}%>
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for=""><%= t(:type)%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%#= select_tag "#{@field_name}[attribute_fields][#{@af_counter}][markup]" do %>
|
||||||
|
<select class="dataType" name=<%= "#{@field_name}[attribute_fields][#{@af_counter}][markup]"%>>
|
||||||
|
<%LIST[:markups].each do |key,val|%>
|
||||||
|
<option value="<%= key %>" <%= attribute_field.markup == key ? 'selected="selected"' : '' %> ref="<%=val["panel"]%>"><%=t("lists.markups."+key)%></option >
|
||||||
|
<% end %>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</legend>
|
||||||
|
<div class="<%= attribute_field.disabled ? 'hide' : ''%>">
|
||||||
|
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeA") do%>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"><%= t(:options)%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<%= check_box_tag("#{@field_name}[attribute_fields][#{@af_counter}][typeA][cross_lang]","true",attribute_field["typeA"]["cross_lang"]) %>
|
||||||
|
<%= t(:cross_lang)%>
|
||||||
|
</label>
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<%= check_box_tag("#{@field_name}[attribute_fields][#{@af_counter}][typeA][add_more]","true",attribute_field["typeA"]["add_more"]) %>
|
||||||
|
<%= t(:add_more)%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>attribute_field["typeA"]["placeholder"],:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][typeA][placeholder]"}%>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeB") do %>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:label_ext=>t(:initial),:values=>attribute_field["typeB"]["initial"],:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][typeB][initial]"}%>
|
||||||
|
|
||||||
|
<% if attribute_field.self_defined_markup_options?%>
|
||||||
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:values=>attribute_field["option_list"],:field_name=> "#{@field_name}[attribute_fields][#{@af_counter}][attribute][role][statuses]"} %>
|
||||||
|
<%else #normal list%>
|
||||||
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:values=>attribute_field["option_list"],:field_name=> "#{@field_name}[attribute_fields][#{@af_counter}][typeB][option_list]"} %>
|
||||||
|
<% end #of self_defined_markup_options?%>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeC") do %>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"><%= t("date.format")%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= select "#{@field_name}[attribute_fields][#{@af_counter}][typeC]","format",Admin::AttributeValuesViewHelper::OPT,:class=>"dataType",:selected=>attribute_field["typeC"]["format"] %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"><%= t("date.range")%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}][typeC]", "is_range", "false",:checked => (!attribute_field.date_is_range? ? true : false)) %><%= t(:yes_)%>
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}][typeC]", "is_range", "true",:checked => (attribute_field.date_is_range? ? true : false)) %><%= t(:no_)%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"><%= t("date.calendar")%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}][typeC]", "calendar", "west_calendar",:checked =>(attribute_field["typeC"]["calendar"]== "west_calendar" ? true : false)) %><%= t("date.west_calendar")%>
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("#{@field_name}[attribute_fields][#{@af_counter}][typeC]", "calendar", "tw_calendar",:checked =>(attribute_field["typeC"]["calendar"]== "tw_calendar" ? true : false)) %><%= t("date.tw_calendar")%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeD") do%>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label"><%= t(:options)%></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="checkbox inline">
|
||||||
|
<%= check_box_tag("#{@field_name}[attribute_fields][#{@af_counter}][typeD][cross_lang]","true",attribute_field["typeD"]["cross_lang"]) %>
|
||||||
|
<%= t(:cross_lang)%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][typeD][placeholder]",:values=>attribute_field["typeD"]["placeholder"]} %>
|
||||||
|
<% end %>
|
||||||
|
<%= content_tag :div,:class=>show_type_panel(attribute_field,"typeE") do%>
|
||||||
|
<%= render :partial=>"shared/attribute_field/list_block",:locals=>{:field_name=>"#{@field_name}[attribute_fields][#{@af_counter}][typeE][option_list]",:values=>attribute_field["option_list"]}%>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
<%= hidden_field "#{@field_name}[attribute_fields][#{@af_counter}]","id",:value=>attribute_field.id%>
|
||||||
|
</div>
|
|
@ -0,0 +1 @@
|
||||||
|
$('<%= j render :partial => 'attribute_field', :collection => [@attribute_field] %>').appendTo('#attribute_field_list').hide().fadeIn();
|
|
@ -0,0 +1,51 @@
|
||||||
|
<%= form_for @sub_attribute,:url => eval("admin_#{@attribute_type}s_path") ,:class=> "form-horizontal" do |f| %>
|
||||||
|
<div class="site-map role-block">
|
||||||
|
<div class="map-block back">
|
||||||
|
<h4><span><%= t(eval(":#{@attribute_type}"))%>:<%= @attribute.title %></span></h4>
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="clear">
|
||||||
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, true %>
|
||||||
|
Yes
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, false %>
|
||||||
|
No
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<% if @sub_attribute.new_record? %>
|
||||||
|
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||||
|
<% else %>
|
||||||
|
<div><%= @sub_attribute.key%></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@sub_attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"sub_role[title_translations]"}%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%#= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= f.hidden_field :role_id, :value => params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<% content_for :page_specific_css do -%>
|
||||||
|
<%= stylesheet_link_tag "member" %>
|
||||||
|
<%= stylesheet_link_tag "site-map" %>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,52 @@
|
||||||
|
<%= form_for @sub_attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
||||||
|
<div class="site-map role-block">
|
||||||
|
<div class="map-block back">
|
||||||
|
<h4><span><%= t(eval(":#{@attribute_type}"))%>:<%= @attribute.title %></span></h4>
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="clear">
|
||||||
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, true %>
|
||||||
|
Yes
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= f.radio_button :to_search, false %>
|
||||||
|
No
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="control-group pull-left">
|
||||||
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<% if @sub_attribute.new_record? %>
|
||||||
|
<%= f.text_field :key, :placeholder => t(:key) %>
|
||||||
|
<% else %>
|
||||||
|
<div><%= @sub_attribute.key%></div>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<%= render :partial=>"shared/attribute_field/placeholder_block",:locals=>{:values=>@sub_attribute.title_translations,:class_ext=>"pull-left",:label_ext=>t(:item_name),:field_name=>"sub_role[title_translations]"}%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%#= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= f.hidden_field :id %>
|
||||||
|
<%#= f.hidden_field :role_id, :value => @attribute.id if !params[:role_id].blank? %>
|
||||||
|
<%= f.submit t('submit'), :class=>'btn btn-primary' %>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<% content_for :page_specific_css do -%>
|
||||||
|
<%= stylesheet_link_tag "member" %>
|
||||||
|
<%= stylesheet_link_tag "site-map" %>
|
||||||
|
<% end %>
|
|
@ -0,0 +1 @@
|
||||||
|
111
|
|
@ -0,0 +1,128 @@
|
||||||
|
<% content_for :side_bar do %>
|
||||||
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
||||||
|
<div class="site-map role-block">
|
||||||
|
|
||||||
|
<div class="map-block back attributes">
|
||||||
|
<h4><span><%= @attribute.title+ t(:attributes)%></span></h4>
|
||||||
|
<div id="attribute_field_list">
|
||||||
|
<%= render :partial=>"attribute_field",:collection=>@attribute.attribute_fields%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="add-attributes form-actions pagination-right">
|
||||||
|
<%= link_to content_tag(:i,t(:add_attribute_field),:class=>"icon-plus icon-white"),admin_role_add_attribute_field_path(@attribute),:class=>"btn btn-primary",:remote => true%>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= hidden_field_tag 'id', params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= f.submit t(:save),:class=>"btn btn-primary"%>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :page_specific_css do -%>
|
||||||
|
<%= stylesheet_link_tag "member" %>
|
||||||
|
<%= stylesheet_link_tag "site-map" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :page_specific_javascript do -%>
|
||||||
|
<script>
|
||||||
|
var CloneTarget ;
|
||||||
|
|
||||||
|
var NewNode;
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
function checkSwitch() {
|
||||||
|
$(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled');
|
||||||
|
}
|
||||||
|
function checkMultipleInput() {
|
||||||
|
$(".multipleInput").each(function() {
|
||||||
|
$(this).find('.controls').length==1 ? $(this).addClass("plural") : $(this).removeClass("plural")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function removeInput(){
|
||||||
|
$(".removeInput").live('click',function (){
|
||||||
|
$(this).parents(".controls").remove();
|
||||||
|
checkMultipleInput();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
checkSwitch();
|
||||||
|
checkMultipleInput();
|
||||||
|
removeInput();
|
||||||
|
$(".remove_attribute").live('click',function(){
|
||||||
|
$(this).siblings(".attribute_field_to_delete").val("true");
|
||||||
|
$(this).parents(".form-horizontal").fadeOut("slow", function () { $(this).hide(); });
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".help-block a").live('click',function (){
|
||||||
|
CloneTarget = $(this).parents(".controls").prev(".multipleInput").find('.controls:last');
|
||||||
|
NewNode = CloneTarget.clone();
|
||||||
|
var index;
|
||||||
|
NewNode.find("input").each(function(k,v){
|
||||||
|
index = CloneTarget.parents("div.control-group").find(".list_count").val()
|
||||||
|
field_name = CloneTarget.parents("div.control-group").find(".field_name").val()
|
||||||
|
ori_str = $(v).attr("name").replace(field_name,"");
|
||||||
|
lang = ori_str.match(/\[\D*\]/);
|
||||||
|
new_field_name = (field_name+"[" + (parseInt(index)+1) + "]" + lang);
|
||||||
|
$(v).attr("name",new_field_name);
|
||||||
|
})
|
||||||
|
|
||||||
|
$(this).parents("div.control-group").find(".list_count").val(parseInt(index)+1)
|
||||||
|
$(this).parents(".controls").prev(".multipleInput").append(NewNode);
|
||||||
|
$(this).parents(".controls").prev(".multipleInput").find('.controls:last input').val("");
|
||||||
|
removeInput();
|
||||||
|
checkMultipleInput();
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
$(".status select").each(function (i) {
|
||||||
|
$(this).change(function () {
|
||||||
|
$(".status option:selected").eq(i).each(function () {
|
||||||
|
if($(this).attr("value")=="alumna") {
|
||||||
|
$(this).parents(".status").nextAll(".graduated").removeClass("hide");
|
||||||
|
$(this).parents(".status").nextAll(".graduated").find("select").removeAttr("disabled");
|
||||||
|
}else{
|
||||||
|
$(this).parents(".status").nextAll(".graduated").addClass("hide");
|
||||||
|
$(this).parents(".status").nextAll(".graduated").find("select").attr({disabled:''});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
$('.onoff').live('click',function () {
|
||||||
|
if($(this).parents("h4").length==1) {
|
||||||
|
$(this).parents(".map-block").toggleClass("disabled");
|
||||||
|
$(this).parents(".map-block").find(".form-horizontal").toggleClass("hide");
|
||||||
|
if($(this).parents(".map-block").hasClass("disabled")){
|
||||||
|
$(this).text("OFF");
|
||||||
|
}else{
|
||||||
|
$(this).text("ON");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($(this).parents("legend").length==1) {
|
||||||
|
$(this).toggleClass("disabled");
|
||||||
|
$(this).parents("legend").next("div").toggleClass("hide");
|
||||||
|
if($(this).parents("legend").next("div").hasClass("hide")){
|
||||||
|
$(this).text("OFF");
|
||||||
|
$(this).siblings(".attribute_field_disabled").val("true");
|
||||||
|
}else{
|
||||||
|
$(this).text("ON");
|
||||||
|
$(this).siblings(".attribute_field_disabled").val("false");
|
||||||
|
}
|
||||||
|
checkSwitch();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$(".dataType").change(function () {
|
||||||
|
$(this).parents("legend").next("div").find("div[class^='type']").addClass("hide");
|
||||||
|
$(this).parents("legend").next("div").find("."+$(this).find("option:selected").attr("ref")).removeClass("hide");
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end -%>
|
|
@ -0,0 +1,60 @@
|
||||||
|
<% # encoding: utf-8 %>
|
||||||
|
|
||||||
|
<% content_for :side_bar do %>
|
||||||
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="subnav">
|
||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><%= link_to( t("#{@attribute_type}"), admin_roles_path ) %> <span class="divider">/</span></li>
|
||||||
|
<li class="active"><%= @attribute.title %></li>
|
||||||
|
</ul>
|
||||||
|
<div id="accordion">
|
||||||
|
<div class="accordion-group filters">
|
||||||
|
<div class="table-label">
|
||||||
|
<table class="table main-list">
|
||||||
|
<thead>
|
||||||
|
<tr class="sort-header">
|
||||||
|
<th id="sort-name" class="sort span1-2 select active"><span><a href="#">Name<b class="web-symbol"></b></a></span></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<table class="table main-list member-list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="span1-2"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<% @attribute_fields_upper_object.each do |attribute| %>
|
||||||
|
<tr class="with_action">
|
||||||
|
<td class="span1-2">
|
||||||
|
<%= attribute.title %>
|
||||||
|
<div class="quick-edit">
|
||||||
|
<ul class="nav nav-pills hide">
|
||||||
|
<li><%= link_to t(:edit), eval("admin_#{@attribute_type}_edit_sub_role_path(attribute)") %></li>
|
||||||
|
<li><%= link_to t(:sub_role_field), eval("admin_#{@attribute_type}_sub_role_field_path(attribute)"), :class => 'edit' %></li>
|
||||||
|
<li><%= link_to t(:enable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :sub_role => {:disabled => true, :id => attribute })"), :remote => true, :method => :put, :id => "disable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? 'none' : ''}", :class => 'switch' %></li>
|
||||||
|
<li><%= link_to t(:disable), eval("admin_#{@attribute_type}_path(attribute, :authenticity_token => form_authenticity_token, :sub_role => {:disabled => false, :id => attribute })"), :remote => true, :method => :put, :id => "enable_#{attribute.id}", :style => "display:#{attribute.is_disabled? ? '' : 'none'}", :class => 'switch' %></li>
|
||||||
|
|
||||||
|
<% if !attribute.is_built_in? %>
|
||||||
|
<li><%= link_to t(:delete_), eval("admin_#{@attribute_type}_path(attribute, :sub_role => {:id => attribute })"), :class => 'delete', :confirm => t('sure?'), :method => :delete %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%= link_to content_tag(:i,t(:new_sub_role),:class=>"icon-plus icon-white"),eval("admin_#{@attribute_type}_add_sub_role_path(@attribute)"),:class=>"btn btn-primary pull-right"%>
|
||||||
|
</div>
|
|
@ -0,0 +1,128 @@
|
||||||
|
<% content_for :side_bar do %>
|
||||||
|
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t(:member), :link_url => admin_site_site_info_path(@site), :icon => 'icons-group', :side_bar_content => 'admin/users_new_interface/side_bar'} %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= form_for @attribute,:url => eval("admin_#{@attribute_type}_path(@attribute)") ,:class=> "form-horizontal" do |f| %>
|
||||||
|
<div class="site-map role-block">
|
||||||
|
|
||||||
|
<div class="map-block back attributes">
|
||||||
|
<h4><span><%= @attribute.title+ t(:attributes)%> - <%= @sub_attribute.title %></span></h4>
|
||||||
|
<div id="attribute_field_list">
|
||||||
|
<%= render :partial=>"attribute_field",:collection=>@sub_attribute.attribute_fields%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="add-attributes form-actions pagination-right">
|
||||||
|
<%= link_to content_tag(:i,t(:add_attribute_field),:class=>"icon-plus icon-white"),admin_role_add_attribute_field_path(@sub_attribute, :sub_role => {:id => @sub_attribute }),:class=>"btn btn-primary",:remote => true%>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions form-fixed pagination-right">
|
||||||
|
<%#= f.hidden_field :id, :value => params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= hidden_field_tag 'sub_role[id]', params[:role_id] if !params[:role_id].blank? %>
|
||||||
|
<%= f.submit t(:save),:class=>"btn btn-primary"%>
|
||||||
|
<%= link_to t('cancel'), get_go_back, :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :page_specific_css do -%>
|
||||||
|
<%= stylesheet_link_tag "member" %>
|
||||||
|
<%= stylesheet_link_tag "site-map" %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% content_for :page_specific_javascript do -%>
|
||||||
|
<script>
|
||||||
|
var CloneTarget ;
|
||||||
|
|
||||||
|
var NewNode;
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
function checkSwitch() {
|
||||||
|
$(".groups").addClass('disabled').has('.groups > .form-horizontal > div:not(.hide)').removeClass('disabled');
|
||||||
|
}
|
||||||
|
function checkMultipleInput() {
|
||||||
|
$(".multipleInput").each(function() {
|
||||||
|
$(this).find('.controls').length==1 ? $(this).addClass("plural") : $(this).removeClass("plural")
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function removeInput(){
|
||||||
|
$(".removeInput").live('click',function (){
|
||||||
|
$(this).parents(".controls").remove();
|
||||||
|
checkMultipleInput();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
checkSwitch();
|
||||||
|
checkMultipleInput();
|
||||||
|
removeInput();
|
||||||
|
$(".remove_attribute").live('click',function(){
|
||||||
|
$(this).siblings(".attribute_field_to_delete").val("true");
|
||||||
|
$(this).parents(".form-horizontal").fadeOut("slow", function () { $(this).hide(); });
|
||||||
|
});
|
||||||
|
|
||||||
|
$(".help-block a").live('click',function (){
|
||||||
|
CloneTarget = $(this).parents(".controls").prev(".multipleInput").find('.controls:last');
|
||||||
|
NewNode = CloneTarget.clone();
|
||||||
|
var index;
|
||||||
|
NewNode.find("input").each(function(k,v){
|
||||||
|
index = CloneTarget.parents("div.control-group").find(".list_count").val()
|
||||||
|
field_name = CloneTarget.parents("div.control-group").find(".field_name").val()
|
||||||
|
ori_str = $(v).attr("name").replace(field_name,"");
|
||||||
|
lang = ori_str.match(/\[\D*\]/);
|
||||||
|
new_field_name = (field_name+"[" + (parseInt(index)+1) + "]" + lang);
|
||||||
|
$(v).attr("name",new_field_name);
|
||||||
|
})
|
||||||
|
|
||||||
|
$(this).parents("div.control-group").find(".list_count").val(parseInt(index)+1)
|
||||||
|
$(this).parents(".controls").prev(".multipleInput").append(NewNode);
|
||||||
|
$(this).parents(".controls").prev(".multipleInput").find('.controls:last input').val("");
|
||||||
|
removeInput();
|
||||||
|
checkMultipleInput();
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
$(".status select").each(function (i) {
|
||||||
|
$(this).change(function () {
|
||||||
|
$(".status option:selected").eq(i).each(function () {
|
||||||
|
if($(this).attr("value")=="alumna") {
|
||||||
|
$(this).parents(".status").nextAll(".graduated").removeClass("hide");
|
||||||
|
$(this).parents(".status").nextAll(".graduated").find("select").removeAttr("disabled");
|
||||||
|
}else{
|
||||||
|
$(this).parents(".status").nextAll(".graduated").addClass("hide");
|
||||||
|
$(this).parents(".status").nextAll(".graduated").find("select").attr({disabled:''});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
$('.onoff').live('click',function () {
|
||||||
|
if($(this).parents("h4").length==1) {
|
||||||
|
$(this).parents(".map-block").toggleClass("disabled");
|
||||||
|
$(this).parents(".map-block").find(".form-horizontal").toggleClass("hide");
|
||||||
|
if($(this).parents(".map-block").hasClass("disabled")){
|
||||||
|
$(this).text("OFF");
|
||||||
|
}else{
|
||||||
|
$(this).text("ON");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($(this).parents("legend").length==1) {
|
||||||
|
$(this).toggleClass("disabled");
|
||||||
|
$(this).parents("legend").next("div").toggleClass("hide");
|
||||||
|
if($(this).parents("legend").next("div").hasClass("hide")){
|
||||||
|
$(this).text("OFF");
|
||||||
|
$(this).siblings(".attribute_field_disabled").val("true");
|
||||||
|
}else{
|
||||||
|
$(this).text("ON");
|
||||||
|
$(this).siblings(".attribute_field_disabled").val("false");
|
||||||
|
}
|
||||||
|
checkSwitch();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
$(".dataType").change(function () {
|
||||||
|
$(this).parents("legend").next("div").find("div[class^='type']").addClass("hide");
|
||||||
|
$(this).parents("legend").next("div").find("."+$(this).find("option:selected").attr("ref")).removeClass("hide");
|
||||||
|
})
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end -%>
|
|
@ -0,0 +1,3 @@
|
||||||
|
$("#enable_<%= @sub_role.id %>").toggle();
|
||||||
|
$("#disable_<%= @sub_role.id %>").toggle();
|
||||||
|
$("#attribute_<%= @sub_role.id %>").toggleClass('disable');
|
|
@ -1,11 +1,27 @@
|
||||||
<div class="groups map-block back">
|
|
||||||
<h4><span><%= role.title %></span></h4>
|
<% role_disable = @user.roles.include?(role) ? false : true %>
|
||||||
<div class="form-horizontal">
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="groups map-block back <%= role_disable ? 'disabled' : '' %>">
|
||||||
|
<h4>
|
||||||
|
<button for=<%=@form_index%> class="onoff pull-right"><%= role_disable ? 'OFF' : 'ON' %></button><span><%= role.title %></span>
|
||||||
|
<%= hidden_field_tag("user[disable_role][id][#{role.id}]",role_disable,:for=>@form_index,:class=>"subrole_disable_field",:value=>role_disable)%>
|
||||||
|
</h4>
|
||||||
|
|
||||||
<% role.sub_roles.each do |sub_role| %>
|
<div class="form-horizontal <%= role_disable ? 'hide' : '' %>">
|
||||||
|
|
||||||
|
<% role.attribute_fields.each do |rf|%>
|
||||||
|
|
||||||
|
<%= rf.block_helper(@user,@form_index)%>
|
||||||
|
<% @form_index = @form_index +1 %>
|
||||||
|
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% @form_index = @form_index +1 %>
|
||||||
|
|
||||||
|
<% role.sub_roles.where(:disabled=>false).each do |sub_role| %>
|
||||||
<% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %>
|
<% sub_role_disable = @user.sub_roles.include?(sub_role) ? false : true %>
|
||||||
|
<%# sub_role_disable = !sub_role.disabled ? false : true %>
|
||||||
<%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%>
|
<%#= hidden_field_tag("[user][new_attribute_values][sub_role][disable][#{sub_role.id}]",sub_role_disable)%>
|
||||||
<legend>
|
<legend>
|
||||||
<button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> "><%= t(:on_upcase) %></button><%= sub_role.title %>
|
<button for=<%=@form_index%> class="onoff pull-right <%= sub_role_disable ? 'disabled' : '' %> "><%= t(:on_upcase) %></button><%= sub_role.title %>
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
<div class="roles <%= show_roles.key %>">
|
<div class="roles <%= show_roles.key %>">
|
||||||
|
<%= show_roles.title %>
|
||||||
<div class="label-line">
|
<div class="label-line">
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tbody>
|
<tbody>
|
||||||
|
<% show_roles.attribute_fields.where(:disabled=>false).each do |rf| %>
|
||||||
|
<tr>
|
||||||
|
<td class="span1"><%= rf.title %></td>
|
||||||
|
<td><%= show_attribute_value(@user.get_attribute_value(rf).get_value_by_locale(I18n.locale)) rescue '' %></td>
|
||||||
|
</tr>
|
||||||
|
<% end -%>
|
||||||
<%= render :partial => 'show_sub_role',:collection=> @user.get_sub_roles_by_role(show_roles)%>
|
<%= render :partial => 'show_sub_role',:collection=> @user.get_sub_roles_by_role(show_roles)%>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -2,14 +2,16 @@
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-user')+ content_tag(:span, t(:member)), admin_users_new_interface_index_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-user')+ content_tag(:span, t(:member)), admin_users_new_interface_index_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('users_new_interface')) do -%>
|
||||||
<%= content_tag :li, link_to((t(:all_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_users_new_interface_index_path), :class => active_for_action('users_new_interface', 'index') %>
|
<%= content_tag :li, link_to((t(:all_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_users_new_interface_index_path), :class => active_for_action('users_new_interface', 'index') %>
|
||||||
<%= content_tag :li, link_to((t(:add_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') %>
|
<%= content_tag :li, link_to((t(:add_member) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, new_admin_users_new_interface_path), :class => active_for_action('users_new_interface', 'new') if (is_admin? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t(:roles) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_infos_path ), :class => active_for_action('users_new_interfacexx', 'index') %>
|
<%= content_tag :li, link_to((t(:roles) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe,admin_roles_path ), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||||
<%= content_tag :li, link_to((t(:info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_roles_path), :class => active_for_action('users_new_interfacexx', 'index') %>
|
<%= content_tag :li, link_to((t(:info) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, edit_admin_info_path(Info.first.id.to_s)), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||||
|
<%= content_tag :li, link_to((t(:authorigation) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||||
|
<%= content_tag :li, link_to((t(:registrant) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, '#'), :class => active_for_action('users_new_interfacexx', 'index') if (is_admin? rescue nil) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
<%= content_tag :li, :class => active_for_controllers('plugins') do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:plugins)), admin_plugins_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-pie')+ content_tag(:span, t(:analysis)), admin_plugins_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('plugins')) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('plugins')) do -%>
|
||||||
<%= content_tag :li, link_to((t(:all_plugins) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_plugins_path), :class => active_for_action('users_new_interface', 'index') %>
|
<%= content_tag :li, link_to((t(:all_plugins) + content_tag(:i, nil, :class => 'icon-chevron-right')).html_safe, admin_plugins_path), :class => active_for_action('users_new_interface', 'index') %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for(@co_author_relation, url: desktop_co_author_relations_path, html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationForm"} ) do |f| %>
|
|
||||||
<%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%>
|
|
||||||
<% end %>
|
|
|
@ -1,17 +0,0 @@
|
||||||
<% @co_author_relations.each_with_index do |co_author_relation,i| %>
|
|
||||||
<% if ( i % 6 ) == 0 %>
|
|
||||||
<div class="s_grid_con s_form">
|
|
||||||
<ul>
|
|
||||||
<% end %>
|
|
||||||
<li class="s_grid_row">
|
|
||||||
<div class="form_space" id="form_space_<%= i.to_s %>"><%= co_author_relation.relation %></div>
|
|
||||||
<div class="list_item_function">
|
|
||||||
<%= link_to 'Edit', edit_desktop_co_author_relation_path(co_author_relation), :class => "bt-edit-type admbg2 admtxt", "content-holder"=>"#form_space_"+i.to_s, "ajax-remote"=>"get" %>
|
|
||||||
<%= link_to 'Destroy', desktop_co_author_relation_path(co_author_relation), "confirm-message"=>'Are you sure?', "ajax-remote"=>"delete", :class=>"bt-delete admbg2 admtxt" %>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
<% if ( i % 6 ) == 5 %>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<% end %>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for(@co_author_relation, url: desktop_co_author_relation_path(@co_author_relation), html:{"form-type"=>"ajax_form", "callback-method"=>"coauthorRelationEditForm"} ) do |f| %>
|
|
||||||
<%= render partial: 'desktop/co_author_relations/form' , locals: {:f => f}%>
|
|
||||||
<% end %>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_author_path(@co_author) do |f| %>
|
|
||||||
<%= render partial: 'desktop/co_authors/form', locals: {:f => f} %>
|
|
||||||
<% end %>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @co_author, html: { multipart: true ,"form-type"=>"ajax_form", "callback-method"=>"coAuthorformCallback"} , url: desktop_co_authors_path do |f| %>
|
|
||||||
<%= render partial: 'desktop/co_authors/form', locals: {:f => f} %>
|
|
||||||
<% end %>
|
|
|
@ -11,7 +11,7 @@
|
||||||
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
|
<li class="d_cate"><a callback-method='' href="" class="widget_fn wh3 hh3" id='d_publication' onclick="return false;"><span class="widget_icon"><img src="" alt="Publication" id="publication_icon" width="30" height="30"/></span></a>
|
||||||
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
<ul class="dock_child hh3 thmc4" style="width: 180px;">
|
||||||
|
|
||||||
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= desktop_publications_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a callback-method='initializeJournalPapers' href="<%= panel_personal_journal_desktop_journal_p_path %>" class="widget_fn wh3 hh3" id='d_journal_p' custom-load="journal" onclick="return false;"><span class="widget_icon"><img src="" alt="Journal Papers" id="journal_p_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
<li class="dock_item"><a callback-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' custom-load="seminar" onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
<li class="dock_item"><a callback-method='initializeSeminar' href="<%= desktop_publications_seminar_p_path %>" class="widget_fn wh3 hh3" id='d_seminar_p' custom-load="seminar" onclick="return false;"><span class="widget_icon"><img src="" alt="Seminar Papers" id="seminar_p_icon" width="30" height="30"/></span></a></li>
|
||||||
|
|
||||||
|
@ -64,10 +64,10 @@
|
||||||
</div>
|
</div>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
|
|
||||||
<div id='ajax_container'>
|
<div id='ajax_container'>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--<div id="orbitbar"></div>-->
|
<!--<div id="orbitbar"></div>-->
|
||||||
|
|
||||||
|
@ -102,3 +102,4 @@
|
||||||
var od = new orbitDesktop("#ajax_container");
|
var od = new orbitDesktop("#ajax_container");
|
||||||
o.notify("Welcome "+o.currentUsername+"!!","alert",3);
|
o.notify("Welcome "+o.currentUsername+"!!","alert",3);
|
||||||
</script>
|
</script>
|
||||||
|
<%= javascript_include_tag "personal_journal" %>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_page_path(@writing_journal) do |f| %>
|
|
||||||
<%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %>
|
|
||||||
<%end%>
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @writing_journal, html: { multipart: true, "form-type"=>"ajax_form", "callback-method"=>"formCallback"}, url: desktop_journal_pages_path do |f| %>
|
|
||||||
<%= render partial: 'desktop/journal_pages/form', locals: {:f => f} %>
|
|
||||||
<%end%>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<h1>Desktop::JournalPages#show</h1>
|
|
||||||
<p>Find me in app/views/desktop/journal_pages/show.html.erb</p>
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
<div id='slideshow-<%= @ad_banner.title.dehumanize %>' class='slideshow'>
|
||||||
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
<% (images = @ad_banner.ad_images).shuffle.each do |ad_image| %>
|
||||||
<% if ad_image.display? %>
|
<% if ad_image.display? %>
|
||||||
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image)%>' style=' <%= 'cursor:pointer;' if !ad_image.out_link.blank? %>'/>
|
<img src='<%= ad_image.file %>' alt='<%= ad_image.title || ' ' %>' title='<%= ad_image.title || ' ' %>' time_to_next='<%= @ad_banner.transition_msec %>' link_open='<%= ad_image.link_open %>' link_url='<%= ad_image_link(ad_image) %>' style=' <%= 'cursor:pointer;' if !ad_image_link(ad_image).blank? %>'/>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
<% end -%>
|
<% end -%>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
<li><a href="<%= root_path %>" data-icon=""></a></li>
|
<li><a href="<%= root_path %>" data-icons=""></a></li>
|
||||||
<!-- <li><a href="<%= desktop_path %>" data-icon=""></a></li> -->
|
<!-- <li><a href="<%= desktop_path %>" data-icons=""></a></li> -->
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<li class="dropdown">
|
<li class="dropdown">
|
||||||
<a class="dropdown-toggle" data-icon="" href="#" data-toggle="dropdown"></a>
|
<a class="dropdown-toggle" data-icons="" href="#" data-toggle="dropdown"></a>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
<% t('ntu.site_names').each do |site| %>
|
<% t('ntu.site_names').each do |site| %>
|
||||||
<li><%= link_to site[1], get_link(site[0]) %></li>
|
<li><%= link_to site[1], get_link(site[0]) %></li>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="dropdown language">
|
<li class="dropdown language">
|
||||||
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icon=""></a>
|
<a class="dropdown-toggle" href="#" data-toggle="dropdown" data-icons=""></a>
|
||||||
<ul class="dropdown-menu language-menu">
|
<ul class="dropdown-menu language-menu">
|
||||||
<% @site_in_use_locales.each do |locale| %>
|
<% @site_in_use_locales.each do |locale| %>
|
||||||
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
<%= content_tag :li, (link_to t(:_locale, :locale => locale), add_locale(remove_locale((referer rescue request.fullpath)), locale)), :class => (I18n.locale.eql?(locale.to_sym) ? 'active' : nil) %>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="search clear" title="<%= t :search_google %>">
|
<li class="search clear" title="<%= t :search_google %>">
|
||||||
<a class="orbit-bar-search" href="#" data-icon=""></a>
|
<a class="orbit-bar-search" href="#" data-icons=""></a>
|
||||||
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
<form class="navbar-search" method="get" action="http://www.google.com/custom">
|
||||||
<input type="hidden" name="client" value="pub-&" />
|
<input type="hidden" name="client" value="pub-&" />
|
||||||
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
<input type="hidden" name="ie" id="ie" value="utf-8" />
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
</li>
|
</li>
|
||||||
<% else %>
|
<% else %>
|
||||||
<li class="dropdown bar-login">
|
<li class="dropdown bar-login">
|
||||||
<a class="dropdown-toggle orbit-bar-member" href="#" data-icon=""></a>
|
<a class="dropdown-toggle orbit-bar-member" href="#" data-icons=""></a>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
<ul class="log">
|
<ul class="log">
|
||||||
<li class="title hide"></li>
|
<li class="title hide"></li>
|
||||||
|
|
|
@ -69,8 +69,8 @@
|
||||||
<%= content_tag :li, link_to(t(:tags), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
<%= content_tag :li, link_to(t(:tags), panel_calendar_back_end_tags_path), :class => active_for_action('/panel/calendar/back_end/tags', 'index')if (is_manager? rescue nil) %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<%= content_tag :li, :class => active_for_controllers('locations') || active_for_app_auth("gprs") do -%>
|
<%= content_tag :li, :class => active_for_controllers('locations') do -%>
|
||||||
<%= link_to content_tag(:i, nil, :class => 'icons-location') + content_tag(:span, t(:location)), panel_gprs_back_end_locations_path %>
|
<%= link_to content_tag(:i, nil, :class => 'icons-location') + content_tag(:span, t(:location)), panel_location_back_end_locations_path %>
|
||||||
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('locations') ) do -%>
|
<%= content_tag :ul, :class => ("nav nav-list " + visible_for_controllers('locations') ) do -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0">
|
||||||
<!-- iPhone -->
|
<!-- iPhone -->
|
||||||
<link href="<%= asset_path 'mobile/apple-startup-iPhone.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
<link href="<%= asset_path 'mobile/apple-startup-iPhone.png' %>" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)" rel="apple-touch-startup-image">
|
||||||
|
|
||||||
|
@ -44,7 +44,13 @@
|
||||||
|
|
||||||
<!-- iPad icon (Retina) -->
|
<!-- iPad icon (Retina) -->
|
||||||
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'mobile/apple-touch-icon-ipad@2x.png' %>">
|
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="<%= asset_path 'mobile/apple-touch-icon-ipad@2x.png' %>">
|
||||||
|
<% if @no_footer %>
|
||||||
|
<style type="text/css">
|
||||||
|
.global {
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<% end %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div data-role="page" data-url="<%= request.fullpath %>" id="<%= params[:action] %>" data-add-back-btn="<%= params[:action].eql?('index')? nil : 'true' %>">
|
<div data-role="page" data-url="<%= request.fullpath %>" id="<%= params[:action] %>" data-add-back-btn="<%= params[:action].eql?('index')? nil : 'true' %>">
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
<ul class="clear">
|
<ul class="clear">
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-house") + content_tag(:span, t('mobile.home')), mobile_path %></li>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-megaphone") + content_tag(:span, t('mobile.bulletin')), mobile_announcement_path %></li>
|
||||||
<li><%= link_to content_tag(:i, nil, :class => "icons-page") + content_tag(:span, t('mobile.page')), mobile_page_path %></li>
|
<li><%= link_to content_tag(:i, nil, :class => "icons-newspaper") + content_tag(:span, t('mobile.page')), mobile_page_path %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
|
@ -1,7 +1,9 @@
|
||||||
<div class="slideshow">
|
<div class="slideshow">
|
||||||
<% @ad_banner.ad_images.each do |image| %>
|
<% @ad_banner.ad_images.shuffle.each do |image| %>
|
||||||
|
<% if image.display? %>
|
||||||
<div class="slidebanner"><%= image_tag image.file.url, :class => 'slideImg' %></div>
|
<div class="slidebanner"><%= image_tag image.file.url, :class => 'slideImg' %></div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<div class="newlist clear">
|
<div class="newlist clear">
|
||||||
<% @bulletins.each do |bulletin| %>
|
<% @bulletins.each do |bulletin| %>
|
||||||
|
@ -17,3 +19,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<script type='text/javascript'>
|
||||||
|
var $effect = "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>"
|
||||||
|
var $timeout = "<%= @ad_banner.transition_msec %>"
|
||||||
|
</script>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<% VALID_LOCALES.each do |locale|%>
|
<% VALID_LOCALES.each do |locale|%>
|
||||||
<% active = (locale == I18n.locale.to_s ? ["active"] : [] ) %>
|
<% active = (locale == I18n.locale.to_s ? ["active"] : [] ) %>
|
||||||
<%= content_tag :li,:class=>active.push("modal_tab","address_tab").join(' '),:for=>locale do%>
|
<%= content_tag :li,:class=>active.push("modal_tab","address_tab").join(' '),:for=>locale do%>
|
||||||
<%= link_to t("langs.#{locale}"),".#{btn_class}.address_modal.#{locale}",:data=>{:toggle=>"tab"}%>
|
<%= link_to I18nVariable.from_locale(locale),".#{btn_class}.address_modal.#{locale}",:data=>{:toggle=>"tab"}%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -2,14 +2,25 @@
|
||||||
<%
|
<%
|
||||||
attribute_field.af_count ? @af_counter = attribute_field_counter + attribute_field.af_count : @af_counter = attribute_field_counter
|
attribute_field.af_count ? @af_counter = attribute_field_counter + attribute_field.af_count : @af_counter = attribute_field_counter
|
||||||
%>
|
%>
|
||||||
<%= @af_counter %>
|
<%= @af_counter + 1 %>
|
||||||
<%#= attribute_field_counter %>
|
<%#= attribute_field_counter %>
|
||||||
<legend>
|
<legend>
|
||||||
<button class="onoff pull-right <%= attribute_field.disabled ? 'disabled' : ''%>">ON</button>
|
<button class="onoff pull-right <%= attribute_field.disabled ? 'disabled' : ''%>">ON</button>
|
||||||
<%= hidden_field "info[attribute_fields][#{@af_counter}]","disabled",:value=>attribute_field.disabled,:class=>"attribute_field_disabled"%>
|
<%= hidden_field "info[attribute_fields][#{@af_counter}]","disabled",:value=>attribute_field.disabled,:class=>"attribute_field_disabled"%>
|
||||||
<%= hidden_field "info[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%>
|
<%= hidden_field "info[attribute_fields][#{@af_counter}]","to_delete",:value=>false,:class=>"attribute_field_to_delete"%>
|
||||||
<a class="btn btn-small pull-right btn-danger remove_attribute" href="#"><i class="icon-trash icon-large"></i> <%= t(:delete_)%></a>
|
<a class="btn btn-small pull-right btn-danger remove_attribute"><i class="icon-trash icon-large"></i> <%= t(:delete_)%></a>
|
||||||
<div class="clear">
|
<div class="clear">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="key"><%= t(:to_search) %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("info[attribute_fields][#{@af_counter}]", "to_search", "true",:checked => (attribute_field.to_search == true ? true : false)) %><%= t(:yes_)%>
|
||||||
|
</label>
|
||||||
|
<label class="radio inline">
|
||||||
|
<%= radio_button("info[attribute_fields][#{@af_counter}]", "to_search", "false",:checked => (attribute_field.to_search == false ? true : false)) %><%= t(:no_)%>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="control-group pull-left">
|
<div class="control-group pull-left">
|
||||||
<label class="control-label" for="key"><%= t(:key) %></label>
|
<label class="control-label" for="key"><%= t(:key) %></label>
|
||||||
<div class="multipleInput">
|
<div class="multipleInput">
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<% last = (locale == @site_valid_locales.last ? true : false) %>
|
<% last = (locale == @site_valid_locales.last ? true : false) %>
|
||||||
<% p_value = value[locale.to_s] rescue nil%>
|
<% p_value = value[locale.to_s] rescue nil%>
|
||||||
<%= content_tag :div,:class=>"input-append #{"unRadius" if last }" do%>
|
<%= content_tag :div,:class=>"input-append #{"unRadius" if last }" do%>
|
||||||
<%= text_field("#{field_name}[0]", locale,:placeholder=>t("langs.#{locale}")) %>
|
<%= text_field("#{field_name}[0]", locale,:placeholder=>I18nVariable.from_locale(locale)) %>
|
||||||
<% if last %>
|
<% if last %>
|
||||||
<a href="#" class="btn removeInput" type="button"><i class="icon-trash"></i></a>
|
<a href="#" class="btn removeInput" type="button"><i class="icon-trash"></i></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<% last = (locale == @site_valid_locales.last ? true : false) %>
|
<% last = (locale == @site_valid_locales.last ? true : false) %>
|
||||||
<% p_value = value[locale.to_s] rescue nil%>
|
<% p_value = value[locale.to_s] rescue nil%>
|
||||||
<%= content_tag :div,:class=>"input-append #{"unRadius" if last }" do%>
|
<%= content_tag :div,:class=>"input-append #{"unRadius" if last }" do%>
|
||||||
<%= text_field("#{field_name}[#{index}]", locale,:value=>p_value,:placeholder=>t("langs.#{locale}")) %>
|
<%= text_field("#{field_name}[#{index}]", locale,:value=>p_value,:placeholder=>I18nVariable.from_locale(locale)) %>
|
||||||
<% if last %>
|
<% if last %>
|
||||||
<a href="#" class="btn removeInput" type="button"><i class="icon-trash"></i></a>
|
<a href="#" class="btn removeInput" type="button"><i class="icon-trash"></i></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<% active = (locale == @site_valid_locales.first ? "active in" : "'") %>
|
<% active = (locale == @site_valid_locales.first ? "active in" : "'") %>
|
||||||
<%= content_tag :div,:class=>"tab-pane fade #{active}",:id=>"#{name_to_id(field_name)}_#{locale}" do%>
|
<%= content_tag :div,:class=>"tab-pane fade #{active}",:id=>"#{name_to_id(field_name)}_#{locale}" do%>
|
||||||
<% locale_value = values[locale.to_s] rescue nil%>
|
<% locale_value = values[locale.to_s] rescue nil%>
|
||||||
<%= text_field(field_name, locale,:value=>locale_value,:placeholder=>t("langs.#{locale}")) %>
|
<%= text_field(field_name, locale,:value=>locale_value,:placeholder=>I18nVariable.from_locale(locale)) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
<% @site_valid_locales.each do |locale| %>
|
<% @site_valid_locales.each do |locale| %>
|
||||||
<% active = (locale == @site_valid_locales.first ? "active" : "'") %>
|
<% active = (locale == @site_valid_locales.first ? "active" : "'") %>
|
||||||
<%=content_tag :li,:class=>active do %>
|
<%=content_tag :li,:class=>active do %>
|
||||||
<%= link_to t("langs.#{locale}"),"##{name_to_id(field_name)}_#{locale}",:data=>{:toggle=>"tab"}%>
|
<%= link_to I18nVariable.from_locale(locale),"##{name_to_id(field_name)}_#{locale}",:data=>{:toggle=>"tab"}%>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -40,7 +40,6 @@ Orbit::Application.routes.draw do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
match 'ad_banners/:id/preview' => 'ad_banners#realtime_preview',:as => :realtime_preview_ad_banner,:via => :put
|
match 'ad_banners/:id/preview' => 'ad_banners#realtime_preview',:as => :realtime_preview_ad_banner,:via => :put
|
||||||
match 'ad_banners/:id/rename' => 'ad_banners#rename',:as => :rename_ad_banner,:via => :post
|
match 'ad_banners/:id/rename' => 'ad_banners#rename',:as => :rename_ad_banner,:via => :post
|
||||||
|
|
||||||
|
@ -51,6 +50,7 @@ Orbit::Application.routes.draw do
|
||||||
end
|
end
|
||||||
resources :ad_images ,:except => [:show,:index]
|
resources :ad_images ,:except => [:show,:index]
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :dashboards
|
resources :dashboards
|
||||||
resources :designs do
|
resources :designs do
|
||||||
collection do
|
collection do
|
||||||
|
@ -64,22 +64,27 @@ Orbit::Application.routes.draw do
|
||||||
post 'upload_image' => 'designs#upload_image'
|
post 'upload_image' => 'designs#upload_image'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :infos do
|
resources :infos do
|
||||||
get 'add_attribute_field'
|
get 'add_attribute_field'
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :items
|
resources :items
|
||||||
|
|
||||||
match 'update_position' => 'items#update_position'
|
match 'update_position' => 'items#update_position'
|
||||||
resources :links do
|
resources :links do
|
||||||
member do
|
member do
|
||||||
get 'delete'
|
get 'delete'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :pages do
|
resources :pages do
|
||||||
member do
|
member do
|
||||||
get 'delete'
|
get 'delete'
|
||||||
get 'reload_themes'
|
get 'reload_themes'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :module_apps do
|
resources :module_apps do
|
||||||
match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get
|
match 'manager_auth_proc' => "module_apps_new_interface#setting" ,:as => :manager_auth_proc,:via => :get
|
||||||
match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post
|
match 'manager_auth_proc' => "module_apps_new_interface#update_setting" ,:as => :manager_auth_proc,:via => :post
|
||||||
|
@ -99,6 +104,7 @@ Orbit::Application.routes.draw do
|
||||||
get 'reload_frontend_pages'
|
get 'reload_frontend_pages'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :page_parts do
|
resources :page_parts do
|
||||||
member do
|
member do
|
||||||
get 'reload_widgets'
|
get 'reload_widgets'
|
||||||
|
@ -106,6 +112,7 @@ Orbit::Application.routes.draw do
|
||||||
get 'reload_r_tag_options'
|
get 'reload_r_tag_options'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :plugins
|
resources :plugins
|
||||||
resources :purchases do
|
resources :purchases do
|
||||||
collection do
|
collection do
|
||||||
|
@ -116,10 +123,16 @@ Orbit::Application.routes.draw do
|
||||||
get 'download'
|
get 'download'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :roles do
|
resources :roles do
|
||||||
|
get 'role_field'
|
||||||
|
get 'sub_role_field'
|
||||||
|
get 'sub_role'
|
||||||
get 'add_sub_role'
|
get 'add_sub_role'
|
||||||
|
get 'edit_sub_role'
|
||||||
get 'add_attribute_field'
|
get 'add_attribute_field'
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :sites do
|
resources :sites do
|
||||||
get 'mail_setting'
|
get 'mail_setting'
|
||||||
get 'site_info'
|
get 'site_info'
|
||||||
|
@ -130,8 +143,10 @@ Orbit::Application.routes.draw do
|
||||||
get 'ui_theme'
|
get 'ui_theme'
|
||||||
get 'change_design'
|
get 'change_design'
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :tags
|
resources :tags
|
||||||
resources :users
|
resources :users
|
||||||
|
|
||||||
resources :users_new_interface do
|
resources :users_new_interface do
|
||||||
member do
|
member do
|
||||||
get 'temp_edit'
|
get 'temp_edit'
|
||||||
|
@ -181,16 +196,7 @@ Orbit::Application.routes.draw do
|
||||||
match '/desktop/widget_layout' => 'desktop#widget_layout'
|
match '/desktop/widget_layout' => 'desktop#widget_layout'
|
||||||
match '/desktop/temp_func/'=>'desktop#temp_func'
|
match '/desktop/temp_func/'=>'desktop#temp_func'
|
||||||
|
|
||||||
namespace :desktop do
|
|
||||||
match '/journal_pages/get_journals_json' => 'journal_pages#get_journals_json'
|
|
||||||
resources :journal_pages, except: :show
|
|
||||||
resources :journal_lists, only: :index
|
|
||||||
resources :co_authors, except: :show
|
|
||||||
resources :co_author_relations, except: :show
|
|
||||||
end
|
|
||||||
|
|
||||||
# namespace :desktop_publications do
|
# namespace :desktop_publications do
|
||||||
match 'desktop_publications/journal_p'=>'desktop_publications#journal_p'
|
|
||||||
match 'desktop_publications/books' => 'desktop_publications#books'
|
match 'desktop_publications/books' => 'desktop_publications#books'
|
||||||
match 'desktop_publications/books_list'=>'desktop_publications#books_list'
|
match 'desktop_publications/books_list'=>'desktop_publications#books_list'
|
||||||
match 'desktop_publications/books_add'=>'desktop_publications#books_add'
|
match 'desktop_publications/books_add'=>'desktop_publications#books_add'
|
||||||
|
@ -231,14 +237,21 @@ Orbit::Application.routes.draw do
|
||||||
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
#match '/desktop_orbit/eventajaxload' => 'desktop_publications#delete_journal'
|
||||||
# match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal'
|
# match '/desktop_orbit/eventajaxload' => 'desktop_publications#update_journal'
|
||||||
|
|
||||||
|
def controller_paths(controller, actions)
|
||||||
|
actions.each do |action|
|
||||||
|
if action.eql? 'index'
|
||||||
|
match "#{controller}" => "#{controller}##{action}", :as => "#{controller}"
|
||||||
|
else
|
||||||
|
match "#{controller}/#{action}(/:id)" => "#{controller}##{action}", :as => "#{controller}_#{action}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
scope '/front' do
|
controller_paths :front, %w[show_banner show_footer show_menu show_page_sub_menu show_site_sub_menu show_sitemap]
|
||||||
match 'show_banner/:id' => 'front#show_banner', :as => :front_show_banner
|
controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
|
||||||
match 'show_footer' => 'front#show_footer', :as => :front_show_footer
|
|
||||||
match 'show_menu/:id' => 'front#show_menu', :as => :front_show_menu
|
scope 'app' do
|
||||||
match 'show_page_sub_menu' => 'front#show_page_sub_menu', :as => :front_show_page_sub_menu
|
controller_paths :mobile, %w[index announcement announcement_content dialog_contact dialog_copyright dialog_language map page page_content]
|
||||||
match 'show_site_sub_menu' => 'front#show_site_sub_menu', :as => :front_show_site_sub_menu
|
|
||||||
match 'show_sitemap' => 'front#show_sitemap', :as => :front_show_sitemap
|
|
||||||
end
|
end
|
||||||
|
|
||||||
scope '/mobile' do
|
scope '/mobile' do
|
||||||
|
|
|
@ -2,21 +2,21 @@
|
||||||
<ul class="nav nav-pills filter">
|
<ul class="nav nav-pills filter">
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-status" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:status) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-status" data-toggle="collapse" data-parent="#filter" class="accordion-toggle"><%= t(:status) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-category" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:categories) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-category" data-toggle="collapse" data-parent="#filter" class="accordion-toggle"><%= t(:categories) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="accordion-group">
|
<li class="accordion-group">
|
||||||
<div class="accordion-heading">
|
<div class="accordion-heading">
|
||||||
<a href="#collapse-tags" data-toggle="collapse" data-parent=".filters" class="accordion-toggle"><%= t(:tags) %> <b class="web-symbol"></b></a>
|
<a href="#collapse-tags" data-toggle="collapse" data-parent="#filter" class="accordion-toggle"><%= t(:tags) %> <b class="web-symbol"></b></a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="filters">
|
<div class="filters accordion-group">
|
||||||
<div class="accordion-body collapse" id="collapse-status">
|
<div class="accordion-body collapse" id="collapse-status">
|
||||||
<%= render 'filter_status' %>
|
<%= render 'filter_status' %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
<div id="sub-wiget">
|
<div id="sub-wiget">
|
||||||
|
|
||||||
<div id="widget-picture" class="widget-box">
|
<div id="widget-picture" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Upload pictures">
|
||||||
<a class="action"><i title="Upload pictures" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-pictures"></i><%= t('nccu.picture') %></h3>
|
<h3 class="widget-title"><i class="icons-pictures"></i><%= t('nccu.picture') %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-date" class="widget-box widget-size-300">
|
<div id="widget-date" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Set the announcement to start and end dates">
|
||||||
<a href="#" class="action"><i title="Set the announcement to start and end dates" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a href="#" class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-calendar"></i><%= t(:date_) %></h3>
|
<h3 class="widget-title"><i class="icons-calendar"></i><%= t(:date_) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -56,8 +56,8 @@
|
||||||
|
|
||||||
<% if show_form_status_field(@bulletin)%>
|
<% if show_form_status_field(@bulletin)%>
|
||||||
<div id="widget-status" class="widget-box widget-size-300">
|
<div id="widget-status" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Setting the announcement state">
|
||||||
<a class="action"><i title="Setting the announcement state" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-star"></i><%= t(:status) %></h3>
|
<h3 class="widget-title"><i class="icons-star"></i><%= t(:status) %></h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -80,8 +80,8 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @bulletin.is_rejected %>
|
<% if @bulletin.is_rejected %>
|
||||||
<div id="widget-rejected" class="widget-box widget-size-300">
|
<div id="widget-rejected" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Rejected Report">
|
||||||
<a class="action"><i title="Rejected Report" class="icon-cog icon-white tip"></i></a>
|
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-tag"></i><%= t('approval.stat') %></h3>
|
<h3 class="widget-title"><i class="icons-tag"></i><%= t('approval.stat') %></h3>
|
||||||
<div class="widget-content clear form-horizontal">
|
<div class="widget-content clear form-horizontal">
|
||||||
|
@ -90,8 +90,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div id="widget-tags" class="widget-box widget-size-300">
|
<div id="widget-tags" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Setting">
|
||||||
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
|
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-tag"></i><%= t('nccu.tags') %></h3>
|
<h3 class="widget-title"><i class="icons-tag"></i><%= t('nccu.tags') %></h3>
|
||||||
<div class="widget-content clear form-horizontal">
|
<div class="widget-content clear form-horizontal">
|
||||||
|
@ -108,8 +108,8 @@
|
||||||
</div>
|
</div>
|
||||||
<% if params[:action] != 'new' %>
|
<% if params[:action] != 'new' %>
|
||||||
<div id="widget-audit" class="widget-box">
|
<div id="widget-audit" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="A">
|
||||||
<a class="action"><i title="A" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -177,8 +177,8 @@
|
||||||
|
|
||||||
<div class="main-wiget">
|
<div class="main-wiget">
|
||||||
<div id="widget-link" class="widget-box">
|
<div id="widget-link" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Add a reference link">
|
||||||
<a class="action"><i title="Add a reference link" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-link"></i><%= t(:link) %></h3>
|
<h3 class="widget-title"><i class="icons-link"></i><%= t(:link) %></h3>
|
||||||
<div class="widget-content">
|
<div class="widget-content">
|
||||||
|
@ -221,8 +221,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="widget-file" class="widget-box">
|
<div id="widget-file" class="widget-box">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Added to the file">
|
||||||
<a class="action"><i title="Added to the file" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-paperclip"></i><%= t('nccu.file') %></h3>
|
<h3 class="widget-title"><i class="icons-paperclip"></i><%= t('nccu.file') %></h3>
|
||||||
<div class="widget-content">
|
<div class="widget-content">
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
module Announcement
|
# module Announcement
|
||||||
OrbitApp.registration "Announcement",:type=> 'ModuleApp' do
|
# OrbitApp.registration "Announcement",:type=> 'ModuleApp' do
|
||||||
|
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
# base_url File.expand_path File.dirname(__FILE__)
|
||||||
personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile"
|
# personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile"
|
||||||
|
|
||||||
|
|
||||||
end
|
# end
|
||||||
|
|
||||||
end
|
# end
|
||||||
|
|
||||||
|
|
||||||
# OrbitApp.backend_side_bar 'News' do
|
# OrbitApp.backend_side_bar 'News' do
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
<div id="sub-wiget">
|
<div id="sub-wiget">
|
||||||
|
|
||||||
<div id="widget-status" class="widget-box widget-size-300">
|
<div id="widget-status" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Setting the announcement state">
|
||||||
<a class="action"><i title="Setting the announcement state" class="icon-exclamation-sign icon-white tip"></i></a>
|
<a class="action"><i class="icon-exclamation-sign icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-star"></i>Status</h3>
|
<h3 class="widget-title"><i class="icons-star"></i>Status</h3>
|
||||||
<div class="widget-content clear">
|
<div class="widget-content clear">
|
||||||
|
@ -21,8 +21,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="widget-tags" class="widget-box widget-size-300">
|
<div id="widget-tags" class="widget-box widget-size-300">
|
||||||
<div class="widget-action clear">
|
<div class="widget-action clear tip" title="Setting">
|
||||||
<a class="action"><i title="Setting" class="icon-cog icon-white tip"></i></a>
|
<a class="action"><i class="icon-cog icon-white"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<h3 class="widget-title"><i class="icons-tag"></i>Tags</h3>
|
<h3 class="widget-title"><i class="icons-tag"></i>Tags</h3>
|
||||||
<div class="widget-content clear form-horizontal">
|
<div class="widget-content clear form-horizontal">
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
= Gprs
|
|
||||||
|
|
||||||
This project rocks and uses MIT-LICENSE.
|
|
|
@ -1,2 +0,0 @@
|
||||||
module Panel::Gprs::BackEnd::LocationsHelper
|
|
||||||
end
|
|
|
@ -1,11 +0,0 @@
|
||||||
class Location
|
|
||||||
include Mongoid::Document
|
|
||||||
include Mongoid::Timestamps
|
|
||||||
|
|
||||||
mount_uploader :file, GprsUploader
|
|
||||||
|
|
||||||
field :name
|
|
||||||
field :description
|
|
||||||
field :longitude, type: Float
|
|
||||||
field :latitude, type: Float
|
|
||||||
end
|
|
|
@ -1,30 +0,0 @@
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Name</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :name, :class=>"span4", :placeholder => "Area" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Picture</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.file_field :file %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Coordinates</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
|
||||||
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label" for="">Description</label>
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.text_area :description, :class=>"span4", :cols=>"30", :row=>"5" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<div class="controls">
|
|
||||||
<%= f.submit "Save", :class=>"btn" %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
|
@ -1,4 +0,0 @@
|
||||||
<%= form_for @location, :url=> panel_gprs_back_end_location_path(@location), :html => { :class=>"form-horizontal"} do |f| %>
|
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
||||||
<% end %>
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<%= form_for @location, :url=> panel_gprs_back_end_locations_path, :html => { :class=>"form-horizontal"} do |f| %>
|
|
||||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
|
||||||
<% end %>
|
|
|
@ -1,4 +0,0 @@
|
||||||
require "gprs/engine"
|
|
||||||
|
|
||||||
module Gprs
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class GprsTest < ActiveSupport::TestCase
|
|
||||||
test "truth" do
|
|
||||||
assert_kind_of Module, Gprs
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,4 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class Panel::Gprs::BackEnd::LocationsHelperTest < ActionView::TestCase
|
|
||||||
end
|
|
|
@ -1,6 +1,6 @@
|
||||||
source "http://rubygems.org"
|
source "http://rubygems.org"
|
||||||
|
|
||||||
# Declare your gem's dependencies in gprs.gemspec.
|
# Declare your gem's dependencies in location.gemspec.
|
||||||
# Bundler will treat runtime dependencies like base dependencies, and
|
# Bundler will treat runtime dependencies like base dependencies, and
|
||||||
# development dependencies will be added by default to the :development group.
|
# development dependencies will be added by default to the :development group.
|
||||||
gemspec
|
gemspec
|
|
@ -0,0 +1,3 @@
|
||||||
|
= Location
|
||||||
|
|
||||||
|
This project rocks and uses MIT-LICENSE.
|
|
@ -14,7 +14,7 @@ end
|
||||||
|
|
||||||
RDoc::Task.new(:rdoc) do |rdoc|
|
RDoc::Task.new(:rdoc) do |rdoc|
|
||||||
rdoc.rdoc_dir = 'rdoc'
|
rdoc.rdoc_dir = 'rdoc'
|
||||||
rdoc.title = 'Gprs'
|
rdoc.title = 'Location'
|
||||||
rdoc.options << '--line-numbers'
|
rdoc.options << '--line-numbers'
|
||||||
rdoc.rdoc_files.include('README.rdoc')
|
rdoc.rdoc_files.include('README.rdoc')
|
||||||
rdoc.rdoc_files.include('lib/**/*.rb')
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
@ -1,13 +1,11 @@
|
||||||
class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
class Panel::Location::BackEnd::LocationsController < OrbitBackendController
|
||||||
|
include AdminHelper
|
||||||
|
|
||||||
#before_filter :clean_values, :only => [:create, :update]
|
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :create, :update, :delete]
|
||||||
|
|
||||||
before_filter :force_order_for_visitor,:only => [:index, :new, :edit, :delete]
|
|
||||||
before_filter :force_order_for_user,:except => [:get_locations,:index]
|
before_filter :force_order_for_user,:except => [:get_locations,:index]
|
||||||
#before_filter :for_app_sub_manager,:except => [:index, :new, :edit, :delete, :get_locations]
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@locations = Location.all
|
@location_infos = LocationInfo.all
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
format.json { render json: @locations }
|
format.json { render json: @locations }
|
||||||
|
@ -15,7 +13,7 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@location = Location.new
|
@location_info = LocationInfo.new
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html # new.html.erb
|
format.html # new.html.erb
|
||||||
|
@ -24,11 +22,11 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@location = Location.find(params[:id])
|
@location_info = LocationInfo.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@location = Location.find(params[:id])
|
@location_info = LocationInfo.find(params[:id])
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.json { render json: @location }
|
format.json { render json: @location }
|
||||||
|
@ -36,29 +34,34 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@location = Location.new(params[:location])
|
@location_info = LocationInfo.new(params[:location_info])
|
||||||
@location.save!
|
if @location_info.save
|
||||||
redirect_to panel_gprs_back_end_locations_url
|
flash[:success] = "Success!!"
|
||||||
|
redirect_to panel_location_back_end_locations_url
|
||||||
|
else
|
||||||
|
error_msg = @location_info.errors.full_messages
|
||||||
|
render 'new'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
@location = Location.find(params[:id])
|
@location_info = LocationInfo.find(params[:id])
|
||||||
@location.update_attributes(params[:location])
|
@location_info.update_attributes(params[:location_info])
|
||||||
redirect_to panel_gprs_back_end_locations_url
|
redirect_to panel_location_back_end_locations_url
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@location = Location.find(params[:id])
|
@location_info = LocationInfo.find(params[:id])
|
||||||
@location.destroy
|
@location_info.destroy
|
||||||
redirect_to panel_gprs_back_end_locations_url
|
redirect_to panel_location_back_end_locations_url
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def get_locations
|
def get_locations
|
||||||
locations = Location.all
|
location_infos = LocationInfo.all
|
||||||
@data = Array.new
|
@data = Array.new
|
||||||
|
|
||||||
locations.each do |location|
|
location_infos.each do |location|
|
||||||
picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}"
|
picurl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.url}"
|
||||||
thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}"
|
thumburl = location.file.blank? ? '' : "http://#{request.host_with_port + location.file.thumb.url}"
|
||||||
@data << { name: location.name,
|
@data << { name: location.name,
|
||||||
|
@ -69,9 +72,6 @@ class Panel::Gprs::BackEnd::LocationsController < OrbitBackendController
|
||||||
description: location.description }
|
description: location.description }
|
||||||
end
|
end
|
||||||
|
|
||||||
#print readable json
|
|
||||||
render :json => JSON.pretty_generate({location: @data})
|
render :json => JSON.pretty_generate({location: @data})
|
||||||
|
|
||||||
#render :json => {location: @data}.to_json
|
|
||||||
end
|
end
|
||||||
end
|
end
|
2
vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb
vendored
Normal file
2
vendor/built_in_modules/location/app/helpers/panel/location/back_end/locations_helper.rb
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
module Panel::Location::BackEnd::LocationsHelper
|
||||||
|
end
|
|
@ -0,0 +1,19 @@
|
||||||
|
class LocationInfo
|
||||||
|
include Mongoid::Document
|
||||||
|
include Mongoid::Timestamps
|
||||||
|
|
||||||
|
mount_uploader :file, LocationsUploader
|
||||||
|
|
||||||
|
field :name, localize: true
|
||||||
|
field :description, localize: true
|
||||||
|
field :longitude, type: Float
|
||||||
|
field :latitude, type: Float
|
||||||
|
|
||||||
|
validates :file, presence: true
|
||||||
|
validates :longitude,
|
||||||
|
numericality: { less_than_or_equal_to: 180.0, greater_than_or_equal_to: -180.0 },
|
||||||
|
unless: Proc.new{self.longitude.blank?}
|
||||||
|
validates :latitude,
|
||||||
|
numericality: { less_than_or_equal_to: 90.0, greater_than_or_equal_to: -90.0 },
|
||||||
|
unless: Proc.new{self.latitude.blank?}
|
||||||
|
end
|
|
@ -1,4 +1,4 @@
|
||||||
class GprsUploader < CarrierWave::Uploader::Base
|
class LocationsUploader < CarrierWave::Uploader::Base
|
||||||
|
|
||||||
# Include RMagick or ImageScience support:
|
# Include RMagick or ImageScience support:
|
||||||
# include CarrierWave::RMagick
|
# include CarrierWave::RMagick
|
||||||
|
@ -12,7 +12,7 @@ class GprsUploader < CarrierWave::Uploader::Base
|
||||||
# Override the directory where uploaded files will be stored.
|
# Override the directory where uploaded files will be stored.
|
||||||
# This is a sensible default for uploaders that are meant to be mounted:
|
# This is a sensible default for uploaders that are meant to be mounted:
|
||||||
def store_dir
|
def store_dir
|
||||||
"gprs/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
"location/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Provide a default URL as a default if there hasn't been a file uploaded:
|
# Provide a default URL as a default if there hasn't been a file uploaded:
|
38
vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb
vendored
Normal file
38
vendor/built_in_modules/location/app/views/panel/location/back_end/locations/_form.html.erb
vendored
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
<% @location_info.errors.full_messages.each do |msg| %>
|
||||||
|
<li>* <%= msg %></li>
|
||||||
|
<% end %>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for=""><%= t "name" %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.fields_for :name_translations do |f| %>
|
||||||
|
<%= f.text_field locale, :class=>'span4', :value => (@location_info.name_translations[locale.to_s] rescue nil) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for=""><%= t 'picture' %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= @location_info.file? ? ( link_to t(:view), @location_info.file.url, {:class => 'for_preview btn', :target => '_blank', :title => t(:view)}) : '' %>
|
||||||
|
<%= f.file_field :file %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for=""><%= t 'coordinates' %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.text_field :longitude, :class=>"span2", :placeholder => "Longitude" %>
|
||||||
|
<%= f.text_field :latitude, :class=>"span2", :placeholder => "Langitude" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for=""><%= t 'description' %></label>
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.fields_for :description_translations do |f| %>
|
||||||
|
<%= f.text_area locale, :class=>'span4', :cols=>"30", :row=>"5", :value => (@location_info.description_translations[locale.to_s] rescue nil) %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<div class="controls">
|
||||||
|
<%= f.submit t("submit"), :class=>"btn" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue