HTML-TableContent

 view release on metacpan or  search on metacpan

lib/HTML/TableContent/Template/Base.pm  view on Meta::CPAN

        inner_html => '_even_rows',
    );
 
    row even => ( class => 'even-rows' );
 
    cell all => ( alternate_classes => qw['one', 'two'] );
 
    sub _render_header {
        my ($self, $header) = @_;
 
        return ['<a href="some/endpoint?sort=%s">%s</a>', 'template_attr', 'text'];
    }
 
    sub _even_rows {
        return ['<div>%s</div>', '_render_element'];
    }
 
    .... 
 
    my $template = Framework::Tables::Demo->new({ data => $aoh });
    $template->render;

t/19-more-template.t  view on Meta::CPAN

is($template->table->get_first_row->get_cell(1)->text, 'Rex', "first row first cell text: rob");
 
is($template->table->get_first_row->get_cell(1)->header->text, 'User Name', "first row first cell header text: name");
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">User Id</th><th class="test" id="test-id">User Name</th><th class="what">address</th></tr><tr><td>1</td><td>Rex</td><td>so...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::HeaderHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint">id</a></th><th class="okay"><a href="some/endpoint">name</a></th><th class="what"><a href="some/en...
 
is($template->render, $html, "$html");
 
ok($template->id->set_text('User Id'), 'set id text');
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint">User Id</a></th><th class="okay"><a href="some/endpoint">name</a></th><th class="what"><a href="so...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::HeaderHtmlCustom->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint?sort=id">User Id</a></th><th class="okay"><a href="some/endpoint?sort=name">User Name</a></th><th c...
 
is($template->render, $html, "$html");
 
 
ok($template = t::Templates::OneHeaderHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint?sort=id">User Id</a></th><th class="okay">User Name</th><th class="what">User Address</th></tr><tr>...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::SubHeaderHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint?sort=id">User Id</a></th><th class="okay">User Name</th><th class="what"><a href="some/endpoint?sor...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::CaptionHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id"><a href="some/endpoint">table caption</a></caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><td>1</td><td>rob</td><...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::CaptionHtmlCustom->new());
 
$html = '<table><caption class="some-class" id="caption-id"><a href="www.somelinktosomethingspecial.com">table caption</a></caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><t...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::ArrCaptionHtml->new());

t/19-more-template.t  view on Meta::CPAN

 
ok($template = t::Templates::RowHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><td>1</td><td>rob</td><td>somewhere</td></div>...
 
is($template->render, $html, "$html");
 
 
ok($template = t::Templates::ArrRowHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><a href="some/endpoint"><td>1</td><td>rob</td>...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::SubRowHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><a href="some/endpoint"><td>1</td><td>rob</td>...
 
is($template->render, $html, "$html");
 
 
ok($template = t::Templates::CellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><td><span>1</span></td><td><span>rob</span></t...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::ArrCellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><td><span><a href="some/endpoint">1</a></span>...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::SubCellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><td><span><a href="some/endpoint">1</a></span>...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::HeaderCellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint">id</a></th><th class="okay"><a href="some/endpoint">name</a></th><th class="what"><a href="some/en...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::SubHeaderCellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id"><a href="some/endpoint">id</a></th><th class="okay"><a href="some/endpoint">name</a></th><th class="what"><a href="some/en...
 
is($template->render, $html, "$html");
 
ok($template = t::Templates::RowCellHtml->new());
 
$html = '<table><caption class="some-class" id="caption-id">table caption</caption><tr><th class="some-class" id="something-id">id</th><th class="okay">name</th><th class="what">address</th></tr><tr><div><td><span id="first-id">1</span></td><td><span...
 
is($template->render, $html, "$html");
 
my %hash = (

t/Templates/ArrCellHtml.pm  view on Meta::CPAN


header name => (
    class => 'okay',
);

header address => (
    class => 'what',
);

cell one__one => (
    links => ['some/endpoint'],
    inner_html => ['<span><a href="%s">%s</a></span>', 'get_first_link', 'text']
);

sub render_row {
    my ($self, $element) = @_;

    return ['<div>%s</div>'];
}

sub render_cell {

t/Templates/ArrRowHtml.pm  view on Meta::CPAN

header name => (
    class => 'okay',
);

header address => (
    class => 'what',
);

row one => (
    inner_html => [ '<div><a href="%s">%s</a></div>', 'get_first_link', '_render_element' ],
    links => ['some/endpoint']
);

sub render_row {
    my ($self, $element) = @_;

    return ['<div>%s</div>'];
}

sub _data {
    my $self = shift;

t/Templates/CaptionHtml.pm  view on Meta::CPAN

    class => 'okay',
);

header address => (
    class => 'what',
);

sub render_caption {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint">%s</a>'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/HeaderCellHtml.pm  view on Meta::CPAN

    class => 'okay',
);

header address => (
    class => 'what',
);

sub render_header {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint">%s</a>'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/HeaderHtml.pm  view on Meta::CPAN

    class => 'okay',
);

header address => (
    class => 'what',
);

sub render_header {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint">%s</a>'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/HeaderHtmlCustom.pm  view on Meta::CPAN

);

header address => (
    class => 'what',
    text => 'User Address',
);

sub render_header {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint?sort=%s">%s</a>', 'template_attr', 'text'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/OneHeaderHtml.pm  view on Meta::CPAN

caption title => (
    class => 'some-class',
    id => 'caption-id',
    text => 'table caption',
);

header id => (
    class => 'some-class',
    id => 'something-id',
    text => 'User Id',
    inner_html => ['<a href="some/endpoint?sort=%s">%s</a>', 'template_attr', 'text'],
);

header name => (
    class => 'okay',
    text => 'User Name',
);

header address => (
    class => 'what',
    text => 'User Address',

t/Templates/SubCellHtml.pm  view on Meta::CPAN


header name => (
    class => 'okay',
);

header address => (
    class => 'what',
);

cell one__one => (
    links => ['some/endpoint'],
    inner_html => 'special_cell',
);

sub render_row {
    my ($self, $element) = @_;

    return ['<div>%s</div>'];
}

sub render_cell {

t/Templates/SubHeaderCellHtml.pm  view on Meta::CPAN

    class => 'what',
);

sub bold {
    return ['<b>%s</b>'];
}

sub render_header {
    my ($self, $element) = @_;

    return ['<a href="some/endpoint">%s</a>'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/SubHeaderHtml.pm  view on Meta::CPAN

    text => 'User Name',
);

header address => (
    class => 'what',
    text => 'User Address',
    inner_html => 'specific_headers',
);

sub specific_headers {
    return ['<a href="some/endpoint?sort=%s">%s</a>', 'template_attr', 'text'];
}

sub _data {
    my $self = shift;

    return [
        {
            id => 1,
            name => 'rob',
            address => 'somewhere',

t/Templates/SubRowHtml.pm  view on Meta::CPAN

header name => (
    class => 'okay',
);

header address => (
    class => 'what',
);

row one => (
    inner_html => 'special_row',    
    links => ['some/endpoint'],
);

sub render_row {
    my ($self, $element) = @_;

    return ['<div>%s</div>'];
}

sub special_row {
    my ($self, $element) = @_;

t/html/horizontal/facebook.html  view on Meta::CPAN

<!DOCTYPE html>
<html lang="en" id="facebook" class="no_js">
&#125;];</code></pre></div></div>If you want to learn how to use the Graph API, read our <a href="/docs/graph-api/using-graph-api/">Using Graph API guide</a>. <h3>Parameters</h3><div>This endpoint doesn&#039;t have any parameters.</div><h3>Fields</h3...

<ul><li>Register for mobile</li>
<li>Confirm their account via SMS</li>
<li>Enter a valid credit card</li>
</ul></p></td></tr><tr><td><p class="_yc"><span><code>video_upload_limits</code></span></p><div class=""></div><div class="_yb _yc"><a href="/docs/graph-api/reference/video-upload-limits/">VideoUploadLimits</a></div></td><td><p class="_yd"><p>Video u...
        under specified namespace and update the mapping if necessary and pass
        permission check</p></td></tr><tr class="row_1 _5m29 _5m27"><td><span><code>payload</code></span><div class="_yb">Object</div></td><td><p>Payload representing users to add</p></td></tr><tr class="row_1-0 _5m29 hidden_elem"><td class="devsiteR...
        have a lot of users to upload. For example, if you have 1 million users
        to upload, you need to split them into at least 100 requests because
        each request can only take 10k users. Specify the session info so that
        you can track if the session has finished or not.</p></td></tr><tr class="row_2-0 hidden_elem"><td class="devsiteReferenceTableRowLevel1"><span><code>session_id</code></span><div class="_yb">unsigned int32</div></td><td><p>Advertiser generate...
         fields of the set in your response. Default value: <code>false</code>.</p></td></tr><tr class="row_1 _5m29"><td><span><code>uid</code></span><div class="_yb">int</div></td><td><p>ID of the user</p><div class="_3-8w"><span class="_1vet">Requi...
          under specified namespace and update the mapping if necessary and pass
          permission check</p></td></tr><tr class="row_1 _5m29 _5m27"><td><span><code>payload</code></span><div class="_yb">Object</div></td><td><p>Payload representing users to delete</p></td></tr><tr class="row_1-0 _5m29 hidden_elem"><td class="dev...

<div class="hidden_elem"><code id="u_0_19"> <header class="_83k fixed_elem"><div class="_83l"><input type="checkbox" id="drawer-toggle" name="_2voo" /><label for="drawer-toggle" class="_2voo" id="drawer-toggle-label"> ☰ </label><a class="_42xr" hre...

<div class="hidden_elem"><code id="u_0_1e"> <div class="_3wm0"><div class="_6a _6b _344-"><div class="_6a _6b uiPopover" id="u_0_1b"><a class="_42ft _344_ _2agf _p" role="button" href="#" data-click-area="left_side_nav_selector" aria-haspopup="true" ...

<div class="hidden_elem"><code id="u_0_1g"> <div id="u_0_1f"></div> --></code></div>

<div class="hidden_elem"><code id="u_0_1i"> <div class="_5uw3"><div class="_4-u2 _5uw4 _4-u8"><div class="_4-u3 _5xk2"><form rel="async" action="/x/ajax/feedback/" method="post" onsubmit="return window.Event &amp;&amp; Event.__inlineSubmit &amp;&amp;...



( run in 0.526 second using v1.01-cache-2.11-cpan-2b1a40005be )