-
Notifications
You must be signed in to change notification settings - Fork 24
Static Tags List #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static Tags List #60
Conversation
… toggle between TextBox and ListBox for tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small cleanup items, but looks good otherwise. Can you add some example screenshots of what changes this PR introduces?
Public Const USE_STATIC_TAGS_LIST_SUBMIT_SETTING As String = "UseStaticTagsList" | ||
Public Const USE_STATIC_TAGS_LIST_SUBMIT_SETTING_DEFAULT As Boolean = False |
This comment was marked as duplicate.
This comment was marked as duplicate.
Sorry, something went wrong.
Components/ArticleSettings.vb
Outdated
Public ReadOnly Property UseStaticTagsListSubmit() As Boolean | ||
Get | ||
If (Settings.Contains(ArticleConstants.USE_STATIC_TAGS_LIST_SUBMIT_SETTING)) Then | ||
Return Convert.ToBoolean(Settings(ArticleConstants.USE_STATIC_TAGS_LIST_SUBMIT_SETTING).ToString()) | ||
Else | ||
Return ArticleConstants.USE_STATIC_TAGS_LIST_SUBMIT_SETTING_DEFAULT |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ucSubmitNews.ascx.vb
Outdated
|
||
Private Sub SelectTags(ByVal tagList As String) | ||
Dim objTagController As New TagController | ||
For Each tag As String In tagList.Split(","c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check for the case when tagList
is Nothing
, or does it always come across as an empty string if it's not set?
Also, consider using the Split
overload that takes a StringSplitOptions
to avoid having to handle empty tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, ArticleInfo.Tags
is sourced from dbo.Ventrian_NewsArticles_SplitTags(@ArticleID int)
which will always default to an empty string.
And good call 👍
ucSubmitNews.ascx.vb
Outdated
If (tag <> "") Then | ||
Dim objTag As TagInfo = objTagController.Get(ModuleId, tag) | ||
|
||
If Not (objTag Is Nothing) Then |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ucSubmitNews.ascx.vb
Outdated
|
||
If Not (objTag Is Nothing) Then | ||
Dim li As ListItem = lstTags.Items.FindByValue(objTag.Name) | ||
If Not (li Is Nothing) Then |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ucSubmitNews.ascx.vb
Outdated
|
||
objTagController.Add(articleID, objTag.TagID) | ||
If Not (objTag Is Nothing) Then |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
ucViewOptions.ascx
Outdated
<table id="tblTags" cellspacing="2" cellpadding="2" summary="Appearance Design Table" | ||
border="0" runat="server"> | ||
<tr> | ||
<td class="SubHead" width="200"><dnn:label id="Label12" runat="server" resourcekey="UseStaticTagsList" controlname="chkUseStaticTagsList"></dnn:label></td> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
<data name="UseStaticTagsList.Text" xml:space="preserve"> | ||
<value>Use Static Tags List</value> | ||
</data> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Yes, some screen prints would be nice. |
Screenshots are added above and feedback addressed. Thank you both! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ticleTag table and allow for explicitly defining display order via ucSubmitNews UI
…Tags, and make addTags imagebutton append tags to Article Tags list
Description
Allow for using a static tags list when creating articles. This will avoid end-users (article admins) from creating unwanted/duplicated tags.
Change Log
Use Static Tags List
ArticleSetting andTag Settings
section in Main Optionsasp:TextBox
andasp:ListBox
in ucSubmitNews.ascxScreenshots
AdminOptions - Tag Settings Section
SubmitNews - Tags ListBoxes (
UseStaticTagsList
setting enabled)SubmitNews - Tags TextBox (
UseStaticTagsList
setting disabled)