mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Adding Content RTL/LTR class, and stylign content pages
This commit is contained in:
@@ -21,8 +21,10 @@
|
||||
<fieldset class="permalink">
|
||||
<label>@T("Permalink")</label>
|
||||
@if (Model.Settings.AllowCustomPattern) {
|
||||
<span>@Url.MakeAbsolute("/")@urlPrefix</span>
|
||||
<span>@Html.TextBoxFor(m => m.CurrentUrl, new {@class = "text"})</span>
|
||||
<span class="permalink-definition" dir="ltr">
|
||||
<span>@Url.MakeAbsolute("/")@urlPrefix</span>
|
||||
<span>@Html.TextBoxFor(m => m.CurrentUrl, new { @class = "text" })</span>
|
||||
</span>
|
||||
<span class="hint">@T("Save the current item and leave the input empty to have it automatically generated using the pattern {0} e.g., {1}", defaultPattern.Name, defaultPattern.Description)</span>
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -56,10 +56,10 @@ namespace Orchard.Localization.Services {
|
||||
|
||||
var culture = (contentItem != null) ? _localizationService.GetContentCulture(contentItem) : _cultureManager.GetSiteCulture();
|
||||
|
||||
var cultureInfo = CultureInfo.GetCultureInfo(culture);
|
||||
var className = "content-" + (CultureInfo.GetCultureInfo(culture).TextInfo.IsRightToLeft ? "rtl" : "ltr");
|
||||
|
||||
if (cultureInfo.TextInfo.IsRightToLeft)
|
||||
_workContext.Layout.Content.Attributes.Add("dir", "rtl");
|
||||
if (!_workContext.Layout.Content.Classes.Contains(className))
|
||||
_workContext.Layout.Content.Classes.Add(className);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,16 @@
|
||||
.publish-later-datetime button {
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* RTL */
|
||||
.dir-rtl .publish-later-datetime {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.dir-rtl .publish-later-datetime button {
|
||||
margin-left: inherit;
|
||||
margin-right: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<fieldset class="publish-later-datetime">
|
||||
|
||||
@@ -308,11 +308,11 @@ list-style:decimal inside;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.dir-rtl .widgets-listed li, #widgets-available li {
|
||||
.dir-rtl .widgets-listed li, .dir-rtl #widgets-available li {
|
||||
margin: 0 5px 5px 0;
|
||||
}
|
||||
|
||||
.dir-rtl .widgets-listed li li, #widgets-layer-visibility li {
|
||||
.dir-rtl .widgets-listed li li, .dir-rtl #widgets-layer-visibility li {
|
||||
padding: 5px 25px 5px 100px;
|
||||
border-style: none solid none none;
|
||||
border-width: 0 3px 0 0;
|
||||
@@ -328,7 +328,12 @@ list-style:decimal inside;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
.dir-rtl .widgets-listed .widgets-zone-widgets .dir-rtl .widgets-move-somewhere {
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
.dir-rtl .widgets-listed .widgets-zone-widgets .widgets-move-somewhere {
|
||||
left: inherit;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1351,9 +1351,6 @@ caption, th, td { text-align: right; }
|
||||
.dir-rtl #menu .menu-admin ul a:link,
|
||||
.dir-rtl #menu .menu-admin ul a:visited {
|
||||
padding:4px 20px 6px 0;
|
||||
}
|
||||
.dir-rtl #menu #main ul h2 {
|
||||
|
||||
}
|
||||
.dir-rtl #menu .menu-admin li h3 a,
|
||||
.dir-rtl #menu .menu-admin li h3 span { /* only the h3 gets an icon by default */
|
||||
@@ -1369,6 +1366,35 @@ caption, th, td { text-align: right; }
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
|
||||
/* RTL Core Modules
|
||||
***************************************************************/
|
||||
/* Routable */
|
||||
.dir-rtl .permalink input.text {
|
||||
margin-right:0;
|
||||
}
|
||||
/* Routable and Containers (Core) */
|
||||
.dir-rtl .with-checkbox .checkbox-and-label { /* todo: (heskew) routable should be changed to use this too */
|
||||
margin-left:inherit;
|
||||
margin-right:10px;
|
||||
}
|
||||
.dir-rtl fieldset.publish-button, fieldset.delete-button, .dir-rtl fieldset.save-button {
|
||||
float:right;
|
||||
}
|
||||
.dir-rtl fieldset.save-button {
|
||||
clear:right;
|
||||
}
|
||||
.dir-rtl fieldset.publish-button {
|
||||
margin: 0 0 0 12px ;
|
||||
}
|
||||
.dir-rtl fieldset.delete-button {
|
||||
margin: 0 12px 0 0;
|
||||
}
|
||||
|
||||
.content-rtl .permalink input.text {
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
|
||||
/* RTL Forms
|
||||
***************************************************************/
|
||||
|
||||
@@ -1383,6 +1409,16 @@ caption, th, td { text-align: right; }
|
||||
text-align:left;
|
||||
}
|
||||
|
||||
.content-ltr textarea,
|
||||
.content-ltr input {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.content-rtl textarea,
|
||||
.content-rtl input {
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
|
||||
/* RTL (Items) Tables
|
||||
***************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user