PageRenderTime 9ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/admin/Extensions/WidgetGallery.cshtml

#
Razor | 68 lines | 60 code | 8 blank | 0 comment | 1 complexity | 9306abd609fffb9285168801eb82c611 MD5 | raw file
 1@using BlogEngine.Core.Packaging
 2
 3@{
 4    Page.Title = Resources.labels.themes;
 5    Layout = "~/admin/_Layout.cshtml";
 6
 7    var loaderSrc = Path.Combine(BlogEngine.Core.Utils.ApplicationRelativeWebRoot, "pics/ajax-loader.gif");
 8
 9    // disallow gallery page in child blogs.
10    var canManageThemes = BlogEngine.Core.Blog.CurrentInstance.IsPrimary;
11    
12    if (!canManageThemes)
13    {   
14        Response.Redirect("Widgets.cshtml");
15        return;
16    }
17}
18
19 <script type="text/javascript">
20     $(document).ready(function () {
21         $('.loader2').hide();
22         $('.page-loader').hide();
23         GalleryGetPackages(0,'Widget');
24     });
25</script>
26
27<div class="content-box-outer">
28    <div class="content-box-full">
29        
30        <div class="TabRow">
31            <div class="AlternatePagesDivder"></div>
32            <div class="AlternatePageDivTab">
33	            <span class="AlternatePageTab" onclick="location.href='default.cshtml'">Extensions</span>
34            </div>
35            <div class="AlternatePagesDivder"></div>
36            <div class="AlternatePageDivTab">
37	            <span class="AlternatePageTab" onclick="location.href='Themes.cshtml'">@Resources.labels.themes</span>
38            </div>
39            <div class="AlternatePagesDivder"></div>
40            <div class="AlternatePageDivTab">
41	            <span class="AlternatePageTab AlternatePageTabSelected">Widgets</span>
42            </div>
43            <div class="TabRight">
44                <a href="Widgets.cshtml">@Resources.labels.installed</a>
45                <span>|</span> @Resources.labels.gallery
46            </div>
47        </div>
48
49        <div>
50            <div class="gallery-options">
51                <div id="gallery-search">
52                    <input type="text" value="" id="searchGallery" />
53                    <input type="submit" id="btnGalSearch" class="btn primary" onclick="GalleryGetPackages(0,'Widget'); return false;" value="@Resources.labels.search" />
54                </div>
55                <span>@Resources.labels.orderBy: </span>
56                <select id="gallery-sort-order" onchange="GalleryGetPackages(0,'Widget')">
57                    <option value="Alphanumeric">@Resources.labels.alphaNumeric</option>
58                    <option value="Downloads">@Resources.labels.downloads</option>
59                    <option value="Newest" selected="selected">@Resources.labels.newest</option>
60                </select>
61                <img class="page-loader" src="@loaderSrc" alt="loader" />
62            </div>
63            <div id="Container"></div>
64            <div id="Pager"></div>
65        </div>
66        <div class="clear"></div>
67    </div>
68</div>