contour 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +12 -0
- data/README.rdoc +2 -2
- data/app/assets/images/twitter-bootstrap/{v2.0.3 → v2.0.4}/glyphicons-halflings-white.png +0 -0
- data/app/assets/images/twitter-bootstrap/{v2.0.3 → v2.0.4}/glyphicons-halflings.png +0 -0
- data/app/assets/javascripts/contour.js +16 -5
- data/app/assets/javascripts/twitter-bootstrap/bootstrap.js.coffee +12 -0
- data/app/assets/javascripts/twitter-bootstrap/{v2.0.3 → v2.0.4}/bootstrap.js +15 -14
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-alert.js +90 -0
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-button.js +96 -0
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-carousel.js +169 -0
- data/app/assets/javascripts/twitter-bootstrap/{bootstrap-collapse.js → v2.0.4/plugins/bootstrap-collapse.js} +2 -2
- data/app/assets/javascripts/twitter-bootstrap/{bootstrap-dropdown.js → v2.0.4/plugins/bootstrap-dropdown.js} +2 -2
- data/app/assets/javascripts/twitter-bootstrap/{bootstrap-modal.js → v2.0.4/plugins/bootstrap-modal.js} +2 -2
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-popover.js +98 -0
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-scrollspy.js +151 -0
- data/app/assets/javascripts/twitter-bootstrap/{bootstrap-tab.js → v2.0.4/plugins/bootstrap-tab.js} +2 -2
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-tooltip.js +275 -0
- data/app/assets/javascripts/twitter-bootstrap/v2.0.4/plugins/bootstrap-typeahead.js +285 -0
- data/app/assets/stylesheets/bootstrap-base-overrides.css +5 -5
- data/app/assets/stylesheets/bootstrap-responsive-overrides.css +5 -0
- data/app/assets/stylesheets/contour.css +3 -2
- data/app/assets/stylesheets/twitter-bootstrap/bootstrap-subnav.css +139 -0
- data/app/assets/stylesheets/twitter-bootstrap/{v2.0.3 → v2.0.4}/bootstrap-responsive.css +10 -3
- data/app/assets/stylesheets/twitter-bootstrap/{v2.0.3 → v2.0.4}/bootstrap.css +128 -105
- data/app/views/contour/authentications/index.html.erb +1 -1
- data/app/views/contour/layouts/_subnav.html.erb +23 -0
- data/app/views/contour/layouts/application.html.erb +1 -1
- data/app/views/contour/registrations/edit.html.erb +1 -1
- data/contour.gemspec +2 -2
- data/lib/contour/version.rb +1 -1
- data/lib/generators/contour/scaffold/templates/_paginate.html.erb +1 -1
- data/lib/generators/contour/scaffold/templates/show.html.erb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +2423 -0
- data/test/unit/helpers/contour_helper_test.rb +13 -0
- metadata +102 -36
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap Responsive v2.0.
|
2
|
+
* Bootstrap Responsive v2.0.4
|
3
3
|
*
|
4
4
|
* Copyright 2012 Twitter, Inc
|
5
5
|
* Licensed under the Apache License v2.0
|
@@ -683,11 +683,18 @@
|
|
683
683
|
body {
|
684
684
|
padding-top: 0;
|
685
685
|
}
|
686
|
-
.navbar-fixed-top
|
686
|
+
.navbar-fixed-top,
|
687
|
+
.navbar-fixed-bottom {
|
687
688
|
position: static;
|
689
|
+
}
|
690
|
+
.navbar-fixed-top {
|
688
691
|
margin-bottom: 18px;
|
689
692
|
}
|
690
|
-
.navbar-fixed-
|
693
|
+
.navbar-fixed-bottom {
|
694
|
+
margin-top: 18px;
|
695
|
+
}
|
696
|
+
.navbar-fixed-top .navbar-inner,
|
697
|
+
.navbar-fixed-bottom .navbar-inner {
|
691
698
|
padding: 5px;
|
692
699
|
}
|
693
700
|
.navbar .container {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap v2.0.
|
2
|
+
* Bootstrap v2.0.4
|
3
3
|
*
|
4
4
|
* Copyright 2012 Twitter, Inc
|
5
5
|
* Licensed under the Apache License v2.0
|
@@ -73,6 +73,10 @@ img {
|
|
73
73
|
-ms-interpolation-mode: bicubic;
|
74
74
|
}
|
75
75
|
|
76
|
+
#map_canvas img {
|
77
|
+
max-width: none;
|
78
|
+
}
|
79
|
+
|
76
80
|
button,
|
77
81
|
input,
|
78
82
|
select,
|
@@ -418,9 +422,6 @@ a:hover {
|
|
418
422
|
|
419
423
|
p {
|
420
424
|
margin: 0 0 9px;
|
421
|
-
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
422
|
-
font-size: 13px;
|
423
|
-
line-height: 18px;
|
424
425
|
}
|
425
426
|
|
426
427
|
p small {
|
@@ -603,7 +604,7 @@ em {
|
|
603
604
|
|
604
605
|
abbr[title] {
|
605
606
|
cursor: help;
|
606
|
-
border-bottom: 1px dotted #
|
607
|
+
border-bottom: 1px dotted #999999;
|
607
608
|
}
|
608
609
|
|
609
610
|
abbr.initialism {
|
@@ -740,7 +741,7 @@ legend {
|
|
740
741
|
line-height: 36px;
|
741
742
|
color: #333333;
|
742
743
|
border: 0;
|
743
|
-
border-bottom: 1px solid #
|
744
|
+
border-bottom: 1px solid #e5e5e5;
|
744
745
|
}
|
745
746
|
|
746
747
|
legend small {
|
@@ -768,79 +769,119 @@ textarea {
|
|
768
769
|
label {
|
769
770
|
display: block;
|
770
771
|
margin-bottom: 5px;
|
771
|
-
color: #333333;
|
772
772
|
}
|
773
773
|
|
774
|
-
input,
|
775
|
-
textarea,
|
776
774
|
select,
|
775
|
+
textarea,
|
776
|
+
input[type="text"],
|
777
|
+
input[type="password"],
|
778
|
+
input[type="datetime"],
|
779
|
+
input[type="datetime-local"],
|
780
|
+
input[type="date"],
|
781
|
+
input[type="month"],
|
782
|
+
input[type="time"],
|
783
|
+
input[type="week"],
|
784
|
+
input[type="number"],
|
785
|
+
input[type="email"],
|
786
|
+
input[type="url"],
|
787
|
+
input[type="search"],
|
788
|
+
input[type="tel"],
|
789
|
+
input[type="color"],
|
777
790
|
.uneditable-input {
|
778
791
|
display: inline-block;
|
779
|
-
width: 210px;
|
780
792
|
height: 18px;
|
781
793
|
padding: 4px;
|
782
794
|
margin-bottom: 9px;
|
783
795
|
font-size: 13px;
|
784
796
|
line-height: 18px;
|
785
797
|
color: #555555;
|
798
|
+
}
|
799
|
+
|
800
|
+
input,
|
801
|
+
textarea {
|
802
|
+
width: 210px;
|
803
|
+
}
|
804
|
+
|
805
|
+
textarea {
|
806
|
+
height: auto;
|
807
|
+
}
|
808
|
+
|
809
|
+
textarea,
|
810
|
+
input[type="text"],
|
811
|
+
input[type="password"],
|
812
|
+
input[type="datetime"],
|
813
|
+
input[type="datetime-local"],
|
814
|
+
input[type="date"],
|
815
|
+
input[type="month"],
|
816
|
+
input[type="time"],
|
817
|
+
input[type="week"],
|
818
|
+
input[type="number"],
|
819
|
+
input[type="email"],
|
820
|
+
input[type="url"],
|
821
|
+
input[type="search"],
|
822
|
+
input[type="tel"],
|
823
|
+
input[type="color"],
|
824
|
+
.uneditable-input {
|
786
825
|
background-color: #ffffff;
|
787
826
|
border: 1px solid #cccccc;
|
788
827
|
-webkit-border-radius: 3px;
|
789
828
|
-moz-border-radius: 3px;
|
790
829
|
border-radius: 3px;
|
830
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
831
|
+
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
832
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
833
|
+
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
|
834
|
+
-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
|
835
|
+
-ms-transition: border linear 0.2s, box-shadow linear 0.2s;
|
836
|
+
-o-transition: border linear 0.2s, box-shadow linear 0.2s;
|
837
|
+
transition: border linear 0.2s, box-shadow linear 0.2s;
|
791
838
|
}
|
792
839
|
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
840
|
+
textarea:focus,
|
841
|
+
input[type="text"]:focus,
|
842
|
+
input[type="password"]:focus,
|
843
|
+
input[type="datetime"]:focus,
|
844
|
+
input[type="datetime-local"]:focus,
|
845
|
+
input[type="date"]:focus,
|
846
|
+
input[type="month"]:focus,
|
847
|
+
input[type="time"]:focus,
|
848
|
+
input[type="week"]:focus,
|
849
|
+
input[type="number"]:focus,
|
850
|
+
input[type="email"]:focus,
|
851
|
+
input[type="url"]:focus,
|
852
|
+
input[type="search"]:focus,
|
853
|
+
input[type="tel"]:focus,
|
854
|
+
input[type="color"]:focus,
|
855
|
+
.uneditable-input:focus {
|
856
|
+
border-color: rgba(82, 168, 236, 0.8);
|
857
|
+
outline: 0;
|
858
|
+
outline: thin dotted \9;
|
859
|
+
/* IE6-9 */
|
797
860
|
|
798
|
-
|
799
|
-
|
800
|
-
|
801
|
-
display: block;
|
861
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
862
|
+
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
863
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
802
864
|
}
|
803
865
|
|
804
|
-
input[type="
|
805
|
-
input[type="checkbox"]
|
806
|
-
input[type="radio"] {
|
807
|
-
width: auto;
|
808
|
-
height: auto;
|
809
|
-
padding: 0;
|
866
|
+
input[type="radio"],
|
867
|
+
input[type="checkbox"] {
|
810
868
|
margin: 3px 0;
|
811
869
|
*margin-top: 0;
|
812
870
|
/* IE7 */
|
813
871
|
|
814
872
|
line-height: normal;
|
815
873
|
cursor: pointer;
|
816
|
-
background-color: transparent;
|
817
|
-
border: 0 \9;
|
818
|
-
/* IE9 and down */
|
819
|
-
|
820
|
-
-webkit-border-radius: 0;
|
821
|
-
-moz-border-radius: 0;
|
822
|
-
border-radius: 0;
|
823
|
-
}
|
824
|
-
|
825
|
-
input[type="image"] {
|
826
|
-
border: 0;
|
827
874
|
}
|
828
875
|
|
829
|
-
input[type="
|
876
|
+
input[type="submit"],
|
877
|
+
input[type="reset"],
|
878
|
+
input[type="button"],
|
879
|
+
input[type="radio"],
|
880
|
+
input[type="checkbox"] {
|
830
881
|
width: auto;
|
831
|
-
padding: initial;
|
832
|
-
line-height: initial;
|
833
|
-
background-color: #ffffff;
|
834
|
-
background-color: initial;
|
835
|
-
border: initial;
|
836
|
-
-webkit-box-shadow: none;
|
837
|
-
-moz-box-shadow: none;
|
838
|
-
box-shadow: none;
|
839
882
|
}
|
840
883
|
|
841
|
-
|
842
|
-
input[type="reset"],
|
843
|
-
input[type="submit"] {
|
884
|
+
.uneditable-textarea {
|
844
885
|
width: auto;
|
845
886
|
height: auto;
|
846
887
|
}
|
@@ -856,13 +897,9 @@ input[type="file"] {
|
|
856
897
|
line-height: 28px;
|
857
898
|
}
|
858
899
|
|
859
|
-
input[type="file"] {
|
860
|
-
line-height: 18px \9;
|
861
|
-
}
|
862
|
-
|
863
900
|
select {
|
864
901
|
width: 220px;
|
865
|
-
|
902
|
+
border: 1px solid #bbb;
|
866
903
|
}
|
867
904
|
|
868
905
|
select[multiple],
|
@@ -870,18 +907,13 @@ select[size] {
|
|
870
907
|
height: auto;
|
871
908
|
}
|
872
909
|
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
height: auto;
|
881
|
-
}
|
882
|
-
|
883
|
-
input[type="hidden"] {
|
884
|
-
display: none;
|
910
|
+
select:focus,
|
911
|
+
input[type="file"]:focus,
|
912
|
+
input[type="radio"]:focus,
|
913
|
+
input[type="checkbox"]:focus {
|
914
|
+
outline: thin dotted #333;
|
915
|
+
outline: 5px auto -webkit-focus-ring-color;
|
916
|
+
outline-offset: -2px;
|
885
917
|
}
|
886
918
|
|
887
919
|
.radio,
|
@@ -914,42 +946,6 @@ input[type="hidden"] {
|
|
914
946
|
margin-left: 10px;
|
915
947
|
}
|
916
948
|
|
917
|
-
input,
|
918
|
-
textarea {
|
919
|
-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
920
|
-
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
921
|
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
922
|
-
-webkit-transition: border linear 0.2s, box-shadow linear 0.2s;
|
923
|
-
-moz-transition: border linear 0.2s, box-shadow linear 0.2s;
|
924
|
-
-ms-transition: border linear 0.2s, box-shadow linear 0.2s;
|
925
|
-
-o-transition: border linear 0.2s, box-shadow linear 0.2s;
|
926
|
-
transition: border linear 0.2s, box-shadow linear 0.2s;
|
927
|
-
}
|
928
|
-
|
929
|
-
input:focus,
|
930
|
-
textarea:focus {
|
931
|
-
border-color: rgba(82, 168, 236, 0.8);
|
932
|
-
outline: 0;
|
933
|
-
outline: thin dotted \9;
|
934
|
-
/* IE6-9 */
|
935
|
-
|
936
|
-
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
937
|
-
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
938
|
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
|
939
|
-
}
|
940
|
-
|
941
|
-
input[type="file"]:focus,
|
942
|
-
input[type="radio"]:focus,
|
943
|
-
input[type="checkbox"]:focus,
|
944
|
-
select:focus {
|
945
|
-
outline: thin dotted #333;
|
946
|
-
outline: 5px auto -webkit-focus-ring-color;
|
947
|
-
outline-offset: -2px;
|
948
|
-
-webkit-box-shadow: none;
|
949
|
-
-moz-box-shadow: none;
|
950
|
-
box-shadow: none;
|
951
|
-
}
|
952
|
-
|
953
949
|
.input-mini {
|
954
950
|
width: 60px;
|
955
951
|
}
|
@@ -986,6 +982,15 @@ textarea[class*="span"],
|
|
986
982
|
margin-left: 0;
|
987
983
|
}
|
988
984
|
|
985
|
+
.input-append input[class*="span"],
|
986
|
+
.input-append .uneditable-input[class*="span"],
|
987
|
+
.input-prepend input[class*="span"],
|
988
|
+
.input-prepend .uneditable-input[class*="span"],
|
989
|
+
.row-fluid .input-prepend [class*="span"],
|
990
|
+
.row-fluid .input-append [class*="span"] {
|
991
|
+
display: inline-block;
|
992
|
+
}
|
993
|
+
|
989
994
|
input,
|
990
995
|
textarea,
|
991
996
|
.uneditable-input {
|
@@ -1088,6 +1093,8 @@ input[type="checkbox"][readonly] {
|
|
1088
1093
|
color: #c09853;
|
1089
1094
|
}
|
1090
1095
|
|
1096
|
+
.control-group.warning .checkbox,
|
1097
|
+
.control-group.warning .radio,
|
1091
1098
|
.control-group.warning input,
|
1092
1099
|
.control-group.warning select,
|
1093
1100
|
.control-group.warning textarea {
|
@@ -1095,6 +1102,8 @@ input[type="checkbox"][readonly] {
|
|
1095
1102
|
border-color: #c09853;
|
1096
1103
|
}
|
1097
1104
|
|
1105
|
+
.control-group.warning .checkbox:focus,
|
1106
|
+
.control-group.warning .radio:focus,
|
1098
1107
|
.control-group.warning input:focus,
|
1099
1108
|
.control-group.warning select:focus,
|
1100
1109
|
.control-group.warning textarea:focus {
|
@@ -1117,6 +1126,8 @@ input[type="checkbox"][readonly] {
|
|
1117
1126
|
color: #b94a48;
|
1118
1127
|
}
|
1119
1128
|
|
1129
|
+
.control-group.error .checkbox,
|
1130
|
+
.control-group.error .radio,
|
1120
1131
|
.control-group.error input,
|
1121
1132
|
.control-group.error select,
|
1122
1133
|
.control-group.error textarea {
|
@@ -1124,6 +1135,8 @@ input[type="checkbox"][readonly] {
|
|
1124
1135
|
border-color: #b94a48;
|
1125
1136
|
}
|
1126
1137
|
|
1138
|
+
.control-group.error .checkbox:focus,
|
1139
|
+
.control-group.error .radio:focus,
|
1127
1140
|
.control-group.error input:focus,
|
1128
1141
|
.control-group.error select:focus,
|
1129
1142
|
.control-group.error textarea:focus {
|
@@ -1146,6 +1159,8 @@ input[type="checkbox"][readonly] {
|
|
1146
1159
|
color: #468847;
|
1147
1160
|
}
|
1148
1161
|
|
1162
|
+
.control-group.success .checkbox,
|
1163
|
+
.control-group.success .radio,
|
1149
1164
|
.control-group.success input,
|
1150
1165
|
.control-group.success select,
|
1151
1166
|
.control-group.success textarea {
|
@@ -1153,6 +1168,8 @@ input[type="checkbox"][readonly] {
|
|
1153
1168
|
border-color: #468847;
|
1154
1169
|
}
|
1155
1170
|
|
1171
|
+
.control-group.success .checkbox:focus,
|
1172
|
+
.control-group.success .radio:focus,
|
1156
1173
|
.control-group.success input:focus,
|
1157
1174
|
.control-group.success select:focus,
|
1158
1175
|
.control-group.success textarea:focus {
|
@@ -1190,7 +1207,7 @@ select:focus:required:invalid:focus {
|
|
1190
1207
|
margin-top: 18px;
|
1191
1208
|
margin-bottom: 18px;
|
1192
1209
|
background-color: #f5f5f5;
|
1193
|
-
border-top: 1px solid #
|
1210
|
+
border-top: 1px solid #e5e5e5;
|
1194
1211
|
*zoom: 1;
|
1195
1212
|
}
|
1196
1213
|
|
@@ -1219,6 +1236,10 @@ select:focus:required:invalid:focus {
|
|
1219
1236
|
color: #999999;
|
1220
1237
|
}
|
1221
1238
|
|
1239
|
+
:-ms-input-placeholder {
|
1240
|
+
color: #999999;
|
1241
|
+
}
|
1242
|
+
|
1222
1243
|
::-webkit-input-placeholder {
|
1223
1244
|
color: #999999;
|
1224
1245
|
}
|
@@ -2433,11 +2454,11 @@ table .span24 {
|
|
2433
2454
|
*z-index: 1000;
|
2434
2455
|
}
|
2435
2456
|
|
2436
|
-
.open .dropdown-menu {
|
2457
|
+
.open > .dropdown-menu {
|
2437
2458
|
display: block;
|
2438
2459
|
}
|
2439
2460
|
|
2440
|
-
.pull-right .dropdown-menu {
|
2461
|
+
.pull-right > .dropdown-menu {
|
2441
2462
|
right: 0;
|
2442
2463
|
left: auto;
|
2443
2464
|
}
|
@@ -2499,7 +2520,6 @@ table .span24 {
|
|
2499
2520
|
|
2500
2521
|
.fade {
|
2501
2522
|
opacity: 0;
|
2502
|
-
filter: alpha(opacity=0);
|
2503
2523
|
-webkit-transition: opacity 0.15s linear;
|
2504
2524
|
-moz-transition: opacity 0.15s linear;
|
2505
2525
|
-ms-transition: opacity 0.15s linear;
|
@@ -2509,7 +2529,6 @@ table .span24 {
|
|
2509
2529
|
|
2510
2530
|
.fade.in {
|
2511
2531
|
opacity: 1;
|
2512
|
-
filter: alpha(opacity=100);
|
2513
2532
|
}
|
2514
2533
|
|
2515
2534
|
.collapse {
|
@@ -3701,6 +3720,10 @@ input[type="submit"].btn.btn-mini {
|
|
3701
3720
|
color: #cccccc;
|
3702
3721
|
}
|
3703
3722
|
|
3723
|
+
.navbar-search .search-query:-ms-input-placeholder {
|
3724
|
+
color: #cccccc;
|
3725
|
+
}
|
3726
|
+
|
3704
3727
|
.navbar-search .search-query::-webkit-input-placeholder {
|
3705
3728
|
color: #cccccc;
|
3706
3729
|
}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
<%= image_tag "contour/#{authentication.provider}_32.png", height: "32px" %>
|
13
13
|
<div class="provider"><%= authentication.provider.titleize %></div>
|
14
14
|
<div class="uid"><%= authentication.uid %></div>
|
15
|
-
<%= link_to "X", authentication, confirm: 'Are you sure you want to remove this authentication option?'
|
15
|
+
<%= link_to "X", authentication, method: :delete, class: "remove", data: { confirm: 'Are you sure you want to remove this authentication option?' } %>
|
16
16
|
</div>
|
17
17
|
<% end %>
|
18
18
|
<div style="clear:both"></div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div style="min-height:36px">
|
2
|
+
<div class="subnav">
|
3
|
+
<ul class="nav nav-pills">
|
4
|
+
<% links.each_with_index do |link_hash, index| %>
|
5
|
+
<% sublinks = (link_hash[:sublinks] || []) %>
|
6
|
+
<% href = (sublinks.size == 0 ? (link_hash[:href] || '#') : "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}") %>
|
7
|
+
<li class="<%= 'dropdown' if sublinks.size %> <%= 'active' if index == 0 %>">
|
8
|
+
<% if sublinks.size == 0 %>
|
9
|
+
<%= link_to link_hash[:name].to_s, href %>
|
10
|
+
<% else %>
|
11
|
+
<%= link_to (link_hash[:name].to_s + ' <b class="caret"></b>').html_safe, href, class: 'dropdown-toggle', data: { toggle: 'dropdown' } %>
|
12
|
+
<ul class="dropdown-menu">
|
13
|
+
<% sublinks.each_with_index do |sublink_hash, sublink_index| %>
|
14
|
+
<% sublink_href = (sublink_hash[:href] || "##{link_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{index}_#{sublink_hash[:name].to_s.gsub(/[^\w]/, '_').downcase}_#{sublink_index}") %>
|
15
|
+
<%= link_to sublink_hash[:name].to_s, sublink_href %>
|
16
|
+
<% end %>
|
17
|
+
</ul>
|
18
|
+
<% end %>
|
19
|
+
</li>
|
20
|
+
<% end %>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
</div>
|