Skip to content

Commit

Permalink
Merge pull request #1330 from PiranhaCMS/features/ui-primaryimage-exc…
Browse files Browse the repository at this point in the history
…erpt

Updated Primary Image & Excerpt. Fixes #1290
  • Loading branch information
tidyui authored Sep 8, 2020
2 parents 07df731 + 23f45a0 commit 809faf4
Show file tree
Hide file tree
Showing 40 changed files with 423 additions and 387 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<RootNamespace>Piranha.AspNetCore</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand All @@ -13,7 +13,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.AspNetCore.SimpleSecurity</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Piranha CMS simple security provider for AspNetCore</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
5 changes: 2 additions & 3 deletions core/Piranha.AspNetCore/Piranha.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>8.4.1</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.AspNetCore</PackageId>
<PackageVersion>8.4.1</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Piranha CMS middleware components for AspNetCore</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions core/Piranha.AttributeBuilder/Piranha.AttributeBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -11,7 +11,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.AttributeBuilder</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Library for defining content types with Attributes</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<RootNamespace>Piranha.Azure</RootNamespace>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Expand All @@ -13,7 +13,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.Azure.BlobStorage</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Package for storing uploaded media assets on Azure Blob Storage</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
2 changes: 1 addition & 1 deletion core/Piranha.Azure.Search/Piranha.Azure.Search.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand Down
4 changes: 2 additions & 2 deletions core/Piranha.ImageSharp/Piranha.ImageSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand All @@ -12,7 +12,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.ImageSharp</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Package for processing uploaded images using ImageSharp</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand All @@ -12,7 +12,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.Local.FileStorage</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Package for storing uploaded media assets on disc</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand All @@ -12,7 +12,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.Manager.Localization</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Localization for the Piranha CMS manager panel</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand All @@ -13,7 +13,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.Manager.Summernote</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>Summernote WYSIWYG Editor for Piranha CMS</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
4 changes: 2 additions & 2 deletions core/Piranha.Manager.TinyMCE/Piranha.Manager.TinyMCE.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<Version>8.4.0</Version>
<Version>9.0.0-alpha1</Version>
<Company>Piranha CMS</Company>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
Expand All @@ -13,7 +13,7 @@
<SymbolPackageFormat>snupkg</SymbolPackageFormat>

<PackageId>Piranha.Manager.TinyMCE</PackageId>
<PackageVersion>8.4.0</PackageVersion>
<PackageVersion>9.0.0-alpha1</PackageVersion>
<Authors>Piranha CMS</Authors>
<Description>TinyMCE WYSIWYG Editor for Piranha CMS</Description>
<Copyright>Copyright (c) .NET Foundation and Contributors</Copyright>
Expand Down
43 changes: 1 addition & 42 deletions core/Piranha.Manager/Areas/Manager/Pages/PageEdit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<li class="breadcrumb-item">@Localizer.Menu["Content"]</li>
<li class="breadcrumb-item"><a href="~/manager/pages">@Localizer.Menu["Pages"]</a></li>
<li class="breadcrumb-item active" aria-current="page">@Localizer.General["Edit"]</li>
<li v-if="isCopy" class="badge-item"><span class="badge badge-warning">@Localizer.General["Copy"]</span></li>
<li v-if="isCopy" class="badge-item app" :class="{ ready: !loading }"><span class="badge badge-warning">@Localizer.General["Copy"]</span></li>
<li v-if="state === 'draft'" class="badge-item app" :class="{ ready: !loading }"><span class="badge badge-info"><i class="fas fa-pen"></i> @Localizer.General["Draft"]</span></li>
</ol>
</nav>
Expand Down Expand Up @@ -132,47 +132,6 @@

<!-- Blocks -->
<div class="card" :class="{ 'd-none': selectedRegion.uid != 'uid-blocks' }">
<div class="card-body mb-3">
<div class="blocks">
<div class="unsortable" v-if="usePrimaryImage">
<div class="block image-block primary-image">
<div class="block-body has-media-picker rounded" :class="{ empty: primaryImage.id === null }">
<img class="rounded" :src="primaryImageUrl">
<div class="media-picker">
<div class="btn-group float-right">
<button v-on:click.prevent="selectPrimaryImage" class="btn btn-primary text-center">
<i class="fas fa-plus"></i>
</button>
<button v-on:click.prevent="removePrimaryImage" class="btn btn-danger text-center">
<i class="fas fa-times"></i>
</button>
</div>
<div class="card text-left">
<div class="card-body" v-if="primaryImage.id === null">
&nbsp;
</div>
<div class="card-body" v-else>
{{ primaryImage.media.filename }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="unsortable" v-if="useExcerpt">
<div v-if="useHtmlExcerpt" class="block text-block ingress" :class="{ empty: isExcerptEmpty }">
<div id="excerpt-toolbar" class="component-toolbar"></div>
<div id="excerpt-body" class="block-body html-block" contenteditable="true" v-html="excerpt" v-on:blur="onExcerptBlur">
</div>
</div>
<div v-else class="block text-block ingress ingress-text" :class="{ empty: isExcerptEmpty }">
<div class="block-body">
<p contenteditable="true" v-html="excerpt" v-on:blur="onExcerptBlur"></p>
</div>
</div>
</div>
</div>
</div>
<div class="card-body" v-bind:class="{ readonly: isCopy }">
<div id="content-blocks" class="blocks">
<a v-if="!isCopy" href="#" class="block-add unsortable" v-on:click.prevent="piranha.blockpicker.open(piranha.pageedit.addBlock, 0)">
Expand Down
Loading

0 comments on commit 809faf4

Please sign in to comment.