Beispiel #1
0
    def test_remove_widgets_in_key_area(self):
        area = 'admin'
        widget_instance = self.overwritten_widget_instance(self.html_content)

        WidgetManager.register_widget(area, widget_instance)
        WidgetManager.unregister_widget(area, self.widget_id)

        self.assertEqual(len(WidgetManager.get_widgets(area)), 0)
Beispiel #2
0
    def test_remove_widgets_in_key_area(self):
        area = 'admin'
        widget_instance = self.ovewrited_widget_instance(self.html_content)

        WidgetManager.register_widget(area, widget_instance)
        WidgetManager.unregister_widget(area, self.widget_id)

        self.assertEqual(len(WidgetManager.get_widgets(area)), 0)
Beispiel #3
0
def import_widgets(context, area_id, widget_var=None):
    if not widget_var:
        widget_var = "widgets_{}".format(area_id)

    context[widget_var] = WidgetManager.get_widgets(area_id, context=context)

    return ""
Beispiel #4
0
def import_widgets(context, area_id, widget_var=None):
    if not widget_var:
        widget_var = "widgets_{}".format(area_id)

    context[widget_var] = WidgetManager.get_widgets(area_id, context=context)
    context['bootstrap_conflict'] = WidgetManager.bootstrap_conflict
    context['jquery_conflict'] = WidgetManager.jquery_conflict

    return ""
Beispiel #5
0
def import_widgets(context, area_id, widget_var=None):
    if not widget_var:
        widget_var = "widgets_{}".format(area_id)

    context[widget_var] = WidgetManager.get_widgets(area_id, context=context)
    context['bootstrap_conflict'] = WidgetManager.bootstrap_conflict
    context['jquery_conflict'] = WidgetManager.jquery_conflict

    return ""
Beispiel #6
0
 def tearDown(self):
     WidgetManager.unregister_widget(self.widget_area, self.widget_id)
Beispiel #7
0
 def setUp(self):
     custom_widget = self.ovewrited_widget_instance(self.html_content)
     WidgetManager.register_widget(self.widget_area, custom_widget)
from colab.widgets.widget_manager import WidgetManager
from colab.accounts.widgets.group import GroupWidget
from colab.accounts.widgets.group_membership import GroupMembershipWidget
from colab.accounts.widgets.latest_posted import LatestPostedWidget
from colab.accounts.widgets.latest_contributions import \
    LatestContributionsWidget

from colab.accounts.widgets.collaboration_chart import CollaborationChart
from colab.accounts.widgets.participation_chart import ParticipationChart

# Profile Widgets
WidgetManager.register_widget('group', GroupWidget())
WidgetManager.register_widget('button', GroupMembershipWidget())
WidgetManager.register_widget('list', LatestPostedWidget())
WidgetManager.register_widget('list', LatestContributionsWidget())
WidgetManager.register_widget('charts', CollaborationChart())
WidgetManager.register_widget('charts', ParticipationChart())
from colab.widgets.widget_manager import WidgetManager

from colab.super_archives.widgets.dashboard_latest_collaborations import \
    DashboardLatestCollaborationsWidget
from colab.super_archives.widgets.dashboard_most_relevant_threads import \
    DashboardMostRelevantThreadsWidget
from colab.super_archives.widgets.dashboard_latest_threads import \
    DashboardLatestThreadsWidget
from colab.super_archives.widgets.dashboard_collaboration_graph import \
    DashboardCollaborationGraphWidget

# Dashboard Widgets
WidgetManager.register_widget('dashboard',
                              DashboardLatestCollaborationsWidget())
WidgetManager.register_widget('dashboard',
                              DashboardCollaborationGraphWidget())
WidgetManager.register_widget('dashboard',
                              DashboardMostRelevantThreadsWidget())
WidgetManager.register_widget('dashboard',
                              DashboardLatestThreadsWidget())

Beispiel #10
0
from colab.widgets.widget_manager import WidgetManager

from colab_gitlab.widgets.profile.profile import GitlabProfileWidget

WidgetManager.register_widget('profile', GitlabProfileWidget())
Beispiel #11
0
 def test_generate_content(self):
     widgets = WidgetManager.get_widgets(self.widget_area)
     self.assertEqual(widgets[0].content, self.html_content)
Beispiel #12
0
 def test_add_widgets_to_key_area(self):
     self.assertEqual(len(WidgetManager.get_widgets(self.widget_area)), 1)
Beispiel #13
0
 def tearDown(self):
     WidgetManager.unregister_widget(self.widget_area, self.widget_id)
     WidgetManager.bootstrap_conflict = False
     WidgetManager.jquery_conflict = False
Beispiel #14
0
 def setUp(self):
     self.widget = self.overwritten_widget_instance(self.html_content)
     WidgetManager.register_widget(self.widget_area, self.widget)
Beispiel #15
0
    def test_jquery_conflict(self):
        self.widget.jquery_conflict = True
        WidgetManager.get_widgets(self.widget_area)

        self.assertTrue(WidgetManager.jquery_conflict)
        self.assertFalse(WidgetManager.bootstrap_conflict)
from colab.widgets.widget_manager import WidgetManager
from colab_discourse.widgets.home_section import DiscourseHomeSectionWidget
from colab_discourse.widgets.navigation_links import (
    DiscourseNavigationLinksWidget
)


WidgetManager.register_widget('home_section', DiscourseHomeSectionWidget())
WidgetManager.register_widget('navigation_links',
                              DiscourseNavigationLinksWidget())
Beispiel #17
0
from colab.widgets.widget_manager import WidgetManager
from colab.widgets.dashboard.dashboard_latest_collaborations import DashboardLatestCollaborationsWidget
from colab.widgets.dashboard.dashboard_collaboration_graph import DashboardCollaborationGraphWidget

WidgetManager.register_widget('dashboard',
                              DashboardLatestCollaborationsWidget())
WidgetManager.register_widget('dashboard', DashboardCollaborationGraphWidget())
Beispiel #18
0
 def test_add_widgets_to_key_area(self):
     self.assertEqual(len(WidgetManager.get_widgets(self.widget_area)), 1)
Beispiel #19
0
 def test_generate_content(self):
     widgets = WidgetManager.get_widgets(self.widget_area)
     self.assertEqual(widgets[0].content, self.html_content)
from colab.widgets.widget_manager import WidgetManager
from colab_taiga.widgets.dashboard_most_relevant_projects import DashboardMostRelevantProjectsWidget


WidgetManager.register_widget(
    'dashboard', DashboardMostRelevantProjectsWidget())


    
Beispiel #21
0
 def test_widget_with_invalid_area(self):
     self.assertEqual(WidgetManager.get_widgets("area"), [])
Beispiel #22
0
 def test_widget_with_invalid_area(self):
     self.assertEqual(WidgetManager.get_widgets("area"), [])
from colab.widgets.widget_manager import WidgetManager
from colab_wikilegis.widgets.home_section import WikilegisHomeSectionWidget
from colab_wikilegis.widgets.navigation_links import (
    WikilegisNavigationLinksWidget
)

WidgetManager.register_widget('home_section', WikilegisHomeSectionWidget())
WidgetManager.register_widget('navigation_links',
                              WikilegisNavigationLinksWidget())
Beispiel #24
0
from colab.widgets.widget_manager import WidgetManager
from colab.accounts.widgets.collaboration_chart import CollaborationChart
from colab.accounts.widgets.participation_chart import ParticipationChart

WidgetManager.register_widget('charts', CollaborationChart())
WidgetManager.register_widget('charts', ParticipationChart())
Beispiel #25
0
from colab.widgets.widget_manager import WidgetManager
from colab.accounts.widgets.group import GroupWidget
from colab.accounts.widgets.group_membership import GroupMembershipWidget
from colab.accounts.widgets.latest_posted import LatestPostedWidget
from colab.accounts.widgets.latest_contributions import LatestContributionsWidget


WidgetManager.register_widget('group', GroupWidget())
WidgetManager.register_widget('button', GroupMembershipWidget())
WidgetManager.register_widget('list', LatestPostedWidget())
WidgetManager.register_widget('list', LatestContributionsWidget())
Beispiel #26
0
from colab.widgets.widget_manager import WidgetManager
from colab.super_archives.widgets.dashboard_latest_collaborations import DashboardLatestCollaborationsWidget
from colab.super_archives.widgets.dashboard_most_relevant_threads import DashboardMostRelevantThreadsWidget
from colab.super_archives.widgets.dashboard_latest_threads import DashboardLatestThreadsWidget
from colab.super_archives.widgets.dashboard_collaboration_graph import DashboardCollaborationGraphWidget

WidgetManager.register_widget('dashboard',
                              DashboardLatestCollaborationsWidget())
WidgetManager.register_widget('dashboard', DashboardCollaborationGraphWidget())
WidgetManager.register_widget('dashboard',
                              DashboardMostRelevantThreadsWidget())
WidgetManager.register_widget('dashboard', DashboardLatestThreadsWidget())
from colab.widgets.widget_manager import WidgetManager
from colab_taiga.widgets.user_story import UserStoriesWidget


WidgetManager.register_widget('list', UserStoriesWidget())
from colab.widgets.widget_manager import WidgetManager

from colab_noosfero.widgets.profile.profile import NoosferoProfileWidget

WidgetManager.register_widget('profile', NoosferoProfileWidget())
from colab.widgets.widget_manager import WidgetManager
from colab_audiencias.widgets.home_section import AudienciasHomeSectionWidget
from colab_audiencias.widgets.navigation_links import (
    AudienciasNavigationLinksWidget
)


WidgetManager.register_widget('home_section', AudienciasHomeSectionWidget())
WidgetManager.register_widget('navigation_links',
                              AudienciasNavigationLinksWidget())
Beispiel #30
0
from colab.widgets.widget_manager import WidgetManager
from colab.widgets.dashboard.dashboard_latest_collaborations import DashboardLatestCollaborationsWidget
from colab.widgets.dashboard.dashboard_collaboration_graph import DashboardCollaborationGraphWidget


WidgetManager.register_widget(
    'dashboard', DashboardLatestCollaborationsWidget())
WidgetManager.register_widget(
    'dashboard', DashboardCollaborationGraphWidget())