@******************************************************************************************************* // SelectTheme.cshtml - Gbtc // // Copyright © 2016, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this // file except in compliance with the License. You may obtain a copy of the License at: // // http://opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 01/22/2016 - J. Ritchie Carroll // Generated original version of source code. // //*****************************************************************************************************@ @using System @using System.Collections.Generic @using System.Collections.Specialized @using System.Linq @using System.Net.Http @using GSF @using GSF.Configuration @using GSF.IO @using GSF.Web @using GSF.Web.Model @using GSF.Web.Hosting @using GSF.Web.Shared @inherits ExtendedTemplateBase @{ ViewBag.Title = "Select Theme"; HttpRequestMessage request = ViewBag.Request; string selectedTheme = null; if (ViewBag.IsPost) { PostData postData = request.GetPostData(); selectedTheme = postData.FormData["selectedTheme"]; } string currentTheme = FilePath.GetFileName(ViewBag.Model.Global.BootstrapTheme).Trim(); string[] fileList = FilePath.GetFileList(string.Format("{0}Content/bootstrap-theme-*.css", FilePath.AddPathSuffix(WebServer.Default.Options.WebRootPath))).Select(fileName => FilePath.GetFileName(fileName).Trim()).ToArray(); if (string.IsNullOrWhiteSpace(selectedTheme)) { selectedTheme = currentTheme; } else { CategorizedSettingsElementCollection systemSettings = ConfigurationFile.Current.Settings["systemSettings"]; systemSettings["BootstrapTheme"].Value = "Content/" + selectedTheme; ViewBag.Model.Global.BootstrapTheme = systemSettings["BootstrapTheme"].Value; ConfigurationFile.Current.Save(); } } @section StyleSheets{} @section Scripts{} @{ ViewBag.StyleSheetsSection = RenderSection("StyleSheets").ToString(); ViewBag.ScriptsSection = RenderSection("Scripts").ToString(); }
| # | First Name | Tables |
|---|---|---|
| 1 | Michael | Are formatted like this |
| 2 | Lucille | Do you like them? |
| 3 | Success | |
| 4 | Danger | |
| 5 | Warning | |
| 6 | Active |
| # | First Name | Tables |
|---|---|---|
| 1 | Michael | This one is bordered and condensed |
| 2 | Lucille | Do you still like it? |
This is a lead paragraph.
This is an ordinary paragraph that is long enough to wrap to multiple lines so that you can see how the line spacing looks.
Muted color paragraph.
Warning color paragraph.
Danger color paragraph.
Info color paragraph.
Success color paragraph.
This is text in a small wrapper. NBD, right?
Here's what a blockquote looks like in Bootstrap. Use small to identify the source.
function preFormatting() { // looks like this; var something = somethingElse; return true;}
This is a block style alert.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
This is a panel
This is a panel
This is a panel
This is a panel
This is a panel
This is a panel