-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from bielu/feature/functional-dashboard-and-con…
…tent-app Feature/functional dashboard and content app
- Loading branch information
Showing
23 changed files
with
872 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Umbraco.Cms.Core.Models; | ||
using Umbraco.Cms.Core.Models.ContentEditing; | ||
using Umbraco.Cms.Core.Models.Membership; | ||
|
||
namespace bielu.Umbraco.Cdn.Core.ContentApp; | ||
|
||
public class BieluCdnApp : IContentAppFactory | ||
{ | ||
public global::Umbraco.Cms.Core.Models.ContentEditing.ContentApp? GetContentAppFor(object source, IEnumerable<IReadOnlyUserGroup> userGroups) | ||
{ | ||
// Can implement some logic with userGroups if needed | ||
// Allowing us to display the content app with some restrictions for certain groups | ||
if (userGroups.All(x => x.Alias.ToLowerInvariant() != global::Umbraco.Cms.Core.Constants.Security.AdminGroupAlias)) | ||
return null; | ||
|
||
// Only show app on content items | ||
if (!(source is IContent)) | ||
return null; | ||
// Only show app on content with certain content type alias | ||
// if (!content.ContentType.Alias.Equals("aliasName")) | ||
// return null; | ||
|
||
|
||
|
||
return new global::Umbraco.Cms.Core.Models.ContentEditing.ContentApp | ||
{ | ||
Alias = "bieluCdnApp", | ||
Name = "CDN", | ||
Icon = "icon-hard-drive", | ||
View = "/App_Plugins/bielu.cdn.ui/contentApp.html", | ||
Weight = 900 | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.