mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
A little exploratory work on the feature management UI
--HG-- branch : dev
This commit is contained in:
@@ -21,12 +21,13 @@
|
||||
foreach (var feature in features) {
|
||||
//hmmm...I feel like I've done this before...
|
||||
var featureId = string.Format("{0} feature", feature.Descriptor.Name).HtmlClassify();
|
||||
var featureClassName = string.Format("feature {0}", feature.IsEnabled ? "enabled" : "disabled");
|
||||
var featureState = feature.IsEnabled ? "enabled" : "disabled";
|
||||
var featureClassName = string.Format("feature {0}", featureState);
|
||||
if (feature == features.First())
|
||||
featureClassName += " first";
|
||||
if (feature == features.Last())
|
||||
featureClassName += " last"; %>
|
||||
<li class="<%=featureClassName %>" id="<%=Html.AttributeEncode(featureId) %>">
|
||||
<li class="<%=featureClassName %>" id="<%=Html.AttributeEncode(featureId) %>" title="<%=T("{0} is {1}", Html.AttributeEncode(feature.Descriptor.Name), featureState) %>">
|
||||
<div class="summary">
|
||||
<div class="properties">
|
||||
<h3><%=Html.Encode(feature.Descriptor.Name) %></h3><%
|
||||
|
||||
@@ -2,10 +2,37 @@
|
||||
overflow:hidden;
|
||||
}
|
||||
.features .feature {
|
||||
border:1px solid #EEE;
|
||||
border:1px solid #EAEAEA;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
display:block;
|
||||
float:left;
|
||||
height:10em;
|
||||
margin:0 .5% 1% .5%;
|
||||
width:32.2%;
|
||||
width:32.1%;
|
||||
}
|
||||
.features .feature:nth-child(3n+1),
|
||||
.features .feature:nth-child(3n+2),
|
||||
.features .feature:nth-child(3n) {
|
||||
width:32.55%;
|
||||
}
|
||||
.features .feature:nth-child(3n+1) {
|
||||
margin-left:0;
|
||||
}
|
||||
.features .feature:nth-child(3n+2) {
|
||||
margin-right:0;
|
||||
}
|
||||
.features .feature:nth-child(3n) {
|
||||
float:right;
|
||||
margin-left:0;
|
||||
margin-right:0;
|
||||
}
|
||||
|
||||
.features .enabled.feature {
|
||||
background:#D1F2A5;
|
||||
border-color:#BCD994;
|
||||
}
|
||||
.features .disabled.feature {
|
||||
background:#EAEAEA;
|
||||
border-color:#CCC;
|
||||
}
|
||||
Reference in New Issue
Block a user