diff --git a/App_LocalResources/ucViewOptions.ascx.resx b/App_LocalResources/ucViewOptions.ascx.resx
index 5873c8c..7cad39a 100755
--- a/App_LocalResources/ucViewOptions.ascx.resx
+++ b/App_LocalResources/ucViewOptions.ascx.resx
@@ -546,6 +546,9 @@
Category Settings
+
+ Tag Settings
+
Check categories to auto-select them on the create article screen.
@@ -1134,6 +1137,9 @@
Filter Category Submit
+
+ Use Static Tags List
+
-- All Groups --
diff --git a/Components/ArticleSettings.vb b/Components/ArticleSettings.vb
index e0ee676..223b06f 100755
--- a/Components/ArticleSettings.vb
+++ b/Components/ArticleSettings.vb
@@ -244,6 +244,16 @@ Namespace Ventrian.NewsArticles
End Get
End Property
+ 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
+ End If
+ End Get
+ End Property
+
Public ReadOnly Property IncludeInPageName() As Boolean
Get
If (Settings.Contains(ArticleConstants.CATEGORY_NAME_SETTING)) Then
diff --git a/Components/Common/ArticleConstants.vb b/Components/Common/ArticleConstants.vb
index 14f3048..1c040d0 100755
--- a/Components/Common/ArticleConstants.vb
+++ b/Components/Common/ArticleConstants.vb
@@ -113,6 +113,9 @@ Namespace Ventrian.NewsArticles
Public Const CATEGORY_FILTER_SUBMIT_SETTING_DEFAULT As Boolean = False
Public Const CATEGORY_SORT_SETTING As String = "CategorySortType"
Public Const CATEGORY_SORT_SETTING_DEFAULT As CategorySortType = CategorySortType.SortOrder
+ Public Const USE_STATIC_TAGS_LIST_SUBMIT_SETTING As String = "UseStaticTagsList"
+ Public Const USE_STATIC_TAGS_LIST_SUBMIT_SETTING_DEFAULT As Boolean = False
+
' Category Security Settings
Public Const PERMISSION_CATEGORY_VIEW_SETTING As String = "PermissionCategoryView"
diff --git a/ucSubmitNews.ascx b/ucSubmitNews.ascx
index 27a055e..5833065 100755
--- a/ucSubmitNews.ascx
+++ b/ucSubmitNews.ascx
@@ -227,6 +227,8 @@
|
+
+
|
diff --git a/ucSubmitNews.ascx.designer.vb b/ucSubmitNews.ascx.designer.vb
index 31aec3f..d434457 100755
--- a/ucSubmitNews.ascx.designer.vb
+++ b/ucSubmitNews.ascx.designer.vb
@@ -671,6 +671,24 @@ Namespace Ventrian.NewsArticles
'''
Protected WithEvents plTags As Global.System.Web.UI.UserControl
+ '''
+ '''txtTags control.
+ '''
+ '''
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''
+ Protected WithEvents txtTags As Global.System.Web.UI.WebControls.TextBox
+
+ '''
+ '''lblTags control.
+ '''
+ '''
+ '''Auto-generated field.
+ '''To modify move field declaration from designer file to code-behind file.
+ '''
+ Protected WithEvents lblTags As Global.System.Web.UI.WebControls.Label
+
'''
'''lstTags control.
'''
diff --git a/ucSubmitNews.ascx.vb b/ucSubmitNews.ascx.vb
index 5ce4ca5..a171ac0 100755
--- a/ucSubmitNews.ascx.vb
+++ b/ucSubmitNews.ascx.vb
@@ -192,7 +192,12 @@ Namespace Ventrian.NewsArticles
End If
Next
- SelectTags(objArticle.Tags)
+ If (ArticleSettings.UseStaticTagsListSubmit) Then
+ SelectTags(objArticle.Tags)
+ Else
+ txtTags.Text = objArticle.Tags
+ End If
+
Dim objPageController As New PageController
Dim pages As ArrayList = objPageController.GetPageList(_articleID)
@@ -338,12 +343,19 @@ Namespace Ventrian.NewsArticles
End Sub
Private Sub BindTags()
- Dim objTagController As New TagController
- Dim objTags As ArrayList = objTagController.List(ModuleId, Null.NullInteger)
+ If (ArticleSettings.UseStaticTagsListSubmit) Then
+ txtTags.Visible = False
+ lblTags.Visible = False
+
+ Dim objTagController As New TagController
+ Dim objTags As ArrayList = objTagController.List(ModuleId, Null.NullInteger)
- objTags.Sort()
- lstTags.DataSource = objTags
- lstTags.DataBind()
+ objTags.Sort()
+ lstTags.DataSource = objTags
+ lstTags.DataBind()
+ Else
+ lstTags.Visible = False
+ End If
End Sub
Private Sub SelectTags(ByVal tagList As String)
@@ -1171,22 +1183,47 @@ Namespace Ventrian.NewsArticles
Dim objLinkedArticle As ArticleInfo = objArticleController.GetArticle(Convert.ToInt32(drpMirrorArticle.SelectedValue))
If (objLinkedArticle IsNot Nothing) Then
- SelectTags(objLinkedArticle.Tags)
+ If (ArticleSettings.UseStaticTagsListSubmit) Then
+ SelectTags(objLinkedArticle.Tags)
+ Else
+ txtTags.Text = objLinkedArticle.Tags
+ End If
End If
End If
Dim objTagController As New TagController
objTagController.DeleteArticleTag(articleID)
- For Each li As ListItem In lstTags.Items
- If (li.Selected) Then
- Dim objTag As TagInfo = objTagController.Get(ModuleId, li.Value)
+ If (ArticleSettings.UseStaticTagsListSubmit) Then
+ For Each li As ListItem In lstTags.Items
+ If (li.Selected) Then
+ Dim objTag As TagInfo = objTagController.Get(ModuleId, li.Value)
- If Not (objTag Is Nothing) Then
- objTagController.Add(articleID, objTag.TagID)
+ If Not (objTag Is Nothing) Then
+ objTagController.Add(articleID, objTag.TagID)
+ End If
End If
+ Next
+ Else
+ If (txtTags.Text <> "") Then
+ Dim tags As String() = txtTags.Text.Split(","c)
+ For Each tag As String In tags
+ If (tag <> "") Then
+ Dim objTag As TagInfo = objTagController.Get(ModuleId, tag)
+
+ If (objTag Is Nothing) Then
+ objTag = New TagInfo
+ objTag.Name = tag
+ objTag.NameLowered = tag.ToLower()
+ objTag.ModuleID = ModuleId
+ objTag.TagID = objTagController.Add(objTag)
+ End If
+
+ objTagController.Add(articleID, objTag.TagID)
+ End If
+ Next
End If
- Next
+ End If
End Sub
diff --git a/ucViewOptions.ascx b/ucViewOptions.ascx
index 63205e8..855c14d 100755
--- a/ucViewOptions.ascx
+++ b/ucViewOptions.ascx
@@ -177,6 +177,16 @@
+
+
+