FWS-V2

 view release on metacpan or  search on metacpan

lib/FWS/V2.pm  view on Meta::CPAN


    $self->{securityHash}->{showDeveloper}{title}     = 'Developer Access';
    $self->{securityHash}->{showDeveloper}{note}      = 'Access to developer controls, element custom element creation and site creation and deletion.';

    $self->{securityHash}->{showQueue}{title}         = 'Email Queue Access';
    $self->{securityHash}->{showQueue}{note}          = 'Access to view email sending queue, and message history.';

    $self->{securityHash}->{showSEO}{title}           = 'SEO Controls';
    $self->{securityHash}->{showSEO}{note}            = 'Access to change SEO Defaults, content and page properties.';

    $self->{securityHash}->{showSiteSettings}{title}  = 'Site Settings Menu';
    $self->{securityHash}->{showSiteSettings}{note}   = 'Generic site settings and 3rd party connector configurations.';

    $self->{securityHash}->{showSiteUsers}{title}     = 'User Account Access';
    $self->{securityHash}->{showSiteUsers}{note}      = 'Access to create, delete and modify high level information for site accounts and groups.';


    # if the admin ID is blank, set it to admin so users can access it via /admin
    $self->{adminURL}                     ||= 'admin';

    # set the secure domain to a non https because it probably does not have a cert if it was not set

lib/FWS/V2/Admin.pm  view on Meta::CPAN

    }

    #
    # edit mode is not on, just show the content and call this good
    #
    else { $editHTML .= $editHash{editBoxContent} . $editHash{editBox} }
    return $editHTML;
}    
    
 
=head2 FWSMenu

Return the FWS top menu bar.

=cut

sub FWSMenu {
    my ( $self, %paramHash ) = @_;

    #
    # because we have a menu, it might need tiny mce
    #
    $self->{tinyMCEEnable} = 1;
            
    my $linkSpacer = "  ·  ";
    my $FWSMenu;
    

    #
    # create a correct label for fws/devel link to know what we have access too
    #
    if ( $self->userValue( 'isAdmin' ) || $self->userValue( 'showDeveloper' ) )  {
        $FWSMenu .= $self->popupWindow( queryString => "p=fws_systemInfo", linkHTML => "System" );
        $FWSMenu .= $linkSpacer;
    }

    #
    # get the FWSMenu taged elements and add them to the list
    #
    my @elementArray    = $self->elementArray( tags => 'FWSMenu' );
    @elementArray       = $self->sortDataByNumber( 'ord', @elementArray );
    for my $i (0 .. $#elementArray) {

        #
        # blank out the adminGroup if we have access so we can pass by the security check
        #
        map { if ( $self->userValue( $_ ) eq 1 ) { $elementArray[$i]{adminGroup} = '' } } split( /,/, $elementArray[$i]{adminGroup} );

        #
        # if we have access or we are super user show it

lib/FWS/V2/Admin.pm  view on Meta::CPAN

            # convert to our friendly name format
            #
            ( my $fwsLink = $elementArray[$i]{type} ) =~ s/^FWS/fws_/sg;
    
            #
            # if this is not a friendly type version menu item then use the guid
            #
            $fwsLink ||= 'fws_' . $elementArray[$i]{guid};

            my $queryString = "FWS_pageId=" . $paramHash{pageId} . "&p=" . $fwsLink . "&FWS_showElementOnly=";
            if ( $elementArray[$i]{rootElement} ) { $FWSMenu .= $self->popupWindow( queryString => $queryString . "0", linkHTML => $elementArray[$i]{title} ) }
            else { $FWSMenu .= $self->dialogWindow( queryString => $queryString . "1", linkHTML => $elementArray[$i]{title} ) }
            $FWSMenu .= $linkSpacer;
        }
    }

    if ( $self->formValue( "p" ) =~ /^fws_/ ) {
        $FWSMenu .= $self->_selfWindow( "", "View Site" );
        $FWSMenu .= $linkSpacer;
    }
    
    #    
    # ALWAYS ON
    #
    if ( $self->userValue( 'isAdmin' ) || $self->userValue( 'showDesign' ) || $self->userValue( 'showContent' ) || $self->userValue( 'showDeveloper' ) )  {
        $FWSMenu .= $self->_editModeLink( '', $linkSpacer );
    }

    $FWSMenu .= $self->_logOutLink();
    
    if ( $self->userValue( 'isAdmin' ) || $self->userValue( 'showDesign' ) || $self->userValue( 'showContent' ) || $self->userValue( 'showDeveloper' ) )  {

        #
        # just in case we havn't installed FWS core yet, lets make sure the image is there before we 
        # try to display it.
        #
        if ( -e $self->{filePath} . '/fws/icons/add_reorder_16.png' ) {
            $FWSMenu .= $linkSpacer;
            $FWSMenu .= $self->FWSIcon( 
                icon    => 'add_reorder_16.png',
                onClick => $self->dialogWindow( queryString => 'p=fws_dataOrdering&guid=' . $paramHash{pageId} . '&pageOnly=1' ),
                alt     => 'Add And Ordering',
                width   => '16',
            );
        }
    }

    $FWSMenu .= $linkSpacer;

    return $FWSMenu;
}


=head2 panel

FWS panel HTML:  Pass title, content and panelStyle keys.

=cut

sub panel {

lib/FWS/V2/Database.pm  view on Meta::CPAN

    # wtf, still didn't get one yet????  lets build out a basic one so the page will render
    #
    if ( !$paramHash{templateGUID} ) {
        $title      = "FWS template";
        $template   = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n".
            "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\n" .
            "<head>\n" .
            "#FWSHead#" .
            "</head>\n" .
            "<body>\n" .
            "#FWSMenu#" .
            "<div id=\"loc_wrapper\">" .
            "<div id=\"loc\">" .
            "<div id=\"loc_1_wrapper\">" .
            "<div id=\"loc_1\">" .
            "<div id=\"loc_1_1_wrapper\">" .
            "<div id=\"loc_1_1\">#FWSShow-header#</div>" .
            "</div>" .
            "</div>" .
            "</div>" .
            "<div id=\"loc_2_wrapper\">" .

lib/FWS/V2/Display.pm  view on Meta::CPAN

            #
            my %layoutCountHash;


            my $columnWrapperStartFlag  = 0;
            my $columnWrapperStopFlag   = 0;
            my $lastLayoutId            = 0;
            my $elementTotal            = 0;
            my %columnContent;
            my %columnCount;
            my $FWSMenu;

            #
            # set the hash we use to ensure we don't use an default element more than once on the same page
            #
            my %elementUsed;

            #
            # here is some js and css hashs so we don't add multipuls to each page if ther eis more than one element that has the same file on one page
            #
            my %JSHash;

lib/FWS/V2/Display.pm  view on Meta::CPAN

                    $self->jqueryEnable( 'ui.slider-1.8.9' );
                    $self->jqueryEnable( 'timepickr-0.9.6' );
                    $self->jqueryEnable( 'ui.tabs-1.8.9' );
                    $self->jqueryEnable( 'simplemodal-1.4.4' );
                    $self->jqueryEnable( 'fileupload-ui-4.4.1' );
                    $self->jqueryEnable( 'fileupload-4.5.1' );
                    $self->jqueryEnable( 'fileupload-uix-4.6' );
                    $self->jqueryEnable( 'ui.fws-1.8.9' );
    
                    if ( $pageId eq $self->homeGUID() ) { $pageHash{disableDeleteTool} = 1 }
                    $pageHash{layout}             = 'FWSPageMenu';
                    $pageHash{guid}               = $pageId;
                    $pageHash{FWSMenuTool}        = 1;
                    $pageHash{pageOnly}           = 1;
                    $pageHash{alwaysShow}         = 1;
                    $pageHash{disableActiveTool}  = 1;
                    $pageHash{disableOrderTool}   = 1;
                    if ( $pageHash{siteGUID} eq $self->{siteGUID} ) {
                        $pageHash{name} = $self->FWSMenu( pageId => $pageId ) . $pageHash{name};
                    }
                    else {
                        $pageHash{addElementTool}     = 0;
                        $pageHash{disableDeleteTool}  = 1;
                        $pageHash{disableEditTool}    = 1;
                        $pageHash{disableActiveTool}  = 1;
                        $pageHash{disableOrderTool}   = 1;
                        $pageHash{name} = "Default FWS Page - To override this page create a new page with the friendly url of [ " . $pageHash{friendlyURL} . " ]";
                    }
    

lib/FWS/V2/Display.pm  view on Meta::CPAN

                    #
                    if ( ( !$self->userValue( 'showDesign' ) && !$self->userValue( 'showContent' ) && !$self->userValue( 'showDeveloper' ) ) || ( $pageHash{siteGUID} ne $self->{siteGUID} ) ) {
                        $pageHash{addElementTool}       = 0;
                        $pageHash{disableDeleteTool}    = 1;
                        $pageHash{disableEditTool}      = 1;
                        $pageHash{disableActiveTool}    = 1;
                        $pageHash{disableOrderTool}     = 1;
                    }
    
                    $pageHash{editBoxColor} = '#000000';
                    $FWSMenu .= $self->editBox( %pageHash );
                }
    
                #
                # before we print head and foot css and js we need to compile and set cache
                #
                $self->setPageCache();

                #
                # add the head where it goes
                #
                my $FWSHead = $self->FWSHead();
                $pageHTML   =~ s/#FWSHead#/$FWSHead/g;
    
                #
                # add the menu
                #
                $pageHTML =~ s/#FWSMenu#/$FWSMenu/g;
    
                #
                # Clean up the adminLoggedIn stuff
                #
                $pageHTML =~ s/#FWSAdminLoggedIn#//g;
                $pageHTML =~ s/#FWSAdminLoggedInEnd#//g;
    
                #
                # but all non-main info in the page
                #



( run in 0.827 second using v1.01-cache-2.11-cpan-49f99fa48dc )