diff options
author | Alexey Kiryushin <alexey.a.kiryushin@gmail.com> | 2018-11-16 16:19:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-16 16:19:03 +0300 |
commit | 866bfff6ff41a2796329c6bb28db688cbfeed2b8 (patch) | |
tree | 3da173b79af7727969116df212fba597fbddc3a3 /javascript/app/templates | |
parent | b5a3048a880c8ce1c2bfa795a39576d02f416be2 (diff) |
Add cross-package 'find references'
Diffstat (limited to 'javascript/app/templates')
-rw-r--r-- | javascript/app/templates/components/paginated-list.hbs | 2 | ||||
-rw-r--r-- | javascript/app/templates/package.hbs | 48 |
2 files changed, 34 insertions, 16 deletions
diff --git a/javascript/app/templates/components/paginated-list.hbs b/javascript/app/templates/components/paginated-list.hbs index 2ae9813..82d4eee 100644 --- a/javascript/app/templates/components/paginated-list.hbs +++ b/javascript/app/templates/components/paginated-list.hbs @@ -1,5 +1,5 @@ <div class="paginated-list-header"> - <span>Found {{total}}</span> + <span>Found {{total}} {{{foundWhere}}}</span> {{#if (or next prev)}} diff --git a/javascript/app/templates/package.hbs b/javascript/app/templates/package.hbs index c8ed0dc..8c6d1a4 100644 --- a/javascript/app/templates/package.hbs +++ b/javascript/app/templates/package.hbs @@ -32,26 +32,44 @@ {{/resizable-panel}} <div id="right-panel" class="right-panel"> <div id="file-container" class="file-container"> - {{outlet}} + {{outlet}} </div> {{#bottom-panel visible=bottomPanelVisible topPanelElementId="#file-container" containerElementId="#right-panel" as |section|}} {{#if (eq section "header")}} - References to <b><span class="source-code">{{occName}}</span></b> in <span class="source-code">{{packageId}}</span> + References to <b><span class="source-code">{{occName}}</span></b> + {{#if locationInfo.packageId}} + (defined in <b>{{locationInfo.packageId.name}}-{{locationInfo.packageId.version}}</b> / <b>{{locationInfo.moduleName}}</b>) + {{/if}} {{else}} - {{#paginated-list url=referencesUrl as |files|}} - <ul> - {{#each files as |file|}} - <li> - <div class="file-name"><a href="/package/{{packageId}}/show/{{file.name}}">{{file.name}}</a></div> - {{#each file.references as |reference|}} - <a class="source-code source-code-snippet" href="/package/{{packageId}}/show/{{file.name}}#L{{reference.idSrcSpan.line}}">{{{reference.sourceCodeHtml}}}</a> - {{/each}} - </li> - {{/each}} - </ul> - {{/paginated-list}} + <div id="references-packages" class="references-packages"> + {{#if globalReferences}} + <span> + {{#each globalReferences as |ref|}} + <div> + <a id="references-package-{{ref.packageId}}" class="{{if (eq ref.packageId packageId) 'selected'}}" href="#" {{action "updateReferences" ref.packageId externalId occName locationInfo true}}> + {{ref.packageId}} + </a> ({{ref.count}}) + </div> + {{/each}} + </span> + {{/if}} + </div> + <div class="references"> + {{#paginated-list url=referencesUrl foundWhere=(concat "in <b>" packageId "</b>") as |files|}} + <ul> + {{#each files as |file|}} + <li> + <div class="file-name"><a href="/package/{{packageId}}/show/{{file.name}}">{{file.name}}</a></div> + {{#each file.references as |reference|}} + <a class="source-code source-code-snippet" href="/package/{{packageId}}/show/{{file.name}}#L{{reference.idSrcSpan.line}}">{{{reference.sourceCodeHtml}}}</a> + {{/each}} + </li> + {{/each}} + </ul> + {{/paginated-list}} + </div> {{/if}} - {{/bottom-panel}} + {{/bottom-panel}} </div> </div> </div> |