@******************************************************************************************************* // 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(); }


@Html.RequestVerificationToken()

Selected Theme Element Rendering Preview:

Headings

Page Header With Small Text

This is an h1 heading

This is an h2 heading

This is an h3 heading

This is an h4 heading

This is an h5 heading
This is an h6 heading
Tables
# 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?
Content Formatting

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?


Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
Full Name
first.last@example.com

Here's what a blockquote looks like in Bootstrap. Use small to identify the source.

  • Normal Unordered List
  • Can Also Work
    • With Nested Children
  • Adds Bullets to Page
  1. Normal Ordered List
  2. Can Also Work
    1. With Nested Children
  3. Adds Bullets to Page

function preFormatting() {  // looks like this;  var something = somethingElse;  return true;}
Forms
Legend

Example block-level help text here.



Buttons

Images

Input Groups

.00

$ .00

Labels and Badges

DefaultSuccessWarningDangerInfo

Inbox 42

Alerts
Oh snap! Change a few things up and try submitting again.
Well done! You successfully read this important alert message.
Heads up! This alert needs your attention, but it's not super important.
Heads up! This alert needs your attention, but it's not super important.

Warning!

This is a block style alert.

Progress Bars
Media Object

Media heading

This is the content for your media.

Media heading

This is the content for your media.

List Groups
This is a header

This is a panel

This is a header

This is a panel

This is a header

This is a panel

This is a header

This is a panel

This is a header

This is a panel

This is a header

This is a panel

  • First Item
  • Second Item
  • Third Item
Default Well
Small Well
Large Padding Well