Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision bf9adfba

Von Moritz Bunkus vor fast 11 Jahren hinzugefügt

  • ID bf9adfbab97311abf09cbbcf9f3d72f707d8a3af
  • Vorgänger ca7c2f91
  • Nachfolger 602e604a

RequirementSpec-Presenter in RequirementSpecTextBlock umbenannt

Unterschiede anzeigen:

SL/Presenter/RequirementSpec.pm
1
package SL::Presenter::RequirementSpec;
2

  
3
use strict;
4

  
5
use parent qw(Exporter);
6

  
7
use Exporter qw(import);
8
our @EXPORT = qw(requirement_spec_text_block_jstree_data);
9

  
10
use Carp;
11

  
12
use SL::JSON;
13

  
14
sub requirement_spec_text_block_jstree_data {
15
  my ($self, $text_block, %params) = @_;
16

  
17
  return {
18
    data     => $text_block->title || '',
19
    metadata => { id =>         $text_block->id, type => 'textblock' },
20
    attr     => { id => "tb-" . $text_block->id, href => $params{href} || '#' },
21
  };
22
}
23

  
24
1;
SL/Presenter/RequirementSpecTextBlock.pm
1
package SL::Presenter::RequirementSpecTextBlock;
2

  
3
use strict;
4

  
5
use parent qw(Exporter);
6

  
7
use Exporter qw(import);
8
our @EXPORT = qw(requirement_spec_text_block_jstree_data);
9

  
10
use Carp;
11

  
12
use SL::JSON;
13

  
14
sub requirement_spec_text_block_jstree_data {
15
  my ($self, $text_block, %params) = @_;
16

  
17
  return {
18
    data     => $text_block->title || '',
19
    metadata => { id =>         $text_block->id, type => 'textblock' },
20
    attr     => { id => "tb-" . $text_block->id, href => $params{href} || '#', class => 'text-block-context-menu' },
21
  };
22
}
23

  
24
1;

Auch abrufbar als: Unified diff