Use icon from paragraph class
authorThierry Florac <thierry.florac@onf.fr>
Mon, 12 Nov 2018 16:48:29 +0100
changeset 1083 112b6aa11de4
parent 1082 18e6d6cddcc9
child 1084 6b6a884fa28a
Use icon from paragraph class
src/pyams_content/component/paragraph/zmi/audio.py
src/pyams_content/component/paragraph/zmi/frame.py
src/pyams_content/component/paragraph/zmi/html.py
src/pyams_content/component/paragraph/zmi/keypoint.py
src/pyams_content/component/paragraph/zmi/map.py
src/pyams_content/component/paragraph/zmi/milestone.py
src/pyams_content/component/paragraph/zmi/pictogram.py
src/pyams_content/component/paragraph/zmi/verbatim.py
src/pyams_content/component/paragraph/zmi/video.py
--- a/src/pyams_content/component/paragraph/zmi/audio.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/audio.py	Mon Nov 12 16:48:29 2018 +0100
@@ -48,7 +48,7 @@
     """Audio paragraph add menu"""
 
     label = _("Audio paragraph...")
-    label_css_class = 'fa fa-fw fa-volume-up'
+    label_css_class = 'fa fa-fw ' + AudioParagraph.icon_class
     url = 'add-audio-paragraph.html'
     paragraph_type = AUDIO_PARAGRAPH_TYPE
 
@@ -62,7 +62,7 @@
 
     legend = _("Add new audio paragraph")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-volume-up'
+    icon_css_class = 'fa fa-fw ' + AudioParagraph.icon_class
 
     fields = field.Fields(IAudioParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -84,7 +84,7 @@
 
     legend = _("Edit audio properties")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-volume-up'
+    icon_css_class = 'fa fa-fw ' + AudioParagraph.icon_class
 
     fields = field.Fields(IAudioParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/frame.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/frame.py	Mon Nov 12 16:48:29 2018 +0100
@@ -94,7 +94,7 @@
     """Framed text paragraph add menu"""
 
     label = _("Framed text...")
-    label_css_class = 'fa fa-fw fa-window-maximize'
+    label_css_class = 'fa fa-fw ' + FrameParagraph.icon_class
     url = 'add-frame-paragraph.html'
     paragraph_type = FRAME_PARAGRAPH_TYPE
 
@@ -109,7 +109,7 @@
 
     legend = _("Add new framed text paragraph")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-window-maximize'
+    icon_css_class = 'fa fa-fw ' + FrameParagraph.icon_class
     label_css_class = 'control-label col-md-2'
     input_css_class = 'col-md-10'
 
@@ -135,7 +135,7 @@
 
     legend = _("Edit framed text paragraph properties")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-window-maximize'
+    icon_css_class = 'fa fa-fw ' + FrameParagraph.icon_class
     label_css_class = 'control-label col-md-2'
     input_css_class = 'col-md-10'
 
--- a/src/pyams_content/component/paragraph/zmi/html.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/html.py	Mon Nov 12 16:48:29 2018 +0100
@@ -72,7 +72,7 @@
     """Raw HTML paragraph add menu"""
 
     label = _("Raw HTML...")
-    label_css_class = 'fa fa-fw fa-code'
+    label_css_class = 'fa fa-fw ' + RawParagraph.icon_class
     url = 'add-raw-paragraph.html'
     paragraph_type = RAW_PARAGRAPH_TYPE
 
@@ -86,7 +86,7 @@
 
     legend = _("Add new raw HTML paragraph")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-code'
+    icon_css_class = 'fa fa-fw ' + RawParagraph.icon_class
     label_css_class = 'control-label col-md-2'
     input_css_class = 'col-md-10'
 
@@ -115,7 +115,7 @@
     prefix = 'raw_properties.'
 
     legend = _("Edit raw HTML paragraph properties")
-    icon_css_class = 'fa fa-fw fa-code'
+    icon_css_class = 'fa fa-fw ' + RawParagraph.icon_class
 
     fields = field.Fields(IRawParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
@@ -155,7 +155,7 @@
     """Rich text paragraph add menu"""
 
     label = _("Rich text...")
-    label_css_class = 'fa fa-fw fa-font'
+    label_css_class = 'fa fa-fw ' + HTMLParagraph.icon_class
     url = 'add-html-paragraph.html'
     paragraph_type = HTML_PARAGRAPH_TYPE
 
@@ -169,7 +169,7 @@
 
     legend = _("Add new rich text paragraph")
     dialog_class = 'modal-max'
-    icon_css_class = 'fa fa-fw fa-font'
+    icon_css_class = 'fa fa-fw ' + HTMLParagraph.icon_class
     label_css_class = 'control-label col-md-2'
     input_css_class = 'col-md-10'
 
@@ -206,7 +206,7 @@
 
     legend = _("Edit rich text paragraph properties")
     dialog_class = 'modal-max'
-    icon_css_class = 'fa fa-fw fa-font'
+    icon_css_class = 'fa fa-fw ' + HTMLParagraph.icon_class
     label_css_class = 'control-label col-md-2'
     input_css_class = 'col-md-10'
 
--- a/src/pyams_content/component/paragraph/zmi/keypoint.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/keypoint.py	Mon Nov 12 16:48:29 2018 +0100
@@ -44,7 +44,7 @@
     """Key points paragraph add menu"""
 
     label = _("Key points...")
-    label_css_class = 'fa fa-fw fa-list-ol'
+    label_css_class = 'fa fa-fw ' + KeypointsParagraph.icon_class
     url = 'add-keypoints-paragraph.html'
     paragraph_type = KEYPOINTS_PARAGRAPH_TYPE
 
@@ -57,7 +57,7 @@
     """Key points paragraph add form"""
 
     legend = _("Add new key points paragraph")
-    icon_css_class = 'fa fa-fw fa-list-ol'
+    icon_css_class = 'fa fa-fw ' + KeypointsParagraph.icon_class
 
     fields = field.Fields(IKeypointsParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -84,7 +84,7 @@
     prefix = 'keypoints_properties.'
 
     legend = _("Edit key points paragraph properties")
-    icon_css_class = 'fa fa-fw fa-list-ol'
+    icon_css_class = 'fa fa-fw ' + KeypointsParagraph.icon_class
 
     fields = field.Fields(IKeypointsParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/map.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/map.py	Mon Nov 12 16:48:29 2018 +0100
@@ -48,7 +48,7 @@
         """Map paragraph add menu"""
 
         label = _("Location map...")
-        label_css_class = 'fa fa-fw fa-map-marker'
+        label_css_class = 'fa fa-fw ' + MapParagraph.icon_class
         url = 'add-map-paragraph.html'
         paragraph_type = MAP_PARAGRAPH_TYPE
 
@@ -62,7 +62,7 @@
 
         legend = _("Add new location map")
         dialog_class = 'modal-large'
-        icon_css_class = 'fa fa-fw fa-map-marker'
+        icon_css_class = 'fa fa-fw ' + MapParagraph.icon_class
 
         fields = field.Fields(IMapParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
         edit_permission = MANAGE_CONTENT_PERMISSION
@@ -84,7 +84,7 @@
         prefix = 'map_properties.'
 
         legend = _("Edit location map properties")
-        icon_css_class = 'fa fa-fw fa-map-marker'
+        icon_css_class = 'fa fa-fw ' + MapParagraph.icon_class
 
         fields = field.Fields(IMapParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
         fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/milestone.py	Mon Nov 12 16:48:29 2018 +0100
@@ -72,7 +72,7 @@
     """Milestone paragraph add menu"""
 
     label = _("Milestones...")
-    label_css_class = 'fa fa-fw fa-arrows-h'
+    label_css_class = 'fa fa-fw ' + MilestoneParagraph.icon_class
     url = 'add-milestone-paragraph.html'
     paragraph_type = MILESTONE_PARAGRAPH_TYPE
 
@@ -85,7 +85,7 @@
     """Milestone paragraph add form"""
 
     legend = _("Add new milestone paragraph")
-    icon_css_class = 'fa fa-fw fa-arrows-h'
+    icon_css_class = 'fa fa-fw ' + MilestoneParagraph.icon_class
 
     fields = field.Fields(IMilestoneParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -112,7 +112,7 @@
         return II18n(content).query_attribute('title', request=self.request)
 
     legend = _("Edit milestone paragraph properties")
-    icon_css_class = 'fa fa-fw fa-arrows-h'
+    icon_css_class = 'fa fa-fw ' + MilestoneParagraph.icon_class
 
     fields = field.Fields(IMilestoneParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/pictogram.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/pictogram.py	Mon Nov 12 16:48:29 2018 +0100
@@ -77,7 +77,7 @@
     """Pictogram paragraph add menu"""
 
     label = _("Pictograms...")
-    label_css_class = 'fa fa-fw fa-linode'
+    label_css_class = 'fa fa-fw ' + PictogramParagraph.icon_class
     url = 'add-pictogram-paragraph.html'
     paragraph_type = PICTOGRAM_PARAGRAPH_TYPE
 
@@ -90,7 +90,7 @@
     """Pictogram paragraph add form"""
 
     legend = _("Add new pictogram paragraph")
-    icon_css_class = 'fa fa-fw fa-linode'
+    icon_css_class = 'fa fa-fw ' + PictogramParagraph.icon_class
 
     fields = field.Fields(IPictogramParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -117,7 +117,7 @@
         return II18n(content).query_attribute('title', request=self.request)
 
     legend = _("Edit pictogram paragraph properties")
-    icon_css_class = 'fa fa-fw fa-linode'
+    icon_css_class = 'fa fa-fw ' + PictogramParagraph.icon_class
 
     fields = field.Fields(IPictogramParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/verbatim.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/verbatim.py	Mon Nov 12 16:48:29 2018 +0100
@@ -53,7 +53,7 @@
     """Verbatim paragraph add menu"""
 
     label = _("Verbatim...")
-    label_css_class = 'fa fa-fw fa-quote-right'
+    label_css_class = 'fa fa-fw ' + VerbatimParagraph.icon_class
     url = 'add-verbatim-paragraph.html'
     paragraph_type = VERBATIM_PARAGRAPH_TYPE
 
@@ -66,7 +66,7 @@
     """Verbatim paragraph add form"""
 
     legend = _("Add new verbatim paragraph")
-    icon_css_class = 'fa fa-fw fa-quote-right'
+    icon_css_class = 'fa fa-fw ' + VerbatimParagraph.icon_class
 
     fields = field.Fields(IVerbatimParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -105,7 +105,7 @@
     prefix = 'verbatim_properties.'
 
     legend = _("Edit verbatim paragraph properties")
-    icon_css_class = 'fa fa-fw fa-quote-right'
+    icon_css_class = 'fa fa-fw ' + VerbatimParagraph.icon_class
 
     fields = field.Fields(IVerbatimParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget
--- a/src/pyams_content/component/paragraph/zmi/video.py	Mon Nov 12 16:42:02 2018 +0100
+++ b/src/pyams_content/component/paragraph/zmi/video.py	Mon Nov 12 16:48:29 2018 +0100
@@ -48,7 +48,7 @@
     """Video paragraph add menu"""
 
     label = _("Video paragraph...")
-    label_css_class = 'fa fa-fw fa-film'
+    label_css_class = 'fa fa-fw ' + VideoParagraph.icon_class
     url = 'add-video-paragraph.html'
     paragraph_type = VIDEO_PARAGRAPH_TYPE
 
@@ -62,7 +62,7 @@
 
     legend = _("Add new video paragraph")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-film'
+    icon_css_class = 'fa fa-fw ' + VideoParagraph.icon_class
 
     fields = field.Fields(IVideoParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     edit_permission = MANAGE_CONTENT_PERMISSION
@@ -85,7 +85,7 @@
 
     legend = _("Edit video properties")
     dialog_class = 'modal-large'
-    icon_css_class = 'fa fa-fw fa-film'
+    icon_css_class = 'fa fa-fw ' + VideoParagraph.icon_class
 
     fields = field.Fields(IVideoParagraph).omit(*PARAGRAPH_HIDDEN_FIELDS)
     fields['renderer'].widgetFactory = RendererFieldWidget