aboutsummaryrefslogtreecommitdiff
path: root/javascript/app/templates/components/haskell-module.hbs
blob: 77b9df7245b0837d830d2f24a95e4fa0cf09f1b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<div class="source-code-container"></div>
{{#if declarations}}
    <div class="declarations">
        <div class="declarations-header">            
            <div class="input-group">
                {{input class="form-control" value=query placeholder="Identifier"}}<a class="hide-declarations" href="#" {{action "toggleShowDeclarations"}}>{{showDeclarationsLabel}}</a>
            </div>
        </div>
        {{#if showDeclarations}}
            <div id="declarations-content" class="declarations-content">                
                <ul>                    
                    {{#infinite-list containerElementId="declarations-content" elements=filteredDeclarations perPage=30 as |declaration|}}
                        <li class="declaration">
                            <div class="declaration">
                                <a {{action "goToLine" declaration.lineNumber}} href="#"><span class="source-code-font">{{declaration.name}}{{#if declaration.declType}} :: {{type-signature-text components=declaration.declType.components}}{{/if}}</span>
                                </a><span>{{#unless declaration.isExported}}<i>(not exported)</i>{{/unless}}</span>
                            </div>
                        </li>
                    {{/infinite-list}}
                </ul>
            </div>
        {{/if}}
    </div>
{{/if}}
{{#info-window
   targetElement=selectedIdentifier
   isHoveredOverIdentifier=isHoveredOverIdentifier
   hasSelectedExpression=hasSelectedExpression
   containerElementId="right-panel" as |section|}}
    {{#if (eq section "header")}}
        {{#if hasSelectedExpression}}
            <div>Selected expressions</div>
        {{else}}
            {{identifier-name
              identifierInfo=identifierInfo
              identifierOccurrence=identifierOccurrence
              identifierElement=selectedIdentifier
              currentPackageId=packageId
              isBinder=identifierOccurrence.isBinder
              currentLineNumber=currentLineNumber
              findReferences=findReferences}}
        {{/if}}
    {{else}}
        {{#unless hasSelectedExpression}}
            {{identifier-info
              identifierInfo=identifierInfo
              identifierOccurrence=identifierOccurrence
              identifiers=identifiers
              currentLineNumber=currentLineNumber}}
    {{else}}
            {{expression-info
              expressions=expressions
              identifiers=identifiers
              currentLineNumber=currentLineNumber}}
        {{/unless}}
    {{/if}}
{{/info-window}}